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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Are U a vb6 & Crystal 8 Guru?

Status
Not open for further replies.

vbuser1976

Programmer
Jan 5, 2001
10
0
0
US
Hi!

I am having a problem with my application and the reports in the application. When I run my app through VB6(compiler), I am able to view my reports. But when I run it through my packaged app, the reports do not view. Please read the code below and let me know what I am missing. Also, can you tell me which components and/or references I need to include in my deployment package?

Thank you for your assistance in advance. :)


Code:
With CrystalReport2
    .ReportFileName = App.Path & "\REPORTS\dateRep.rpt"
    .ReportTitle = "Summary Report by Date"
    .PrintReport
End With
-vbuser1976
VB6.0 SP4
Crystal 8.0 Developer Edition
SQL 7.0 SP2
 
I'm not a guru but I think it had something to do with
"CrystalReport2.Action = 1" to make it work.

And when you make a package, VB includes all components, controls etc. automaticly. There stored in Suport-directory and you can find them on the setup.lst

Remedy...
 
HI remedy

Thanks for your quick reponse. I tried what you asked.
I changed CrystalReport2.PrintReport to CrystalReport2.Action = 2, but I received this error when I ran my app:

Run-time error '20532':
cannot find database DLL.

Any more ideas?
Thanks again. -vbuser1976
VB6.0 SP4
Crystal 8.0 Developer Edition
SQL 7.0 SP2
 

If you don't get the answer here, try the Seagate: Crystal Reports forum.

Tarek

The more I learn, the more I need to learn!
 
these kinds of problems are routine when deploying a VB/CR app(they happen every goddamned time). The way i usually solve it is to use a program like 'modules.exe'(for win95/98) available free from seagates website or 'handleex.exe'(for winnt) freely downloadable from the net, i dont have the address but i found it by typing handleex.exe into yahoo. These programs show you what dll's are in use , grouped by process. Run your app on your development machine, when the report window is showing run the modules or handleex program. Bring up the list of dll's for your application's proccess you can tell which dll's belong to crystal by what directories they are in(usually crystal dll's start with either 'cr' or 'u' or 'p'). Make sure all these dll's are included in your setup package. Good Luck. Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
This is how I do it with Visual BASIC 6 and Crystal Report 8.0. The following code attaches an ADO recordset to the report at run-time.

Code:
Private s_rptLocal As CRAXDRT.Report
Private s_rdApp As CRAXDRT.Application
Public s_strReportName As String
Public s_rsLocal As ADODB.Recordset
-----------
Private Sub Form_Load()
    Dim objReportSection As CRAXDRT.Section

    On Error GoTo Form_LoadErr

    Set s_rdApp = New CRAXDRT.Application
    Set s_rptLocal = s_rdApp.OpenReport(s_strReportName)

    If Not s_rsLocal Is Nothing Then
        s_rptLocal.Database.SetDataSource s_rsLocal
    End If

    rptViewer.ReportSource = s_rptLocal
    rptViewer.DisplayGroupTree = False
    rptViewer.ViewReport
    Screen.MousePointer = vbDefault
    Me.Caption = s_rptLocal.ReportTitle
End Sub
Snaggs
tribesaddict@swbell.net
If a parsley farmer is sued, can they garnish his wages?
 
Hi and Thank you all.

I will try all of your suggestions and will let you know the results.

Thank you again. Sometimes, it helps when you have more than one person working on the same problem and for me, this is the best way to get help. If you guys need any help from me, do not hesistate to contact me. s-)

-vbuser1976
VB6.0 SP4
Crystal 8.0 Developer Edition
SQL 7.0 SP2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top