Hi,
I can show my report successfully and want to export it to a pdf file.
- After rightclick on the report->export->(Format:Adobe PDF, Destination: Disk File) -> OK -> OK happends nothing.
- Same when I click on the export button (.EnableExportButton = True)
This happends with the CR object for 8.5 and 10.
I even tried a report file without any parameters (differs form the source below)
any help would be very appreciated ...
MfG
WolfgangS
this is my code:
Private Sub Form_Load()
Dim objActReport As CRAXDRT.Report
Dim objApplication As CRAXDRT.Application
Dim objRst As ADODB.Recordset
Set objApplication = New CRAXDRT.Application
Set objActReport = New CRAXDRT.Report
Set objRst = New ADODB.Recordset
Set objActReport = objApplication.OpenReport("C:\Program Files\CodeCheckerWorld\RPT_HANS.rpt")
Call objActReport.DiscardSavedData
With objActReport
.ReportTitle = "CodeChecker 4 - accepted hints"
.ParameterFields.GetItemByName("Username").AddCurrentValue "zzz"
.ParameterFields.GetItemByName("SWVersion").AddCurrentValue "yyyy
.ParameterFields.GetItemByName("ReportSubTitle").AddCurrentValue "xxxx"
Call .Database.SetDataSource(objRst, 3, 1)
End With
With CrystalActiveXReportViewer1
.EnableExportButton = True
.ReportSource = objActReport ' pass the hints
.ViewReport ' call it
End With
End Sub