Hey all,
I am having trouble getting my report to run when I try and pass the parameters values via code. The report runs fine when I type the values in manually.
a message box with "Load Report Failed" come up three times. and the report doesn't load,
I am using VS 2009 PRO
Any Ideas What is wrong with the code
Thanks
James
Dim cryRpt As New ReportDocument Dim p1 As New ParameterFields Dim p2 As New ParameterField Dim p22 As New ParameterField Dim p3 As New ParameterDiscreteValue Dim p4 As New ParameterDiscreteValue p2.ParameterFieldName = "Name" p3.Value = "23" p2.CurrentValues.Add(p3) p1.Add(p2) Form1.CrystalReportViewer1.ParameterFieldInfo = p1 p22.ParameterFieldName = "Payment_ID" p4.Value = "55" p22.CurrentValues.Add(p4) p1.Add(p22) Form1.CrystalReportViewer1.ParameterFieldInfo = p1 Form1.CrystalReportViewer1.ReportSource = "Kellihers_Lawnmowers.CrystalReport3.rpt" Form1.Show()
mlmcc