How to Create a HTML Data Report from an ActiveReport via Automation, Complete with a Table of Contents (TOC) and Links from the TOC to Bookmarks (Targets) in the HTML Report

Posted by: david-ward on 4 August 2017, 2:59 pm EST

  • Posted 4 August 2017, 2:59 pm EST

    <FONT face=Arial>This message is posted for interest only and may benefit some users.</FONT>


    <B><SPAN>Article: <o:p></o:p></SPAN></B>


    <B><SPAN><o:p> </o:p></SPAN></B>

    <B><SPAN>

    <B><SPAN>How to Create a HTML Data Report from an ActiveReport via Automation, Complete with a Table of Contents (TOC) and Links from the TOC to Bookmarks (Targets) in the HTML Report<o:p></o:p></SPAN></B>


    </SPAN></B><SPAN><o:p> </o:p></SPAN>


    <B><SPAN>David Ward<o:p></o:p></SPAN></B>


    <B><SPAN>dcward@pfpnet.com<o:p></o:p></SPAN></B>


    <B><SPAN><o:p> </o:p></SPAN></B>


    <B><SPAN>Introduction<o:p></o:p></SPAN></B>


    <SPAN>Consider the situation where you have a business which sells hundreds of products and the inventory is recorded in a database table (recordset). A data report of the inventory is produced regularly using ActiveReports which is normally 50+ pages long. The products in this inventory report are listed in Groups and Subgroups with a table of contents in the data report window (AR Viewer) which links to the Groups and Subgroups in the report.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>The report can be exported to .pdf file format and the TOC also passes across to the .pdf file format. A .pdf file can be uploaded to a web site which customers can download, but it requires customers to have a .pdf viewer software installed (Adobe or PDF Converter).<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>The preference is to have the inventory report exported to HTML file format (*.htm) which is uploaded to the web site. A .htm file fits better with the requirements of the web site, with hyperlinks from the products listed in the report to other web pages giving detailed product information.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>However a problem with exporting an ActiveReport to .htm file format is the TOC does not transfer across. This can make it difficult to locate an inventory Group or Subgroup and the products listed within, especially if the .htm file is large.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>This article describes a method by which to create a TOC for an .htm file with hyperlinks from the TOC text items to bookmarks or targets adjacent to the Groups and Subgroups within the .htm file. The entire process occurs via automation at the time the data report (ActiveReport) is exported to .htm file format, and requires no further editing of the underlying HTML code.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>The sample below assumes you have a project on hand where the process can be applied.<o:p></o:p></SPAN>


    <B><SPAN><o:p> </o:p></SPAN></B>


    <B><SPAN>Step 1: Create 2 Collections<o:p></o:p></SPAN></B>


    <SPAN>In a VB project add 2 collection object variables to a code module (.bas module):<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Public colHTMStrings1<SPAN>       </SPAN>As Collection<o:p></o:p></SPAN>


    <SPAN>Public colHTMStrings2<SPAN>       </SPAN>As Collection<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>While a dynamic array could be used instead of the above collections, the use of collections is simply the author’s choice and avoids the need to continually Redim an array.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <B><SPAN>Step 2: Imbed a TOC for the .htm file in the ActiveReport<o:p></o:p></SPAN></B>


    <SPAN>A TOC in a .htm file has to be included in the main window and form part of the report the same as a TOC in a book occurs at the front of a book.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Assume an inventory report with 2 group header sections. GroupHeader1 groups the Group field data, and GroupHeader2 groups the Subgroup field data. Groups are listed alphabetically. Sub groups within Groups are also listed alphabetically, as are Products listed within Subgroups.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>A TOC occurring near the top of an .htm file contains only Groups and Subgroups field data, each Group and Subgroup listed only once. Subgroups text is indented from the Groups text, and all lines of text in the TOC act as hyperlinks to bookmarks elsewhere in the .htm file.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>A TOC as outlined above is easiest achieved by using a sub report linked via a sub report control in the main report. In the authors case the sub report is called rptProdIndex and includes a GroupHeader section. The GroupHeader section links to the Groups field, and the Detail section is used to show the Subgroup items.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>(The sub report control in the parent report is inserted near the bottom of the Report Header section and activated via normal means.)<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>In the sub report the author uses the following<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Option Explicit<o:p></o:p></SPAN>


    <SPAN>Private cADO<SPAN>            </SPAN><SPAN>     </SPAN>As clsADODB<o:p></o:p></SPAN>


    <SPAN>Public Database<SPAN>         </SPAN><SPAN>   </SPAN>As String<o:p></o:p></SPAN>


    <SPAN>Public DatabasePath<SPAN>     </SPAN>As String<o:p></o:p></SPAN>


    <SPAN>Private UseHyperlinks<SPAN>   </SPAN>As Boolean<o:p></o:p></SPAN>


    <SPAN>Public Filter<SPAN>           </SPAN><SPAN>         </SPAN>As String<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Private Sub ActiveReport_ReportStart()<o:p></o:p></SPAN>


    <SPAN>On Error GoTo vbError<o:p></o:p></SPAN>


    <SPAN>UseHyperlinks = frmInventory.bUseHyperlinks<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>If UseHyperlinks Then<o:p></o:p></SPAN>


    <SPAN>txtMainGroup.ForeColor = &HFF0000<o:p></o:p></SPAN>


    <SPAN>txtSubGroup.ForeColor = &HFF0000<o:p></o:p></SPAN>


    <SPAN>End If<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Set cADO = New clsADODB<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN><SPAN>    </SPAN>With cADO<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>.Database = Database<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>.DatabasePath = DatabasePath<o:p></o:p></SPAN>


    <SPAN><SPAN>  </SPAN><SPAN>  </SPAN>If Filter <> "" Then<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>.Recordsource = "SELECT DISTINCTROW MainGroup, SubGroup From Inventory WHERE " & Filter & " Group By MainGroup, SubGroup"<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>Else<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>.Recordsource = "SELECT DISTINCTROW MainGroup, SubGroup From Inventory " & _<o:p></o:p></SPAN>


    <SPAN><SPAN>                 </SPAN><SPAN>   </SPAN>"Group By MainGroup, SubGroup"<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>End If<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>.OpenRecordset adUseClient, adOpenDynamic, adLockOptimistic<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>Set DC1.Recordset = .Recordset<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>End With<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN><o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>txtMainGroup.DataField = "MainGroup"<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>txtSubGroup.DataField = "SubGroup"<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN>GroupHeader1.DataField = "MainGroup"<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN><o:p></o:p></SPAN>


    <SPAN>Exit Sub<o:p></o:p></SPAN>


    <SPAN>vbError:<o:p></o:p></SPAN>


    <SPAN>cADO.Error<o:p></o:p></SPAN>


    <SPAN>Resume Next<o:p></o:p></SPAN>


    <SPAN>End Sub<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Private Sub ActiveReport_ReportEnd()<o:p></o:p></SPAN>


    <SPAN>On Error GoTo vbError<o:p></o:p></SPAN>


    <SPAN>If Not cADO.Connection Is Nothing Then<o:p></o:p></SPAN>


    <SPAN>cADO.Connection.Close<o:p></o:p></SPAN>


    <SPAN>Set cADO.Connection = Nothing<o:p></o:p></SPAN>


    <SPAN>End If<o:p></o:p></SPAN>


    <SPAN>cADO.CloseADODB<o:p></o:p></SPAN>


    <SPAN>Set cADO = Nothing<o:p></o:p></SPAN>


    <SPAN>Exit Sub<o:p></o:p></SPAN>


    <SPAN>vbError:<o:p></o:p></SPAN>


    <SPAN>cADO.Error<o:p></o:p></SPAN>


    <SPAN>End Sub<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Private Sub Detail_Format()<o:p></o:p></SPAN>


    <SPAN>On Error GoTo vbError<o:p></o:p></SPAN>


    <SPAN>If UseHyperlinks Then txtSubGroup.Hyperlink = "#" & txtMainGroup.Text & txtSubGroup.Text<o:p></o:p></SPAN>


    <SPAN>Exit Sub<o:p></o:p></SPAN>


    <SPAN>vbError:<o:p></o:p></SPAN>


    <SPAN>cADO.Error<o:p></o:p></SPAN>


    <SPAN>End Sub<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Private Sub GroupHeader1_Format()<o:p></o:p></SPAN>


    <SPAN>On Error GoTo vbError<o:p></o:p></SPAN>


    <SPAN>If UseHyperlinks Then txtMainGroup.Hyperlink = "#" & txtMainGroup.Text<o:p></o:p></SPAN>


    <SPAN>Exit Sub<o:p></o:p></SPAN>


    <SPAN>vbError:<o:p></o:p></SPAN>


    <SPAN>cADO.Error<o:p></o:p></SPAN>


    <SPAN>End Sub<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Don’t take too much notice of some of the above code. clsADODB is only a wrapper class used by the author to manage </SPAN><SPAN>ADO</SPAN><SPAN> recordsets. cADO is only an instance of this wrapper class.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>What is important is to note the SQL syntax to return the required Group and Subgroup headings from the recordset and how it is displayed in the sub report.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>The other important point to note is how the hyperlinks are created on the txtMainGroup and txtSubGroup. <o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>The txtMainGroup hyperlink is created by using the Group data from the recordset, preceeded with the # character.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>The txtSubGroup hyperlink is created by appending the Subgroup data to the Group data from the recordset and preceeding with the # character.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>By using the above technique, every hyperlink in the TOC will be unique and automatically correlate with Group and Subgroup field data and point to a target in the parent report.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <B><SPAN>Step 3: Preliminary Setting up the Bookmarks (Targets) in the Main Report (Parent report)<o:p></o:p></SPAN></B>


    <SPAN>In the parent report the GrouperHeader1 section shows the Groups, and the GroupHeader2 section shows the Subgroups. Each of these sections contains a text box named txtGroup and txtSubGroup respectively. (The Detail section shows the Product Names via txtProductName.)<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Initially the Groups and Subgroups text boxes have to be set up with normal hyperlinks. The hyperlink HTML code (HTML syntax) is added to the colHTMStrings1 collection. The required bookmark or target HTML code (also HTML syntax) is added to the colHTMStrings2 collection.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>As with the TOC hyperlinks, the target hyperlinks use the Group and Subgroup field data respectively, but do not include the # character.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Private Sub ActiveReport_ReportStart()<o:p></o:p></SPAN>


    <SPAN>.<o:p></o:p></SPAN>


    <SPAN>.<o:p></o:p></SPAN>


    <SPAN>Set colHTMStrings1 = New Collection<o:p></o:p></SPAN>


    <SPAN>Set colHTMStrings2 = New Collection<o:p></o:p></SPAN>


    <SPAN>.<o:p></o:p></SPAN>


    <SPAN>.<o:p></o:p></SPAN>


    <SPAN>End Sub<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Private Sub GroupHeader1_Format()<o:p></o:p></SPAN>


    <SPAN>TOC.Add txtGroup.Text<o:p></o:p></SPAN>


    <SPAN>txtGroup.Hyperlink = txtGroup.Text<o:p></o:p></SPAN>


    <SPAN>colHTMStrings1.Add "<A HREF=" & Chr$(34) & txtGroup.Text & Chr$(34) & ">"<o:p></o:p></SPAN>


    <SPAN>colHTMStrings2.Add "<A NAME=" & Chr$(34) & txtGroup.Text & Chr$(34) & ">"<o:p></o:p></SPAN>


    <SPAN>End Sub<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Private Sub GroupHeader2_Format()<o:p></o:p></SPAN>


    <SPAN>TOC.Add txtGroup.Text & "\" & txtSubGroup.Text<o:p></o:p></SPAN>


    <SPAN>txtGroup.Hyperlink = txtGroup.Text & txtSubGroup.Text<o:p></o:p></SPAN>


    <SPAN>colHTMStrings1.Add "<A HREF=" & Chr$(34) & txtGroup.Text & txtSubGroup.Text & Chr$(34) & ">"<o:p></o:p></SPAN>


    <SPAN>colHTMStrings2.Add "<A NAME=" & Chr$(34) & txtGroup.Text & txtSubGroup.Text & Chr$(34) & ">"<o:p></o:p></SPAN>


    <SPAN>End Sub<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>The Chr$(34) is the double quote character. “<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>HREF means hyperlink reference in HTML<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>NAME means a target in HTML<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <B><SPAN>Step 4: Form Module Code (Cleaning the HTML Code)<o:p></o:p></SPAN></B>


    <SPAN>Assume in a Form Module, you a viewing database inventory records, and these records may be filtered to show only a subset of records you want sent to the data report and on to an .htm file ready for deploying to a website. All you want to do is click 1 command button to create the .htm file ready to go:<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Private Sub cmdCreateMainHTML_Click()<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Dim i <SPAN>     </SPAN><SPAN>         </SPAN>As Integer<o:p></o:p></SPAN>


    <SPAN>Dim rpt <SPAN>  </SPAN><SPAN>        </SPAN>As Object<o:p></o:p></SPAN>


    <SPAN>Dim str<SPAN>  </SPAN><SPAN> </SPAN><SPAN>        </SPAN>As String<o:p></o:p></SPAN>


    <SPAN>Dim strHTM<SPAN>  </SPAN><SPAN> </SPAN>As String<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>‘ Product, Retail, Grouped, Corporate format<o:p></o:p></SPAN>


    <SPAN>Set rpt = New rptPrRtGroCorporate<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>'create the report in memory<o:p></o:p></SPAN>


    <SPAN>Load rpt<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>‘using the wrapper class to manage the </SPAN><SPAN>ADO</SPAN><SPAN> recordset (authors choice)<o:p></o:p></SPAN>


    <SPAN>‘other users of AR will have other means<o:p></o:p></SPAN>


    <SPAN>With rpt<o:p></o:p></SPAN>


    <SPAN>.Database = cADO.Database<o:p></o:p></SPAN>


    <SPAN>.DatabasePath = cADO.DatabasePath<o:p></o:p></SPAN>


    <SPAN>.Recordsource = cADO.Recordsource<o:p></o:p></SPAN>


    <SPAN>.Filter = cADO.FilterString<o:p></o:p></SPAN>


    <SPAN>End With<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>rpt.Run False<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>If Not rpt Is Nothing Then<o:p></o:p></SPAN>


    <SPAN>'export the report to html<o:p></o:p></SPAN>


    <SPAN>Dim html As ActiveReportsHTMLExport.HTMLExport<o:p></o:p></SPAN>


    <SPAN>Set html = New ActiveReportsHTMLExport.HTMLExport<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>html.FileNamePrefix = txtFileName.Text<o:p></o:p></SPAN>


    <SPAN>html.HTMLOutputPath = lblFolder.Caption & "\"<o:p></o:p></SPAN>


    <SPAN>html.Title = txtFileName.Text & ".htm"<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>If rpt.Pages.Count > 0 Then<o:p></o:p></SPAN>


    <SPAN>html.Export rpt.Pages ‘creates the initial .htm file<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>'for grouped reports change hyperlinks to targets<o:p></o:p></SPAN>


    <SPAN>‘open file for input<o:p></o:p></SPAN>


    <SPAN>Open lblFolder.Caption & "\" & txtFileName.Text & ".htm" For Input As #1<o:p></o:p></SPAN>


    <SPAN>str = ""<o:p></o:p></SPAN>


    <SPAN>Do While Not eof(1)<SPAN>   </SPAN>' Loop until end of file.<o:p></o:p></SPAN>


    <SPAN>Input #1, strHTM<SPAN>  </SPAN><SPAN> </SPAN>' Read data<o:p></o:p></SPAN>


    <SPAN>str = str & strHTM & vbCrLf<o:p></o:p></SPAN>


    <SPAN>Loop</SPAN><SPAN><o:p></o:p></SPAN>


    <SPAN>Close #1<SPAN>   </SPAN>' Close file.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>‘the HTML text of the .htm file is now in a string variable str<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>‘modify the str variable so that hyperlinks are converted to targets<o:p></o:p></SPAN>


    <SPAN>For i = 1 To colHTMStrings1.Count<o:p></o:p></SPAN>


    <SPAN>str = Replace(str, colHTMStrings1(i), colHTMStrings2(i))<o:p></o:p></SPAN>


    <SPAN>Next<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>‘open for output<o:p></o:p></SPAN>


    <SPAN>Open lblFolder.Caption & "\" & txtFileName.Text & ".htm" For Output As #1 <o:p></o:p></SPAN>


    <SPAN>Print #1, str<SPAN>   </SPAN>' Print str to file<o:p></o:p></SPAN>


    <SPAN>Close #1<SPAN>   </SPAN>' Close file.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Set colHTMStrings1 = Nothing<o:p></o:p></SPAN>


    <SPAN>Set colHTMStrings2 = Nothing<o:p></o:p></SPAN>


    <SPAN>End If<o:p></o:p></SPAN>


    <SPAN><SPAN>       </SPAN><SPAN>     </SPAN><o:p></o:p></SPAN>


    <SPAN>MsgBox "HTML file " & txtFileName.Text & " .htm has been successfully created.", _<o:p></o:p></SPAN>


    <SPAN><SPAN>            </SPAN>vbInformation, "Done"<o:p></o:p></SPAN>


    <SPAN>End If<o:p></o:p></SPAN>


    <SPAN><SPAN>    </SPAN><o:p></o:p></SPAN>


    <SPAN>Set rpt = Nothing<o:p></o:p></SPAN>


    <SPAN>Set html = Nothing<o:p></o:p></SPAN>


    <SPAN>End If<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>End Sub<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>The actual flow of the process is simple. A .htm file is only a specialized text file where the text is in HTML. The file identifier .htm is recognized by a web browser which reads the HTML text, processes it and sends the output to a web browser window.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>All that is happening with the sub procedure above is the data report is being exported to a .htm file. The text of this .htm file is then read into a string variable (str) which is modified using the Replace function to replace selected hyperlink substring text with target substring text. The modified str string is then read back into the .htm file.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>The process is reasonably fast. The slowest part is reading the .htm file text into the str variable, which requires about 0.5 to 1 second for each page of the data report. There may be better ways to achieve this, so please let me know.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <B><SPAN>Creating Reverse Hyperlinks<o:p></o:p></SPAN></B>


    <SPAN>It follows when viewing a group or subgroup in the .htm data report you want to click a hyperlink to return back to the TOC at the top of the file. This is an alternative to using the scroll bar on the right side of the screen in the web browser window.<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>In the GroupHeader2 section place a second text box and set it’s forecolor to &H00FFFFFF& and text to <SPAN>Contents Menu<o:p></o:p></SPAN></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>Also in the txtContentsMenu properties window set it’s hyperlink property to #Page1<o:p></o:p></SPAN>


    <SPAN><o:p> </o:p></SPAN>


    <SPAN>This will create a hyperlink back to page 1, which is where the TOC is located.</SPAN>


    <SPAN>Cheers</SPAN>


    <SPAN>Dave</SPAN>

  • Replied 4 August 2017, 2:59 pm EST

    <div class="Section1">

    <font face="Times New Roman" size="3"><span>Thanks a lot Dave for the nice article; I am sure many users will find it very useful. You can
    also submit it to ActiveReports 2 knowledgebase here.
    </span></font>


    <font face="Arial" size="2"><span> </span></font>

    </div>
  • Replied 4 August 2017, 2:59 pm EST

    Ali


    Thanks for your reply. Not sure how to place it in the AR2 kb section. I'll leave it up to you.


    Regards


    Dave Ward

  • Replied 4 August 2017, 2:59 pm EST

    I posted it and it will be included in the knowledgebase pending a review by our documentation team. If you go to the knowledgebase forum, don't you find a post button?

    Thanks again for the article.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels