Application.CreateReport (Access)
The CreateReport method creates a report and returns a Report object. For example, suppose you are building a custom wizard to create a sales report. You can use the CreateReport method in your wizard to create a new report based on a specified report template.
You can use the CreateReport method when designing a wizard that creates a new report. The CreateReport method open a new, minimized report in report Design view. If the name that you use for the ReportTemplate argument isn't valid, Visual Basic uses the report template specified by the Report Template setting on the Forms/Reports tab of the Options dialog box.
CreateReport (Database, ReportTemplate)
Sub NormalReport()
Dim rpt As Report
Set rpt = CreateReport ' Create minimized report.
DoCmd.Restore ' Restore report.
End Sub
Arguments
Optional arguments
The following arguments are optional
Database (Database) - The name of the database that contains the report template that you want to use to create a report. If you want the current database, omit this argument. If you want to use an open library database, specify the library database with this argument.
ReportTemplate (String) - The name of the report that you want to use as a template to create a new report.