I have created a report using a stored procedure which expects some parameters i Have passed the required parametes but report is displaying 9 time a single record can any body suggest me wt to do in that case and code for that is like that below:
Its too urgent so please reply fast ASAP.
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
//ParameterFieldDefinition parmfldDefn;
//Set instances for input parameter 1 - @vDepartment
paramField.Name = "@EndDate";
//parmfldDefn = reportDocument.DataDefinition.ParameterFields[0];
//Below variable can be set to any data present in SalseData table, Department column
paramDiscreteValue.Value = EndDate;
paramField.CurrentValues.Add(paramDiscreteValue);
//Add the paramField to paramFields
paramFields.Add(paramField);
//Set instances for input parameter 2 - @iSalseYear
//*Remember to reconstruct the paramDiscreteValue and paramField objects
paramField = new ParameterField();
paramField.Name = "@Date";
// parmfldDefn = reportDocument.DataDefinition.ParameterFields[1];
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value =Convert.ToString(Convert.ToDateTime(EndDate).AddDays(10)
.ToString("dd/MM/yyyy hh:mm"));
paramField.CurrentValues.Add(paramDiscreteValue);
//Add the paramField to paramFields
paramFields.Add(paramField);
crystalReportViewer1.ParameterFieldInfo = paramFields;
reportDocument.Load(Path + @"\Tamper Analyzer\Reports\Instantaneous Report.rpt");
//set the database loggon information.
//**Note that the third parameter is the DSN name and not the Database or System name
//reportDocument.SetDatabaseLogon(
//Load the report by setting the report source
crystalReportViewer1.ReportSource = reportDocument;