Hi
I have a VB6 form that adds/Edit/Delete records from an Access Database.
Inside this form I have a Report button that generates a Crystal report related to only the current record.
The code is
my problem is that I have a checkbox whose caption is "Amended",if it is checked I want to add the word Amended inside a shaded Border into the generated report, if it is not checked i want to only generate the report.VB Code:
Dim objCrystalApp As CRAXDRT.Application Dim oReport As CRAXDRT.Report rs2.Open "Select * from Btest where Flag=1 and BID=" & nar, cn, adOpenKeyset, adLockPessimistic rs2.Close Cancel = True Set objCrystalApp = New CRAXDRT.Application ReportPath = "C:\Book2\report4.rpt" Set oReport = objCrystalApp.OpenReport(ReportPath, 1) oReport.RecordSelectionFormula = "{Btest.BID} =" & nar frmreport.crvMyCRViewer.ReportSource = oReport frmreport.crvMyCRViewer.ViewReport frmreport.crvMyCRViewer.Refresh frmreport.Show 1 End If
how can I do it?
I am using Crystal Report 9
thanks




Reply With Quote