Dynamically updating report content

Posted by: scottn on 4 August 2017, 2:37 pm EST

  • Posted 4 August 2017, 2:37 pm EST

    I have a report that contains several subreports.  After I render the report to the active viewer, I would like to be able to dynamically update the content of a subreport, based on user input, without having to recreate the entire report.  Is this possible?
  • Replied 4 August 2017, 2:37 pm EST

    You can use the canvas/page drawing methods without having to rerun a report. But I wouldn't call those dynamic content, just static overlays.
  • Replied 4 August 2017, 2:37 pm EST

    I've tried numerous ways to update the canvas, but I can't get anything new to display.  Do you have an example?
  • Replied 4 August 2017, 2:37 pm EST

    Sometimes the accounting department needs to view and/or reprint invoices for various reasons, this method here marks them as such.

    As you can see it does really change anything on the report, just puts more over the top of whatever else is already there.

    <font face="Courier New"> Dim rptI As rptInvoice
    Dim cvPage As Canvas

       rptI.Run False</font>

    <font face="Courier New">    If rptI.Pages.Count > 0 Then
            For Each cvPage In rptI.Pages
                cvPage.TextAngle = 450
                cvPage.ForeColor = &HE0E0E0
                cvPage.Font.Name = "Arial"
                cvPage.Font.Size = 60
                cvPage.DrawText "Copy", 3 * 1440, 1.5 * 1440, 3 * 1440, 4 * 1440
                cvPage.DrawText "Copy", 3 * 1440, 8 * 1440, 3 * 1440, 4 * 1440
        End If

       rptI.Show 1, Me</font>

Need extra support?

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

Learn More

Forum Channels