|
-
May 2nd, 2005, 09:14 AM
#1
Thread Starter
Lively Member
passing parameters to a rpt using the cry runtime lib
i'm using vb6 and crystal reports 8.5. i have a string value that i need to pass to my rpt. here is the sample of my code:
Set CRReport = New CRAXDRT.Report
Set CrxApp = CreateObject("CrystalRunTime.Application")
Set CRReport = CrxApp.OpenReport(vstrReportFile)
CRReport.Database.SetDataSource vPassedADORS, 3, 1
CRViewer1.ReportSource = CRReport
CRReport.ParameterFields(0) = " Par1;" + vstrParameters + " ;true"
CRReport.PrintOut False, 1, True
when i run this code i get the error subscript out of range.
when i create another project that uses the crystal report component i use the following code:
cry1.ParameterFields(0) = " Par1;" + vstrParameters + " ;true"
cry1.printreport
it works fine.
can any one help?
Thank You,
Thomas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|