crystal reports
-
i m fairly new to crystal reports.can anybody plz tell me how to use crystal reports in VB and how to pass parameters in the report at run time preeti
Although it might depend on which version of Crystal Reports you are using, there is something like a Parameters collection for report parameter variables, accessed with either an integer, (i.e., rpt.Parameters(1).Value = "XYZ") or the name of the parameter (i.e., rpt.Parameters("NAME").Value = "XYZ") all of which should be documented in the Crystal Reports documentation, but, if necessary, I can find the exact code I used last time I did this with CR 8.5. I'd have to experiment with CR 9.x+ to see if works the same way. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
-
i m fairly new to crystal reports.can anybody plz tell me how to use crystal reports in VB and how to pass parameters in the report at run time preeti
OK, here's what I did in VB6 w/ Cr8.5:
Set crystalApplication = New CRAXDDRT.Application Set crystalReport = crystalApplication.OpenReport(strReportFile, 1) With crystalReport .ExportOptions.DiskFileName = strExportFile .ExportOptions.DestinationType = crEDTDiskFile .ExportOptions.FormatType = crEFTWordForWindows ' crEFTPortableDocFormat .ExportOptions.WORDWExportAllPages = True .DisplayProgressDialog = False .ParameterFields(1).AddCurrentValue strGroupName ' .RecordSelectionFormula = strSelection .Export False End With Set crystalReport = Nothing Set crystalApplication = Nothing
FYI, to the best of my knowledge, this requires CR 8.5 developer edition. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.