I currently have a VB6 application that uses CR9 References (Crystal Report View Control 9 and Crystal Reports 9 ActiveX Designer Run Time Library). I have to transition the application to use CR10 References (Crystal ActiveX Report Viewer Library 10, Crystal Reports ActiveX Designer Design and Run Time Library 10.0, Crystal ActiveX Designer and Run Time Library 10.0).
The report integrates an external .RPT file. The datasource for the external .RPT file is a Sybase (v 12.5.03 - 32bit) stored procedure . The current version of the VB application uses the following code to fire off the report and export it in PDF format to our server:
The problem is that now that I've changed the references to the CR10 References listed above, while the PDF file does export, there are no results. It's as if the CR doesn't make the connection to the Sybase Server and thus doesn't return the results from the stored proc.
Any suggestions?
The report integrates an external .RPT file. The datasource for the external .RPT file is a Sybase (v 12.5.03 - 32bit) stored procedure . The current version of the VB application uses the following code to fire off the report and export it in PDF format to our server:
Code:
Dim fsoPDF
Set fsoPDF = CreateObject("Scripting.FileSystemObject")
Set appl = New CRAXDRT.Application
Set crptAdvice = New CRAXDRT.Report
Set crptAdvice = appl.OpenReport ("c:\Crystal\Advice.rpt")
crptAdvice.Database.Tables(1).ConnectionProperties("User ID") = gstr_UID
crptAdvice.Database.Tables(1).ConnectionProperties("Password") = gstr_PWD
'Refresh the Crystal Report source data
crptAdvice.DiscardSavedData
'Passing parameters to Sybase stored proc
crptAdvice.ParameterFields.GetItemByName("@pPlanID")._
ClearCurrentValueAndRange
crptAdvice.ParameterFields.GetItemByName("@pPlanID")._
AddCurrentValue gPlanID
With crptAdvice.ExportOptions
.DestinationType = crEDTDiskFile
.FormatType = crEFTPortableDocFormat
.DiskFileName = strPDF_Path & strPDF_FileName
End With
crptAdvice.Export False 'Export pdf file; turn off export module
Any suggestions?