Solved

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

Posted on 2012-03-13
5
285 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

820 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