Partager via


Visual Basic Reference

DataReport Object

See Also    Example    Properties    Methods    Events

The DataReport object is the programmable object that represents the Data Report designer.

Syntax

DataReport

Remarks

The Data Report generates reports using records from a database. To use it:

  1. Configure a data source, such as the Microsoft Data Environment, to access a database.

  2. Set the DataSource property of the DataReport object to the data source.

  3. Set the DataMember property of the DataReport object to a data member.

  4. Right-click the designer and click Retrieve Structure.

  5. Add appropriate controls to the appropriate sections.

  6. Set the DataMember and DataField properties for each control.

  7. 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.