When I preview this chart, I am not getting data in the chart. It shows 5 empty charts.
Code:
namespace
CPR_Reports
{
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Windows.Forms;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;
using Telerik.Reporting.Processing;
public partial class ActivePatientsChart : Telerik.Reporting.Report
{
public ActivePatientsChart()
{
InitializeComponent();
try
{
this.weB_PORTAL_TESTDataSetTableAdapter1.Fill(this.wEB_PORTAL_TESTDataSet.WEB_PORTAL_TESTDataSetTable);
}
catch (System.Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.Message);
}
}
private void chart1_NeedDataSource(object sender, System.EventArgs e)
{
string commandText = "select sum(I_Val) as ivalue,Date_ as day from stats where DATE_ between'6/26/2009' and '7/2/2009' and stat_no =4 group by Date_";
Telerik.Reporting.Processing.Chart chart = (Telerik.Reporting.Processing.Chart)sender;
SqlDataAdapter adapter = new SqlDataAdapter(commandText, Properties.Settings.Default.WEB_PORTAL_TEST);
DataSet ds = new DataSet();
adapter.Fill(ds);
DataView view = ds.Tables[0].DefaultView;
chart.DataSource = view;
}
}
}
I have my report viewer in a telerik child window and I want to resize the reportviewer based on the size of the child window.
The width of the report viewer will resize automatically when nothing is set. The Height will continue down the page to where I can't see it.
I'm putting the report viewer in a grid. I can bind the height to initial Grid height, but it won't resize.
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
my:ReportViewer
Margin
=
"2 5 2 5"
MinHeight
=
"600"
Name
=
"repViewer"
Height
=
"{Binding ElementName=LayoutRoot, Path=ActualHeight}"
/>
...