Passing Recordset to the Viewer Control

Posted by: jayankmathew on 4 August 2017, 2:43 pm EST

  • Posted 4 August 2017, 2:43 pm EST

    How to pass a recodset to the viewer control?
    thanks in advance.

  • Replied 4 August 2017, 2:43 pm EST

    The viewer control only views a generated report.  It does not process any data.  See the following helpfile article to pass a recordset to a report:
    http://www.datadynamics.com/Help/AR2/AR2Std/HX_OLEDB_RecordSet.html
  • Replied 4 August 2017, 2:43 pm EST

    thanks Peter, it works!
  • Replied 4 August 2017, 2:43 pm EST

     Peter V wrote:
    The viewer control only views a generated report.  It does not process any data.  See the following helpfile article to pass a recordset to a report:
    http://www.datadynamics.com/Help/AR2/AR2Std/HX_OLEDB_RecordSet.html


    This link is no longer valid.  Can you point me to the current link?

    Thanks
  • Replied 4 August 2017, 2:43 pm EST

    Maybe this is a link to the Recordset property of the ADO control in the Reference. Do you want to set the data control to a RecordSet you have:

    Private Sub PrintOrder(lOrderID As Long)

        Dim rs As Recordset
        ' Print a specific order based on a parameter

        sSQL = "SELECT * FROM Invoice WHERE OrderID = " & _
    Str(lOrderID)
        Set rs = dbOrderSystem.OpenRecordset(sSQL)
        Load rptOrders
        ' Set the recordset property to our VB recordset
        Set rptOrders.dcRptData.Recordset = rs
        ' Print the report
        rptOrders.PrintReport

    End Sub


Need extra support?

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

Learn More

Forum Channels