public AddressList()
{
/// <summary>
/// Required for telerik Reporting designer support
/// </summary>
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
private void AddressList_NeedDataSource(object sender, EventArgs e)
{
Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;
DataTable allData = new DataTable();
SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionName"].ConnectionString);
try
{
SqlCommand cmd = new SqlCommand("spReportAddressList", connection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter() { Value=(Int64) report.Parameters["ParamName"].Value, ParameterName="ParamName" });
connection.Open();
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(allData);
connection.Close();
}
catch
{
connection.Close();
}
report.DataSource = allData;
}
We have a silverlight application as the hosting application. The report is super simple too - this is the 1st one we are trying to convert after the session state problem. We are doing this change beccause we are moving towards a server farm\multiple wp and telerik doesn't seem to work with that either without first moving the session over to some sort of central storage.
Please help as this is causing us serious issues.
private
void
PictureBox1_ItemDataBound(
object
sender, EventArgs e)
{
}
I am using a cubedatasource and trying to format the data labels, but the format doesn't seem to take effect. I am adding the series in the codebehind:
ChartSeries series = new ChartSeries("Avg Hours/Job", ChartSeriesType.Bar);
series.DataYColumn = "JobAvg";
series.DataLabelsColumn = "JobAvg";
series.DefaultLabelValue = "#Y{F}";
cht.Series.Add(series);
public
static
Telerik.Reporting.Drawing.Unit GetLeftPadding(
double
lvl)
{
if
(lvl <= 1)
return
Telerik.Reporting.Drawing.Unit.Pixel(0);
else
return
Telerik.Reporting.Drawing.Unit.Pixel(lvl * 15);
}