by Matthew Saayman (2 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating:
(6 Votes)
This program demonstrates the use of Crystal Reports 7 in a VB application. The connection and data retrieval is made in the VB app and not with crystal reports.
Assumes
The report is designed in Crystal reports using a SQL/ODBC (Active Data Field Definition Only) data source. Crystal Reports then lets you define your data source and saves in a .ttx file. The fields must be defined in the order of the fields in the recordset that you will pass to the report. This TTX file can be edited with notepad. The field name, type and length columns are seperated by a tab character.
1. Add an Crystal Reports 7 ActiveX Designer to your project and import your Crystal reports that was designed in the way.
2. Add the frmReportView Form to your projects.
3. Create a recordset with the relevant fields.
4. Load the frmReportView Form.
5. Call the RepInit function.
Download Crystal Reports Demo (52 KB)