EDIT: Sorry for the thread title, I only realized that I messed up the title after I posted the thread.
I need to get a value from volumeSumFunctionTextBox textbox in one of the subreports and display it in textBox1 in master report. My code is as attached below. But when I run this, detailSection will be null. Can anyone tell me what is wrong with my code?
Secondly, the master report's ReportParameters allows MultiValue. Therefore I'll need to display the sum of all values in volumeSumFunctionTextBox in textBox1. Which section of the report should I put textBox1? I've tried putting textBox1 in reportFooter but the textBox will not be displayed if I select more that than one value for ReportParameters .
Thanks.
I need to get a value from volumeSumFunctionTextBox textbox in one of the subreports and display it in textBox1 in master report. My code is as attached below. But when I run this, detailSection will be null. Can anyone tell me what is wrong with my code?
private void textBox1_ItemDataBound(object sender, EventArgs e)
{
Telerik.Reporting.Processing.TextBox textBox
= (Telerik.Reporting.Processing.TextBox)sender;
Telerik.Reporting.Processing.Report report = textBox.Report;
Telerik.Reporting.Processing.DetailSection detailSection
= Telerik.Reporting.Processing.DetailSection)Telerik.Reporting.Processing.ElementTreeHelper.GetChildByName(report, "detail");
Telerik.Reporting.Processing.SubReport subReportFuel
= (Telerik.Reporting.Processing.SubReport)Telerik.Reporting.Processing.ElementTreeHelper.GetChildByName(detailSection, "subReportFuel");
Telerik.Reporting.Processing.TextBox subReportTextboxFuelVolume
= (Telerik.Reporting.Processing.TextBox)Telerik.Reporting.Processing.ElementTreeHelper.GetChildByName(subReportFuel, "volumeSumFunctionTextBox");
textBox.Value = subReportTextboxFuelVolume.Value;
}
Secondly, the master report's ReportParameters allows MultiValue. Therefore I'll need to display the sum of all values in volumeSumFunctionTextBox in textBox1. Which section of the report should I put textBox1? I've tried putting textBox1 in reportFooter but the textBox will not be displayed if I select more that than one value for ReportParameters .
Thanks.