Aspose Words - Table - Cross reference Hyperlink

In the aspose words,i have a document in which i have several tables and that table is getting generated after document is generated. i want to cross reference the table in other places of my document using hyperlink according to some parameters, how can i achieve this in aspose. below is the code used for generating the document.

 private void UpdateReportData(Document doc, Study studyData, bool checkAsposeSyntax = false)
 {
     R.ReportingEngine engine = new R.ReportingEngine();
     if (checkAsposeSyntax)
     {
         ReportingEngine.UseReflectionOptimization = false;
         engine.BuildReport(doc, studyData, "Study");
         doc.UpdateFields();
     }
     else
     {
         DocumentBuilder builder = new DocumentBuilder(doc);
         engine.Options = ReportBuildOptions.InlineErrorMessages;
         var isReportGeneratedSuccessfully = true;
         int loopBreakerMaxCount = 0;
         do
         {
             loopBreakerMaxCount++;
             isReportGeneratedSuccessfully = engine.BuildReport(builder.Document, studyData, "Study");
             if (!isReportGeneratedSuccessfully)
             {
                 CheckRangeText(doc);

                 if (loopBreakerMaxCount >= 5)
                 {
                     isReportGeneratedSuccessfully = true;
                 }
             }
         } while (!isReportGeneratedSuccessfully);
     }
 }

@Aditya5 You can use hyperlink to bookmark to create internal references in the document. For example see the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert hyperlink to bookmark.
string bkName = "MyBookmark";
builder.Font.StyleIdentifier = StyleIdentifier.Hyperlink;
builder.InsertHyperlink("Jump to the last page", bkName, true);
builder.Font.ClearFormatting();
builder.InsertBreak(BreakType.PageBreak);
builder.InsertBreak(BreakType.PageBreak);
builder.InsertBreak(BreakType.PageBreak);
builder.InsertBreak(BreakType.PageBreak);
builder.Write("This is the last page");
builder.StartBookmark(bkName);
builder.EndBookmark(bkName);

doc.Save(@"C:\Temp\out.docx");

You can create hidden bookmarks by using bookmark names started from underscore _.

The table is generated using foreach in that case the data is dynamic in that case how will I refernce it ?

@Aditya5 There is only one way to reference some place in the document, as described above, i.e. insert a bookmark in the place where hyperlink should follow and insert the appropriate hyperlink to this bookmark. Using LINQ Reporting Engine you can dynamically insert hyperlinks as well as you can dynamically insert bookmarks.

In the above case for tables, how can i reference it dynamically in a paragraph, could you help me with some example code for the scenerio.

@Aditya5 Could you please provide you sample data, template, and expected output? This will help us to better understand your requirements and help you.