Solved

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

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now