TOC With ScriptEditor

Posted by: jasonh on 4 August 2017, 3:02 pm EST

  • Posted 4 August 2017, 3:02 pm EST

    Is there any examples on how to create a TOC with grouping via the script editor in VBScript?
  • Replied 4 August 2017, 3:02 pm EST

    Your example works great, however how would I go about this using the run time designer?  Save the report as a .rpx and load this in the example: SubReportsInEndUserDesigner.  Try to preview the report and see if you get the same error I get: "Fatal Exception in Script Execution".

  • Replied 4 August 2017, 3:02 pm EST

    Attached it a little sample. You just have to remember to access the report object using "rpt" otherwise it is the same as in vb code.



    2007/03/TOCinScript.zip
  • Replied 4 August 2017, 3:02 pm EST

    What is SubReportsInEndUserDesigner? Can you provide me a link to this sample to see this problem.
  • Replied 4 August 2017, 3:02 pm EST

    I cant seem to find where i got the example, it was somewhere on this forum.... Anyways, hopefully it will reproduce the same results for you.

    2007/03/SubReportsInEndUserDesigner.zip
  • Replied 4 August 2017, 3:02 pm EST

    With a little change to the PreviewReport procedure in the sample you posted the error should stop:

    ' ddRpt As Object
    Dim ddRpt As New DDActiveReports2.ActiveReport
    ' Set ddRpt = ard.Report
    ard.SaveToObject ddRpt                                              

    Please try it and let me know if it worked.
  • Replied 4 August 2017, 3:02 pm EST

    Works Great!
Need extra support?

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

Learn More

Forum Channels