I created a subreport that established a shared date variable; this variable was then passed back to the main report (where I had already declared the same shared variable) and displayed. The problem was that, if I suppressed the subreport, the shared variable disappeared from the main report. Apparently, you can't pass a shared variable from a subreport to a main report if the entire subreport is suppressed.
Since I didn't want the subreport to appear at all, this created a problem for me.
The workaround I came up with was to suppress all of the fields in the subreport except for the formula creating the value I wanted. Then I placed the subreport in the space formerly occupied by the shared variable. This way, there was really no need for a shared variable at all.
The value you see in the main report is really the formula from the subreport's footer. It looks like a field, but it's really an entire subreport with only one field showing.
Is there a better way to do this, or is this the right workaround?
Since I didn't want the subreport to appear at all, this created a problem for me.
The workaround I came up with was to suppress all of the fields in the subreport except for the formula creating the value I wanted. Then I placed the subreport in the space formerly occupied by the shared variable. This way, there was really no need for a shared variable at all.
The value you see in the main report is really the formula from the subreport's footer. It looks like a field, but it's really an entire subreport with only one field showing.
Is there a better way to do this, or is this the right workaround?