From Xojo Documentation

Revision as of 18:56, 19 November 2009 by WikiSysop (talk) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Used to generate reports.

Super Class



Name Type Description
Document Reports.RBReportDocument Contains the rendered pages after the report is Run.


Name Parameters Return Type Description
Run ds as Reports.DataSet, printerSettings as PrinterSetup Boolean Generates a report document from the given dataset.


Name Parameters Description
Report units as Report.Units The units that the report uses. The default is Reports.Units.Pixels.


See the "Reports" chapter in the User's Guide for a description of the visual Report Layout Editor and the two example projects that are included with REALbasic.

There are two example projects that illustrate the reporting engine. The Gas Report project uses a text file as its data source and Example Database uses a REAL SQL Server relational database as its data source. In other respects, the two projects are very similar.

The Gas Prices project uses the DataSet interface to obtain the data from the text file, while the Example Project uses Reports.RecordSetQuery to obtain the data from a RecordSet.


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 )

See Also

Reports module; RBReportDocument, ReportField, ReportLabel, ReportLineShape, ReportOvalShape, ReportRectangleShape, ReportRoundRetangleShape. ReportPicture classes.