Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reporting in Visual Basic DataReport Designers

Status
Not open for further replies.

johnsheen

Programmer
Sep 24, 2002
1
IE
Hi have being trying to work with HTML Reports but I have found them extreamely Messy to work with. What I would prefere to use is DataReport Designers.

The Problem is that I can figure out how to set them up. ALSO can these type of reports Use SQL Querys generated at run-time to get data from a database (Access) and populate the fields in the Sections of the Report

If anybody has an demo Project that can show this functions and how to see them up I would be forever in debt

Thanks...
 
Yeah you can do all that. The easiest way would probably be to make a DataEnvironment that goes to the table(s) in your Access DB you use. You can then design the report with the proper fields and all that. Then change the query during runtime.
 
Instead of using the Data Environment, you can also use a recordset as the data source. Build your report in the designer and assign your controls to the appropriate columns, but do not assign a DataMember to the controls. Also do not assign a DataMember or a DataSource to the report itself.

You can then retrieve the data through a recordset and assign it to the report like below.

ReportSQLString = "SELECT * FROM ReportTable"
Set DataReportRS = cnDB_Connection.Execute (ReportSQLString, , adCmdText)
Set rptDailyOperatingReport.DataSource = DataReportRS
rptDailyOperatingReport.Show vbModal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top