please can anyone help me ,
I have report with four parameters (StartDate , EndDate , Count of records , Country )
when I pressed in these parameters , I got The chart
this is my code
private
void chart1_NeedDataSource(object sender, EventArgs e)
{
Telerik.Reporting.Processing.
Chart chart = sender as Telerik.Reporting.Processing.Chart;
SqlConnection conn = new SqlConnection("Server=(local);Database=UMG;Integrated Security=SSPI;");
SqlCommand command = new SqlCommand("GetDiagnosisReport", conn);
command.CommandType =
CommandType.StoredProcedure;
command.Parameters.AddWithValue(
"@Country", this.ReportParameters["Country"].Value);
command.Parameters.AddWithValue(
"@FromDate", this.ReportParameters["FromDate"].Value);
command.Parameters.AddWithValue(
"@ToDate", this.ReportParameters["ToDate"].Value);
command.Parameters.AddWithValue(
"@Count", this.ReportParameters["Count"].Value);
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet ds = new DataSet();
try
{
adapter.Fill(ds);
}
catch (Exception ex)
{
System.Diagnostics.
Debug.WriteLine(ex.Message);
}
DataView view = ds.Tables[0].DefaultView;
chart.DataSource = view;
}
but when I got chart without bound any value (there is no ,or empty series)
then I put parameters and press for preview I got this error
An error has occured while processing Chart 'chart1':
An Unexpected error has occurred. Please review the InnerException for more information how to resolve the problem. |
||
its urgent
thanks in advance