Hello sir,
thank you for reply
i have another problem regard to paramter fields
i was design one SQL query. which return the more then one value in integer format.
how can i will pass the all values in one parameter fileds and assign value according to record
and if there are no value for record then 0 value assign for that.
here my code:
============
my method which i was design but it assign last value of sql query to all records in crystal report
----------------------------------------
public void Sum_spay()
{
//// -------feetype
//// [1] senior ='S'
//// [2] multy ='M'
////----------------------------------------------------------------
ParameterFields pfields = new ParameterFields();
ParameterField pField = new ParameterField();
ParameterDiscreteValue disVal = new ParameterDiscreteValue();
ParameterRangeValue rVal = new ParameterRangeValue();
sql = "SELECT COUNT(srno) FROM License WHERE animaltype = 'D' AND feetype = 'S'
GROUP BY MONTH(pay_date)";
cmd = new SqlCommand(sql, con);
pField.ParameterFieldName = "mul";
try
{
con.Open();
dr = cmd.ExecuteReader();
while (dr.Read())
{
disVal.Value = dr[0];
pField.CurrentValues.Add(disVal);
pfields.Add(pField);
dc.SetParameterValue("mul", dr[0]);
// Response.Write("<br/>" + dr[0]);
}
CrystalReportViewer1.ParameterFieldInfo = pfields;
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
finally
{
con.Close();
}
}
i hope you understand my problem.
i will wait you reply
thank you
saroop
saroop.trivedi@gmail.com