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
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