Hi,
I'm trying to make subreports visible programmatically with a parameter in the _NeedDataSource event. This is the code I am using:
The visibility of everything is set to false. I don't seem to be able to get to the inner report of my subreport controls. Changing the visiblity of the subreport controls and text boxes works fine. What am I doing wrong?
I know it sounds a little strange but in the subreport I was going to bail out of getting the data if the subreport wasn't visible. That's why I want to make the subreport invisible not just the subreport control....
Thanks,
Darren
I'm trying to make subreports visible programmatically with a parameter in the _NeedDataSource event. This is the code I am using:
| foreach (string filterRow in showHide) |
| { |
| switch(filterRow) |
| { |
| case "10": |
| this.textBoxEventTotals.Visible = true; |
| this.subReportCommunityEventTotals.Visible = true; |
| this.subReportCommunityEventTotals.Report.Visible = true; |
| break; |
| case "20": |
| this.textBoxEventTotalsByDate.Visible = true; |
| this.subReportCommunityEventTotalsByDate.Visible = true; |
| this.subReportCommunityEventTotalsByDate.Report.Visible = true; |
| break; |
| case "30": |
| this.textBoxTotalsByCommunity.Visible = true; |
| this.subReportCommunityEventTotalsByCommunity.Visible = true; |
| this.subReportCommunityEventTotalsByCommunity.Report.Visible = true; |
| break; |
| case "40": |
| this.textBoxCommunityAndDate.Visible = true; |
| this.subReportCommunityEventsByCommunityAndDate.Visible = true; |
| this.subReportCommunityEventsByCommunityAndDate.Report.Visible = true; |
| break; |
| case "50": |
| this.textBoxDetails.Visible = true; |
| this.subReportCommunityEventDetails.Visible = true; |
| this.subReportCommunityEventDetails.Report.Visible = true; |
| break; |
| } |
| } |
| } |
The visibility of everything is set to false. I don't seem to be able to get to the inner report of my subreport controls. Changing the visiblity of the subreport controls and text boxes works fine. What am I doing wrong?
I know it sounds a little strange but in the subreport I was going to bail out of getting the data if the subreport wasn't visible. That's why I want to make the subreport invisible not just the subreport control....
Thanks,
Darren