| andrew.bupp@gmail.com 2005-04-21, 4:01 am |
| Hello,
I have a error message that is taking way too long to figure out. Any
suggestions? Code and error below.
CODE:
public void SpWithViewer (string UserId,
string PassWord,
string spParameter)
{
SPReport1 MyReport =3D new SPReport1();
CrystalDecisions.Shared.TableL=ADogOnInfo
MyLogonInfo;
CrystalReportViewer1.LogOnInfo =3D new
CrystalDecisions.Shared.TableL=ADogOnInfos();
MyLogonInfo =3D new
CrystalDecisions.Shared.TableL=ADogOnInfo();
MyLogonInfo.TableName =3D "stored_procedure;1";
MyLogonInfo.ConnectionInfo.Use=ADrID =3D UserId;
MyLogonInfo.ConnectionInfo.Pas=ADsword =3D
PassWord;
CrystalReportViewer1.LogOnInfo=AD.Add(MyLogonInfo);
// Create the parameter
CrystalDecisions.Shared.Parame=ADterFields
ParameterFields;
CrystalDecisions.Shared.Parame=ADterField
ParameterField;
CrystalDecisions.Shared.Parame=ADterDiscreteValue spValue;
ParameterFields =3D
CrystalReportViewer1.Parameter=ADFieldInfo;
ParameterField =3D
ParameterFields["@Study_ID_Par=ADam"];
spValue =3D new
CrystalDecisions.Shared.Parame=ADterDiscreteValue();
spValue.Value =3D spParameter;
ParameterField.CurrentValues.A=ADdd(spValue);
CrystalReportViewer1.ReportSou=ADrce =3D MyReport;
}
ERROR:
Specified argument was out of the range of valid values.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeExcep=ADtion: Specified
argument was out of the range of valid values.
The above sample code is taken from the Brian Bischof book, Crystal
Reports .NET Programming.
Thanks in advance,
-Andybu
|