Solved

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

Posted on 2012-03-13
5
284 Views
Last Modified: 2012-03-30
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
Comment
Question by:dimensionav
  • 3
  • 2
5 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 37715578
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
 

Author Comment

by:dimensionav
ID: 37715941
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
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 500 total points
ID: 37716598
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 37717914
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
 

Author Closing Comment

by:dimensionav
ID: 37788120
Sorry for this later response, I will try previous examples and let you know in a further question
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question