Visual Basic Reference
The DataReport object is the programmable object that represents the Data Report designer.
The Data Report generates reports using records from a database. To use it:
- Configure a data source, such as the Microsoft Data Environment, to access a database.
- Set the DataSource property of the DataReport object to the data source.
- Set the DataMember property of the DataReport object to a data member.
- Right-click the designer and click Retrieve Structure.
- Add appropriate controls to the appropriate sections.
- Set the DataMember and DataField properties for each control.
- At run time, use the Show method to display the Data Report.
Use the DataReport object to programmatically change the appearance and behavior of the Data Report by changing the layout of each Section object.
The Data Report designer also features the ability to export reports using the ExportReport method. This method allows you to specify an ExportFormat object, from the ExportFormats collection, to use as a template for the report.