Friday, March 23, 2012

How can I pass a parameter value from VB.Net to Crystal Report?

Hi! I need your help...asap...

How can I pass a parameter value from VB.Net to Crystal Report 11?

I created a report from Crystal Report 11 which has a parameter field for querying the records and I created a form from VB.Net which allows the user to enter a value which will be used for the report but I don't how to pass a parameter value from VB.Net to Crystal Report.Try This...

dim Report as New ReportDocument

Report.Load("YourReport.rpt") 'This is your Crystal Report File

Report.SetParameterValues("PARAM1","Christine") 'PARAM1 should have exactly the same spelling as what can be found in your parameter list in your "*.rpt" file.

CRViewer.Reportsource = Report

No comments:

Post a Comment