Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 07, 2012 03:59 AM by Ajay2707
Member
278 Points
170 Posts
Nov 06, 2012 05:35 AM|LINK
hi
i want to pass a parameter to my RPT
the same para name in the report is give in the C#.net cod
but still this exception is comming "Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))"
ParameterField parmTemp = new ParameterField(); parmTemp.ParameterFieldName = "?from"; parmTemp.CurrentValues.Add(ParStart_Date); paramList.Add(parmTemp); oRpt.SetParameterValue("?from", Session["txtStartDate"].ToString());
?from is my para name in the Crystal report9
710 Points
129 Posts
Nov 06, 2012 07:40 AM|LINK
ParameterFileds paramList = new ParameterFields { new ParameterField { Name = "Location", CurrentValues = new ParameterValues { new ParameterDiscreteValue { Value = "abc"} } } };
Try remove ? from parameter name.
Nov 06, 2012 09:17 AM|LINK
I DID NOT GET YOUR CODE !!!
IS IT IN C#.NET??
HOW TO REMOVE ?from IT SHOULD BE AS IN THE REPORT...
Contributor
4487 Points
870 Posts
Nov 07, 2012 03:59 AM|LINK
Hi Oman,
Remove ? in parameter name. it show in report , but while passing you don't define like this. see below link.
http://www.aspdotnet-suresh.com/2012/01/pass-parameters-to-crystal-reports-in.html
http://csharpdotnetfreak.blogspot.com/2011/09/pass-crystalreport-parameters.html
http://www.codeproject.com/Articles/61393/Programmatically-Pass-Parameters-into-Crystal-Repo
Oman88
Member
278 Points
170 Posts
exception in passing a para to a report
Nov 06, 2012 05:35 AM|LINK
hi
i want to pass a parameter to my RPT
the same para name in the report is give in the C#.net cod
but still this exception is comming "Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))"
ParameterField parmTemp = new ParameterField(); parmTemp.ParameterFieldName = "?from"; parmTemp.CurrentValues.Add(ParStart_Date); paramList.Add(parmTemp); oRpt.SetParameterValue("?from", Session["txtStartDate"].ToString());?from is my para name in the Crystal report9
Usha82
Member
710 Points
129 Posts
Re: exception in passing a para to a report
Nov 06, 2012 07:40 AM|LINK
ParameterFileds paramList = new ParameterFields { new ParameterField { Name = "Location", CurrentValues = new ParameterValues { new ParameterDiscreteValue { Value = "abc"} } } };
Try remove ? from parameter name.
Oman88
Member
278 Points
170 Posts
Re: exception in passing a para to a report
Nov 06, 2012 09:17 AM|LINK
I DID NOT GET YOUR CODE !!!
IS IT IN C#.NET??
HOW TO REMOVE ?from IT SHOULD BE AS IN THE REPORT...
Ajay2707
Contributor
4487 Points
870 Posts
Re: exception in passing a para to a report
Nov 07, 2012 03:59 AM|LINK
Hi Oman,
Remove ? in parameter name. it show in report , but while passing you don't define like this. see below link.
http://www.aspdotnet-suresh.com/2012/01/pass-parameters-to-crystal-reports-in.html
http://csharpdotnetfreak.blogspot.com/2011/09/pass-crystalreport-parameters.html
http://www.codeproject.com/Articles/61393/Programmatically-Pass-Parameters-into-Crystal-Repo