I have a from that contains a crystal report. This report contains 2 text boxes for user parameter input. The problem is, inputs in
either text box affect
both parameters, when they should affect 1 and not the other. I can't seem to understand what I'm doing wrong, since when I step through the code the discrete values are different.
Code:
private void button1_Click(object sender, EventArgs e)
{
SpotRateReport SRR = new SpotRateReport();
ParameterValues myvals = new ParameterValues();
ParameterDiscreteValue myDiscrete = new ParameterDiscreteValue();
ParameterValues myvals1 = new ParameterValues();
ParameterDiscreteValue myDiscrete1 = new ParameterDiscreteValue();
myDiscrete.Value = double.Parse(AudBuyTxtBx.Text);
myvals.Add(myDiscrete);
SRR.DataDefinition.ParameterFields[0].ApplyCurrentValues(myvals);
myDiscrete1.Value = double.Parse(AudSellTxtBx.Text);
myvals1.Add(myDiscrete1);
SRR.DataDefinition.ParameterFields[1].ApplyCurrentValues(myvals1);
crystalReportViewer1.ReportSource = SRR;
}