I am running across a situation where I have the need to display a SubReport or not depending on if the data source contains any items. That part is no problem, I can set the visibility of the SubReport to false if the data source contains no items. However, the SubReport is in a Group Footer section, and even if I set the SubReport visibility to false, the group footer still allows the room for it, so I end up with an extra page with page header/footer.
I then try to set the visibility of the Group Footer section based on the same logic as the SubReport visibility, and that seems to work, except that it applies the same visibility to ALL group footers. So say I have 5 groups, and only 1 of them needs to display the SubReport, it will set the visibility of the Group Footer to true for ALL 5 groups, rather than just the individual group that should display the SubReport.
The only solution I have found so far, is to programmatically set the Height property of the Group Footer section to 0, which works for the most part, as the section will grow to make room for the SubReport that needs to be displayed. However, the SubReport is a dynamic height, and I need to force it to 7.65in. I tried programmatically settings the Group Footer height to 7.65in when the SubReport needs to be displayed, but I get the same issue, where it sets the height to 7.65 for ALL groups instead of just the one.
How would I go about forcing the Height of the SubReport, in order for the Group Footer to size itself accordingly? I do not see a Height property of the SubReport. I think that the answer is just to set the height of the SubReport, that way it will be per group, rather than for the whole report, but I am just not finding the Height property. Thanks.
Brian Williams
I then try to set the visibility of the Group Footer section based on the same logic as the SubReport visibility, and that seems to work, except that it applies the same visibility to ALL group footers. So say I have 5 groups, and only 1 of them needs to display the SubReport, it will set the visibility of the Group Footer to true for ALL 5 groups, rather than just the individual group that should display the SubReport.
The only solution I have found so far, is to programmatically set the Height property of the Group Footer section to 0, which works for the most part, as the section will grow to make room for the SubReport that needs to be displayed. However, the SubReport is a dynamic height, and I need to force it to 7.65in. I tried programmatically settings the Group Footer height to 7.65in when the SubReport needs to be displayed, but I get the same issue, where it sets the height to 7.65 for ALL groups instead of just the one.
How would I go about forcing the Height of the SubReport, in order for the Group Footer to size itself accordingly? I do not see a Height property of the SubReport. I think that the answer is just to set the height of the SubReport, that way it will be per group, rather than for the whole report, but I am just not finding the Height property. Thanks.
Brian Williams