I am having problem in crystal report version 10.2 in Visual Studio 2005 (C#). The error message ?Load Report Failed? and Set Parameter values Keep on popping up randomly. Those that are in red?when it reach this point?the pop up start popping up?.
Here are my codes:
private void SetCurrentValuesForParameterField(ParameterFields parameterFields, ArrayList arrayList)
{
ParameterValues currentParameterValues = new ParameterValues();
if (parameterFields.Count > 0)
{
foreach (object submittedValue in arrayList)
{
ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
if (submittedValue.ToString() == cboVerifier.Text.Trim())
{
parameterDiscreteValue.Value = submittedValue.ToString();
currentParameterValues.Add(parameterDiscreteValue) ;
}
}
}
else
{
ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
parameterDiscreteValue.Value = "";
currentParameterValues.Add(parameterDiscreteValue) ;
}
ParameterField parameterField = parameterFields[PARAMETER_FIELD_NAME];
parameterField.CurrentValues = currentParameterValues;
}
private void btnPreview_Click(object sender, EventArgs e)
{
crvPerVerifier.ReportSource = Application.StartupPath + "\\Reports\\rptReportPerVerifier.rpt";
if (this.crvPerVerifier.ParameterFieldInfo != null)
{ SetCurrentValuesForParameterField(crvPerVerifier.ParameterFieldInfo, lst);
}
}