Generating TOC in Word Doc

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

  • thustonthuston Member
    edited December 31, 1969
    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.
  • edited October 14, 2010


    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.




    Hello Thuston,

    I need to generate TOC in a word doc. Can you please elaborate on how to achieve it?

    Thanks in advance,

    Regards,

    Sharad
  • thustonthuston Member
    edited December 31, 1969
    Here's an example you may be able to use.
  • thustonthuston Member
    edited December 31, 1969
    Here's an example you may be able to use.
  • edited October 18, 2010
    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
  • edited October 18, 2010
    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
  • edited December 31, 1969
    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
  • edited December 31, 1969
    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..
  • edited December 31, 1969
    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
  • edited December 31, 1969
    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.
  • edited December 31, 1969
    Hello Nandha,
    I am getting the bookmarks in pdf file in a separate boookmarks pane. Not in the actual output file.

    Regards,
    Sharad
  • edited December 31, 1969
    Hello all,



    I have downloaded the zip-File and tried in my BIRT designer but they don't work for the 2.6.1.



    "TOC Report.rptdesign". On the preview tab I always get error like :

    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=";277"]/group[@id=";294"]/header/row[@id=";295"]/cell[@id=";297"]/data[@id=";304"]/method[@name=";onRender"]#3)



    "TablePageNumberv10.rptdesign". On the preview tab I always get error like :

    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=";9"]/detail/row[@id=";203"]/cell[@id=";204"]/grid[@id=";213"]/row[@id=";218"]/cell[@id=";222"]/data[@id=";252"]/method[@name=";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=";67"]/detail/row[@id=";193"]/cell[@id=";194"]/grid[@id=";225"]/row[@id=";230"]/cell[@id=";236"]/data[@id=";253"]/method[@name=";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=";125"]/detail/row[@id=";183"]/cell[@id=";184"]/grid[@id=";237"]/row[@id=";242"]/cell[@id=";248"]/data[@id=";254"]/method[@name=";onRender"]#2)
    Regards,

    Kosta
  • hello all, who know how to get thuston ' example on TOC on WORD? thanks

Sign In or Register to comment.