Generating TOC in Word Doc

sharad
edited February 11, 2022 in Analytics #1
Hello,
I would like to know how to generate the TOC for the entire word doc using BIRT designer.
I am able to TOC to individual element in the layout but those TOCs are appearing to particular element only and not appearing at the start of the doc.
Please let me know if you have any suggestions.

Thanks,

Regards,
Sharad

Comments

  • thuston
    edited December 31, 1969 #2
    The Bookmarks (TOC) will be automatically created for PDF.

    If you want a true TOC page, you will have to script controls to populate their pagenumber in some global storage at Create and then the TOC controls can collect the values OnRender.
  • sharad
    edited October 14, 2010 #3
    <blockquote class='ipsBlockquote' data-author="'thuston'" data-cid="69359" data-time="1287063675" data-date="14 October 2010 - 06:41 AM"><p>
    The Bookmarks (TOC) will be automatically created for PDF.<br />
    <br />
    If you want a true TOC page, you will have to script controls to populate their pagenumber in some global storage at Create and then the TOC controls can collect the values OnRender.<br /></p></blockquote>
    <br />
    Hello Thuston,<br />
    I need to generate TOC in a word doc. Can you please elaborate on how to achieve it?<br />
    Thanks in advance,<br />
    Regards,<br />
    Sharad
  • thuston
    edited December 31, 1969 #4
    Here's an example you may be able to use.
  • thuston
    edited December 31, 1969 #5
    Here's an example you may be able to use.
  • sharad
    edited October 18, 2010 #6
    Hello Thuston,
    Thanks for the example. I have gone through the same and found that it is not actually an TOC. It is a regular table with hyperlinks to various fields in the file. Actual TOC will have 'Update Field' and 'Edit Field' options in the right click as in the attached sample.

    Also, I need to add all headings[upto level 3] present in my file to TOC.

    Please let me know if my requirement is not clear. Thanks in advance.

    Regards,
    Sharad
  • nandhar
    edited October 18, 2010 #7
    I'm trying to include page numbers on the TOC of my BIRT report using BIRT 2.3.
    Something like this:

    Subject A..........................1
    Subject B..........................2
    Subject C..........................3

    can you please guide me on this

    thanks
    nandha
  • sharad
    edited December 31, 1969 #8
    Hello Nandha,
    Page number option is available in Master Page however only header and footer of document can be modified in a Master Page view.

    Can you tell me how did you add the below elements in TOC? also, are you getting Update Field' and 'Edit Field' options when you right click on below TOC?
    Subject A
    Subject B
    Subject C


    Thanks and Regards,
    Sharad
  • nandhar
    edited December 31, 1969 #9
    Hi Sharad,
    Actually i need to add TOC on my final page of report(pdf) in the below format.
    The subject (A,B,C) can be mentioned as static label but the contents for A,B,C is dynamically
    retrieved from back end. After printing all the contents of A,B and C.. then the TOC should filled with respective page numbers and links for the respective content.
    I have started to add tables and groups(TOC expression) and am not sure whether am in right bath
    and expecting some help for this approach. Please give some instruction to take with this..

    Subject A..........................1
    Subject B..........................2
    Subject C..........................3

    Thanks
    Nandha..
  • sharad
    edited December 31, 1969 #10
    Thanks Nandha.
    For me TOC is coming fine in PDF in the Bookmarks section. But actually I am trying to generate TOC in a Word Doc and No Success.
    Has anyone tried this before?

    Regards,
    Sharad
  • nandhar
    edited December 31, 1969 #11
    Hi Sharad,
    could you please send me the sample report design that it generates TOC and its page number in PDF format?

    Thanks in advance.
  • sharad
    edited December 31, 1969 #12
    Hello Nandha,
    I am getting the bookmarks in pdf file in a separate boookmarks pane. Not in the actual output file.

    Regards,
    Sharad
  • kosta
    edited December 31, 1969 #13
    Hello all,<br />
    <br />
    I have downloaded the zip-File and tried in my BIRT designer but they don't work for the 2.6.1. <br />
    <br />
    "TOC Report.rptdesign". On the preview tab I always get error like :<br />
    <pre class='_prettyXprint _lang-auto _linenums:0'>The following items have errors:


    Data (id = 304):
    + There are errors evaluating script "var map = reportContext.getPersistentGlobalVariable("tocMap");

    this.setDisplayValue(map.get(this.getValue()));":
    TypeError: Cannot call method "get" of null (/report/body/table[@id=&quot;277"]/group[@id=&quot;294"]/header/row[@id=&quot;295"]/cell[@id=&quot;297"]/data[@id=&quot;304"]/method[@name=&quot;onRender"]#3)</pre>
    <br />
    "TablePageNumberv10.rptdesign". On the preview tab I always get error like :<br />
    <pre class='_prettyXprint _lang-auto _linenums:0'>The following items have errors:


    Data (id = 252):
    + There are errors evaluating script "var map = reportContext.getPersistentGlobalVariable( "pageNumMap" );
    this.setDisplayValue( map.get( 'Table1' ) );":
    TypeError: Cannot call method "get" of null (/report/body/table[@id=&quot;9"]/detail/row[@id=&quot;203"]/cell[@id=&quot;204"]/grid[@id=&quot;213"]/row[@id=&quot;218"]/cell[@id=&quot;222"]/data[@id=&quot;252"]/method[@name=&quot;onRender"]#2)

    Data (id = 253):
    + There are errors evaluating script "var map = reportContext.getPersistentGlobalVariable( "pageNumMap" );
    this.setDisplayValue( map.get( 'Table2' ) );":
    TypeError: Cannot call method "get" of null (/report/body/table[@id=&quot;67"]/detail/row[@id=&quot;193"]/cell[@id=&quot;194"]/grid[@id=&quot;225"]/row[@id=&quot;230"]/cell[@id=&quot;236"]/data[@id=&quot;253"]/method[@name=&quot;onRender"]#2)

    Data (id = 254):
    + There are errors evaluating script "var map = reportContext.getPersistentGlobalVariable( "pageNumMap" );
    this.setDisplayValue( map.get( 'Table3' ) );":
    TypeError: Cannot call method "get" of null (/report/body/table[@id=&quot;125"]/detail/row[@id=&quot;183"]/cell[@id=&quot;184"]/grid[@id=&quot;237"]/row[@id=&quot;242"]/cell[@id=&quot;248"]/data[@id=&quot;254"]/method[@name=&quot;onRender"]#2)</pre>
    Warning No formatter is installed for the format ipb
  • hello all, who know how to get thuston ' example on TOC on WORD? thanks