Jump to content

Recommended Posts

Posted

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

}

}


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...