Hello!
I'm learning Telerik Reporting and today i found an example how to get a value from textbox in subreport and set this value to master report textbox.
When i did this example in silverlight project with wcf ria services i get an error in ItemDataBound event.
My code for textBox1 ItemDataBound event is this
But i get error in this line
I'm learning Telerik Reporting and today i found an example how to get a value from textbox in subreport and set this value to master report textbox.
When i did this example in silverlight project with wcf ria services i get an error in ItemDataBound event.
My code for textBox1 ItemDataBound event is this
private
void
textBox3_ItemDataBound(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.TextBox textBox1_1 = (Telerik.Reporting.Processing.TextBox)sender;
Telerik.Reporting.Processing.Report oReport = textBox1_1.Report;
Telerik.Reporting.Processing.DetailSection oDetailSection = (Telerik.Reporting.Processing.DetailSection)oReport.ChildElements.Find(
"detail"
,
true
)[0];
Telerik.Reporting.Processing.SubReport oSubReport = (Telerik.Reporting.Processing.SubReport)oDetailSection.ChildElements.Find(
"subReport1"
,
true
)[0];
//Telerik.Reporting.Processing.DetailSection oSubReportDetailSection = (Telerik.Reporting.Processing.DetailSection)oSubReport.ChildElements.Find("detail", true)[0];
Telerik.Reporting.Processing.TextBox oSubReportTextBox = (Telerik.Reporting.Processing.TextBox)oSubReport.InnerReport.ChildElements.Find(
"textBox1"
,
true
)[0];
textBox1_1.Value = oSubReportTextBox.Value;
}
Telerik.Reporting.Processing.TextBox oSubReportTextBox = (Telerik.Reporting.Processing.TextBox)oSubReport.InnerReport.ChildElements.Find(
"textBox1"
,
true
)[0];
It says that ther is no InnerReport (null) but i set a subreport1.ReportSource to my subreport in design viewer.
I subreport i have only detail section with two textboxes (one with simple text and one with =5*5 calculation).
What am i doing wrong?