Hello. I am experiencing serious trouble creating a proper table of contents (toc) in my ARIS reports. I use the scripting editor for doing this. The input is a set of EPC models, and the output is a set of Word or PDF documents (one for each model).
The script uses three sections. The second section writes the TOC page
// the variable out holds the ArisOutput object
out.BeginSection(false, Constants.SECTION_COVER);
// coverpage goes here...
out.EndSection();
out.BeginSection(false, Constants.SECTION_INDEX);
// TOC code goes here:
out.BeginTable(100, Constants.C_DARK_GREEN, Constants.C_TRANSPARENT, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0);
out.TableRow();
out.SetFrameStyle(Constants.FRAME_TOP, 30);
out.SetFrameStyle(Constants.FRAME_LEFT, 30);
out.SetFrameStyle(Constants.FRAME_RIGHT, 30);
out.SetFrameStyle(Constants.FRAME_BOTTOM, 30);
out.TableCellF("TABLE OF CONTENTS", 100, Layouts.CONTENTS_PAGE_TITLE);
out.EndTable("", 100, "Arial", 10, Constants.C_DARK_GREEN, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0);
out.OutputLnF("", Layouts.NORMAL);
out.SetAutoTOCNumbering(true);
out.OutputField(Constants.FIELD_TOC, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, Constants.FMT_LEFT);
out.EndSection();
// Finally, we draw the contents:
out.BeginSection(false, Constants.SECTION_DEFAULT);
// ...
out.EndSection();
As far as I can see, this is done correctly. The toc is output to the document, but the page numbers are not updated! So for each heading in the toc, the page no. is the same all the way down. Very frustrating!
Any ideas on how to solve this problem? I am using ARIS IT Architect 7.1.0.423484
Rahul Nagar on
Problem with Auto Table of Content for Word document
Hello all, we are experiencing problem with generating Automatic Table of Content for MS Word document using ARIS methods.
VEA Script for Auto-TOC generation:
Following is the code snippet that we are using to generate the Auto-TOC.
ARIS Standard Script for Auto-TOC:
TOC with Script designer (WYSIWYG):
NOTE: This issue is only with Word(.DOC) and Rich Text File(.RTF) document, for PDF page numbering is perfect.