CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: need help

L

Learner

Hi Friends,
I am building the dataset programmatically by calling the stored proc
by passing a parameter and i am getting the data into the dataset. As a



test when i bind this dataset to a grid i see the data in the front. So



my dataset is loaded with the data.


My actual task is to bring up the Crystal Report using the dataset
thats being loaded with the stored proc as explained above.
Now comming to my actual problem below is exactly what i am doing in my



page_load method. I am not sure the way i am trying to add parameters
to the report but below is my code
*************************************** page load code
**************************************
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim frmDate As String = Request.QueryString("frmDate").ToString



Dim rpt As New InspectorPayReport
Dim ParameterField1 As New
CrystalDecisions.Shared.ParameterField
Dim ParamterFields As New
CrystalDecisions.Shared.ParameterFields
Dim ParamterDescreteValue1 As New
CrystalDecisions.Shared.ParameterDiscreteValue
ParameterField1.ParameterFieldName = "Reference"
ParamterDescreteValue1.Value = frmDate
ParameterField1.CurrentValues.Add(ParamterDescreteValue1)
ParamterFields.Add(ParameterField1)
InspectPayReportViewer.ParameterFieldInfo = ParamterFields


Dim getInspectorPayReport As Invoicing_GMAC_US_BL = New
Invoicing_GMAC_US_BL
Dim ds As DataSet =
getInspectorPayReport.GetInvoicingReport(frmDate)
rpt.SetDataSource(ds)
InspectPayReportViewer.ReportSource = rpt
End Sub


*****************************************************End of the page
load*********************


But its throwing an exception as in the subject line .


Exception Details:
CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException:



Missing parameter field current value.


Could some one please help me if you had come across with the same
situation?
Thanks
-L
 
C

Christopher Reed

I think you need to convert frmDate to a DateTime value from a string before
passing it to the Crystal Report.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,217
Latest member
topweb3twitterchannels

Latest Threads

Top