Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 Object References for Crystal Reports 9

Status
Not open for further replies.

awhitsel

Programmer
Feb 22, 2001
80
US
I recently installed Crystal Reports 9 on my machine and want to incorporate it into an application that I am working on.

The application originally contained 5 reports that were created in an older version of Crystal Reports.

I am going to create one giant report which will contain the whistles and bells of the original 5 reports and I want to be able to print it out in duplex mode.

1. What object references would I have to bring into VB6 in order to use the Crystal Reports 9 functionality?

2. Would I be able to the existing code from the original Crystal Reports version in the re-write?

Thanks.
 
1. CRAXDRT and the Report Viewer control
2. Maybe. It depends on how you did the integration in the previous program.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
Here is the code that was originally used for calling the Crystal Reports document:

CrystalRep2.ReportFileName = "c:\software\cy485.rpt"
CrystalRep2.Connect = "DSN = XXXXXXXXX;UID = XXXXX;PWD = XXXXXXXX"
CrystalRep2.SQLQuery = " SELECT CY48_REPORT7.COUNTY, CY48_REPORT7.CASENUMBER, CY48_REPORT7.PERP_ID,CY48_REPORT7.NAME,CY48_REPORT8.NAME " & _
" From CY48_REPORT7 CY48_REPORT7, CY48_REPORT8 CY48_REPORT8" & _
" Where CY48_REPORT7.SESSION_NO = " & lf_session & " AND " & _
" CY48_REPORT7.SESSION_NO = CY48_REPORT8.SESSION_NO AND " & _
" CY48_REPORT7.PERP_ID = CY48_REPORT8.PERP_ID "
CrystalRep2.WindowState = crptMaximized
CrystalRep2.CopiesToPrinter = 1
CrystalRep2.Destination = lf_print
CrystalRep2.Action = 1
 
Which Crystal Reports control are you using? The CRPE? The OCX? The RDC?

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
You were using the OCX in the earlier version. I believe Crystal dropped support for the OCX in version 9. You will have to convert your code to use RDC or CRPE if that is the case.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top