Hello,
My company just purchased a bunch of Telerik controls. We noticed there was a reporting control so we wanted to take a look at it. Currently we are using Active Reports for all our reports. I was asked to look into what the Telerik Reporting could do for us. I wanted to create a simple report with a few text boxes and a subreport to show data. I am having a hard time though getting data to show in a sub report. I have to set all the report data in a usercontrol file. Since the report would be dynamically filled, I have to reference each control and set the data source to whatever I need. I call my PrepareReport() function to load the data into the report and then stream it. I am able to access my textboxes and set their values and those show fine.The datset below returns 4 records but nothing shows in the subreport when I run it. What am I missing? Any help would be greatly appreciated. I have searched through this forum and google and can't seem to find a solution for what I want to do. Thanks!
My company just purchased a bunch of Telerik controls. We noticed there was a reporting control so we wanted to take a look at it. Currently we are using Active Reports for all our reports. I was asked to look into what the Telerik Reporting could do for us. I wanted to create a simple report with a few text boxes and a subreport to show data. I am having a hard time though getting data to show in a sub report. I have to set all the report data in a usercontrol file. Since the report would be dynamically filled, I have to reference each control and set the data source to whatever I need. I call my PrepareReport() function to load the data into the report and then stream it. I am able to access my textboxes and set their values and those show fine.The datset below returns 4 records but nothing shows in the subreport when I run it. What am I missing? Any help would be greatly appreciated. I have searched through this forum and google and can't seem to find a solution for what I want to do. Thanks!
private
void
PrepareReport(Telerik.Reporting.Report rpt)
{
Telerik.Reporting.DetailSection detail = (Telerik.Reporting.DetailSection)rpt.Items[
"detail"
];
Telerik.Reporting.TextBox txt = (Telerik.Reporting.TextBox)detail.Items[
"txtDNIdValue"
];
txt.Value =
"11111"
;
Telerik.Reporting.SubReport subRpt = (Telerik.Reporting.SubReport)detail.Items[
"subReport1"
];
DataSet ds =
new
DataSet();
ds = FunctionToFillDataSet()
;
subRpt.Report.DataSource = ds;
}
Zack