Dear Community,
I have recently encountered a problem when trying to work with hide/show of report content. So shortly draft out my problem, I have a report with Master/Detail, on the master I have the following code in my report's cs file
bool bShow;
private void subReport_ItemDataBound(object sender, System.EventArgs e)
{
bShow = (
bool) this.ReportParameters["ShowDetails"].Value;
(sender
as Telerik.Reporting.Processing.SubReport).Visible = bShow;
//More content will be added here...
}
This works flawless and my excel export works perfectly. If I add the following line into the method
masterDetail_Total.ShowDetailSection(bShow);
where the method ShowDetailSection(bool bShow) is defined in the detail report of the master report, so that the complete method will yeild
bool bShow;
private void subReport_ItemDataBound(object sender, System.EventArgs e)
{
bShow = (
bool) this.ReportParameters["ShowDetails"].Value;
(sender
as Telerik.Reporting.Processing.SubReport).Visible = bShow;
// Known Issue: 'Visible = false' will cause excel export to throw an StackOverflow exception
masterDetail_Total.ShowDetailSection(bShow);
}
the reportviewer will throw an StackOverflow exception whenever the report parameter "ShowDetails" = false.
Any idea on how to solve this problem?
Best regards,
S. Engel