PDA

Click to See Complete Forum and Search --> : Help opening a Crystal Report (v10.0) VB6.0


kchisley
Jan 13th, 2006, 12:01 PM
My code is:

Sub OpenReport()

Dim CR_CustomApp As New CRAXDRT.Application
Dim CR_CustomReport As CRAXDRT.Report


Set CR_CustomReport = CR_CustomApp.OpenReport("c:\test.rpt", 1)

End Sub



When I run it, it completes, but the report is not opened. Any suggestions please?

Pasvorto
Jan 16th, 2006, 02:34 PM
This is the code I used in CR 9. Maybe it is close. It appears that you don't actually execute the report, only assign it to a file.


Set Report = crxApplication.OpenReport("Z:\DAD\BalanceReconcile.rpt", 1)
For Each crxDatabaseTable In Report.Database.Tables
crxDatabaseTable.ConnectionProperties("user id") = "sa"
crxDatabaseTable.ConnectionProperties("Password") = myPasswordTechniSQL
Next crxDatabaseTable
Report.PaperOrientation = crDefaultPaperOrientation
Report.PrintOut False

kchisley
Jan 17th, 2006, 08:20 AM
Thanks for your help. How do I just open the report and refresh the data (i.e. not print it, just display it)?