p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

crystal_reports thread: Using PDW with VB 6.0 and Crystal 8.0

Message #1 by "Chad S Sriram" <sriramcs@h...> on Tue, 29 Oct 2002 22:05:33

I used the PDW to package a VB 6.0 app to display a Crystal 8.0 report. I 
send a string from VB 6.0 to SQL Server 2000 as parameter(s) to a stored 
procedure. The Crystal Report I need to display on the screen feeds off 
the executed stored procedure with parameters. I am able to bring the 
Crystal Report momentarily on the screen through VB, but then it vanishes. 
I am perplexed, it works fine on my machine. This is the VB code related 
to Crystal 8.0.

'Define components of PrintCrystalReports control
With PrintBillingCrystalReports

    'Set path & report name
    .ReportFileName = strDataPath & strReportSource
    'Define Connection String to the MSSQL server
    .Connect = "DSN=zzzzz;UID=xxx;PWD=xxxxx;DSQ=yyy"
    'Set report to use most current data
    .DiscardSavedData = True
    'Set report title
    .SelectionFormula = strDataSelection
    'Set report destination to print to window
    .Destination = crptToWindow
    'Allow users to see detail records by drill down feature
    .WindowAllowDrillDown = True
    .WindowState = crptMaximized
    .WindowShowCloseBtn = True
    'Print report
    MsgBox "The report has been generated successfully for the criteria 
chosen. If no report appeared or a report with no data appeared, this 
means that no data exists for your criteria.", vbInformation, "Status"
'End with statement
End With

I already have MDAC_TYP.EXE installed.

i) When I package using the PDW, am I wrong in assuming the PDW will do 
the right inclusion of the .dlls for me? If yes, what are the .dlls I need 
to manually add during packaging?

ii) Can I also assume the PDW will register the necessary .dlls included 
if I let it run or do I have to do those manually too? 

iii) The sad part is, on this test machine, even after installing Crystal 
Reports 8.0 and rebooting, I get the same vanishing report problem when I 
run my VB app, is my machine screwed up or the .dlls?

Please advise. Thanks in advance for your time and help.


  Return to Index