I have one problem when passing value to parameters for Crystal Report Viewer. The parameters are from Stored Procedure which I have defined.
My aim is to accept values from user and display it accordingly. I try to write code as below in Button View Click Event:
Dim rptdoc As New ReportDocument rptdoc.Load(Application.StartupPath & "\Reports\SummaryAdsRecordBetweenDate.rpt") '@startdate is parameter in stored procedure rptdoc.SetParameterValue("@startdate", CDate("2009/08/01")) '@enddate is parameter in stored procedure rptdoc.SetParameterValue("@enddate", CDate("2009/08/13"))
rptViewer.ReportSource = rptdoc rptViewer.RefreshReport() [\code]
But the problem is that Crystal Report Viewer does not accept my passed values and prompt me to input values for @startdate and @enddate in its dialog box.
If you have faced the same problem or have any solution, I will be grateful for your help...
Thank you very much! Kids[code=language]
Dim rptdoc As New ReportDocument
rptdoc.Load(Application.StartupPath & "\Reports\SummaryAdsRecordBetweenDate.rpt")
'@startdate is parameter in stored procedure
rptdoc.SetParameterValue("@startdate", CDate("2009/08/01"))
'@enddate is parameter in stored procedure
rptdoc.SetParameterValue("@enddate", CDate("2009/08/13"))
rptViewer.ReportSource = rptdoc
rptViewer.RefreshReport()
[\code]
But the problem is that Crystal Report Viewer does not accept my passed values and prompt me to input values for @startdate and @enddate in its dialog box.
If you have faced the same problem or have any solution, I will be grateful for your help...
Thank you very much! Kids