private void pictureBox1_ItemDataBound(object sender, EventArgs e) |
{ |
HttpContext context = System.Web.HttpContext.Current; |
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Profit)); |
if (context != null) |
pictureBox1.Value = ((object)resources.GetObject("logo72dpi")); |
else |
pictureBox1.Value = ((object)resources.GetObject("logo300dpi")); |
} |
txtDepartmentName.Value = GetDepartmentName(this.DeptID); |
private void MyReport_NeedDataSource(object sender, System.EventArgs e) | |
private void MyReport_ItemDataBound(object sender, System.EventArgs e) | |
private void pageHeader_ItemDataBound(object sender, System.EventArgs e) |
this.generalReportDataSetTableAdapter1.Connection.ConnectionString = ConfigurationManager.ConnectionStrings["Report.ConnectionString"].ConnectionString; |
this.generalReportDataSetTableAdapter1.FillByClientIdAndBetweenStartAndEndDate(this.generalReportDataSet.GeneralReportDataSetTable, |
Convert.ToInt32(this.ReportParameters["pClientId"].Value), Convert.ToDateTime(this.ReportParameters["pStartDate"].Value), Convert.ToDateTime(this.ReportParameters["pEndDate"].Value)); |
Processing.Report report = (Processing.Report)sender; |
Report.DataSource = this.generalReportDataSet; |
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. |
||