Skip to Content
0
Former Member
Apr 09, 2012 at 07:51 PM

Formula for indicating whether or not subreport is suppressed

684 Views

Hi,

The structure of my main report depends on whether or not a subreport is suppressed. If it is suppressed, I need a field on my main report in a different place.

The solution I've adopted is to pass a boolean variable from my subreport back to the main report. The formula in my subreport looks something like this:

Shared BooleanVar isResults;

If Count ({MyData.FieldName}) > 0 Then
isResults = True
Else
isResults = False

The subreport is structurally very simple. Report Header, Details, Report Footer. The Details contain the records that populate this subreport if there are any. I've placed the Count summary in the Report Footer. The formula above is also in the formula.

For some reason, this formula is not working correctly. It invariably returns False. If I have two records, and my Count field shows a value of 2, why would my formula return False?

Thank you