How to Insert Bookmarks Dynamically using .NET | LINQ Reporting

Hi,

  1. Is it possible to add bookmark using the LINQ reporting engine?
  2. How can we add Bookmarks for tables in an existing word document

Thanks.

@ASHPoseUser,

Thanks for your inquiry.

Unfortunately, you cannot add bookmarks using LINQ reporting engine. Could you please share complete detail of your use case along with input and expected output documents. We will then provide you more information on it.

Yes, you can add bookmark for table in an existing document.

  1. Please move the cursor to the first cell of table and call DocumentBuilder.StartBookmark method.
  2. Please move the cursor to the last cell of table and call DocumentBuilder.EndBookmark method to insert the bookmark.

Please refer to the following articles.
Inserting a Bookmark
Moving the Cursor

Thanks Tahir. I was able to figure out my second requirement.

As for my first question:

  1. I have a list of objects
  2. I need to see the detail of each object in a table in one page only i.e. one object per page
  3. Create a table of content of the list of objects.

To do step #3, I have to add a bookmark to each record and then call “doc.updateFields()” method.

Currently, I have managed this by looping through the table collection(after calling the ReportEngine.BuildReport() method) and adding the bookmarks.

Thanks.

@ASHPoseUser,

Thanks for sharing the detail. Regarding add bookmarks, It seems that you have found the solution of your query. If you still face problem, please attach the following resources here for our reference. We will then provide you more information on it.

  • Your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.

2 posts were split to a new topic: LINQ Reporting and bookmark

@ASHPoseUser

Please read the following article about inserting bookmark into document using LINQ Reporting Engine.