Report.Run

From Xojo Documentation

Method

Report.Run(ds as Reports.DataSet, printerSettings as PrinterSetup) As Boolean

Supported for all project types and targets.

Generates a report document from the given dataset.


Method

Report.Run(rs as RecordSet, printersettings as PrinterSetup) As Boolean

New in 2010r3

Supported for all project types and targets.

Generates a Report document from the given RecordSet. This eliminates the need to first convert a RecordSet to a RecordSetQuery.

Examples

Running a report to obtain the rendered pages in Reports.DataSet:

Dim ds As New GasDataSet
Dim ps As New PrinterSetup
Dim rpt As New GasPricesReport

If rpt.Run(ds, ps) Then
If rpt.Document <> Nil Then ReportViewer1.SetDocument(rpt.Document)
End If