Free Support Forum - aspose.com

Required to generate table of content from SSRS rendering

Hello,

I developed report in SSRS 2005. WHile exporting the report in DOC file using Aspose.word. I required Table of content generate in export doc file.

Please let me know the solution, how i can generate the table of content using SSRS renderning

Hi Abhijit,


Thanks for your inquiry.

Please accept my apologies for late response. Aspose.Words for Reporting Services does not support the creation of TOC feature in RDL. However, Aspose.Words for Reporting Services exports RDL file to following file formats.

  • DOC - Microsoft Word documents
  • DOCX - Office Open XML documents
  • RTF - Rich Text Format documents
  • XML - WordprocessingML documents
  • HTML - Hypertext Markup Language documents
  • MHTML – Web Archive (MIME HTML) documents
  • ODT – OpenOffice/StarOffice documents
  • TXT - Plain Text documents
  • XPS – XML Paper Specification
  • EPUB – Electronic Publications

Please read the features of Aspose.Words for Reporting Services. Moreover, you can insert TOC in exported Doc/Docx by using Aspose.Words for .NET. The following code snippet shows how to insert a Table of contents (TOC) into a document at a specific bookmark.

Document doc = new Document(@“Test001\Input.docx”);

DocumentBuilder builder = new DocumentBuilder(doc);

// Move DocumentBuilder cursor to the BookMark.

builder.MoveToBookmark(“BookMark”);

builder.InsertTableOfContents("\o “1-3” \n \h \z \u");

builder.InsertBreak(BreakType.PageBreak);

doc.UpdateFields();

doc.Save(@“Test001\out.docx”);



Hope this answers your query. Please let us know, If you have any more queries.