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

    <BLOCKQUOTE><table width="85%"><tr><td class="txt4"><img src="/wp-content/uploads/CS_images/icon-quote.gif"> Peter V wrote:</td></tr><tr><td class="quoteTable"><table width="100%"><tr><td width="100%" valign="top" class="txt4">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
    </td></tr></table></td></tr></table></BLOCKQUOTE>

    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:

    <font face="Courier New">Private Sub PrintOrder(lOrderID As Long)
    </font>

    <font face="Courier New">    Dim rs As Recordset
        ' Print a specific order based on a parameter
    </font>

    <font face="Courier New">    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
    </font>

    <font face="Courier New">End Sub</font>


Need extra support?

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

Learn More

Forum Channels