• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 290
  • Last Modified:

How to print information from a query using VB Classic and Crystal Reports

HI

I have the following resources:

1. A query from an access 97 database.
2. A report created in crystal reports based on the previous query and database.
3. VB Classic as the language of development.

The idea is create some code that can print that query into the CR Report using a VB Classic DLL from a software that calls it.

Regards.
0
dimensionav
Asked:
dimensionav
  • 3
  • 2
2 Solutions
 
mlmccCommented:
The first step is to build the report in Crystal using the query or tables as the data source.
Once the report is built you can write an application to display/print/export the report.

What version of Crystal do you have?

mlmcc
0
 
dimensionavAuthor Commented:
The report has been created as you described with crystal reports 9.2
I would like to see an example of how to print a report like this.

Thanks.
0
 
mlmccCommented:
Here is very simple code that should work

Dim  crApp As CRAXDRT.Application
Dim  crRpt As CRAXDRT.Report

   Set crApp = New CRAXDRT.Application
   Set crRpt = crApp.OpenReport(ReportPath & "YourReportFile.rpt", 1)
   crRpt.PrintOut

mlmcc
0
 
dimensionavAuthor Commented:
Sorry for this later response, I will try previous examples and let you know in a further question
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now