?
Solved

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

Posted on 2012-03-13
5
Medium Priority
?
288 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 101

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 101

Assisted Solution

by:mlmcc
mlmcc earned 2000 total points
ID: 37716598
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month10 days, 21 hours left to enroll

770 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