ProfessorSnail
Technical User
Hi,
I have been trying to pass a variable from a series of subreports to the main report. The variables are then used to suppress a section.
I've set up the formula to define the variable in each of the subreport (X Y Z for separate subreport). The subreports are placed in separate Group Headings (GH1a, GH1b etc.)
whileprintingrecords;
Shared NumberVar X:=
if isnull({Table.Field})
then 0
Else 1;
The formula is placed in the subreport footer. This part seems to work ok and displays '1' or '0' depending on whether there is data in the subreport.
I then want to add together the variable on the main report. The formula I have used is as follows:
whileprintingrecords;
Shared NumberVar X + Shared NumberVar Y + Shared NumberVar Y
I've placed this formula in within the same group but as a separate section (after all the subreports).
This part does not seem to work. I want to use the result to determine whether the group header section is suppressed i.e.
Suppress if:
{@formular above}=0
What am I doing wrong? Or is there a better way to suppress a section? The problem is not having any of the subreport data available on the main report.
Thanks,
Sam
I have been trying to pass a variable from a series of subreports to the main report. The variables are then used to suppress a section.
I've set up the formula to define the variable in each of the subreport (X Y Z for separate subreport). The subreports are placed in separate Group Headings (GH1a, GH1b etc.)
whileprintingrecords;
Shared NumberVar X:=
if isnull({Table.Field})
then 0
Else 1;
The formula is placed in the subreport footer. This part seems to work ok and displays '1' or '0' depending on whether there is data in the subreport.
I then want to add together the variable on the main report. The formula I have used is as follows:
whileprintingrecords;
Shared NumberVar X + Shared NumberVar Y + Shared NumberVar Y
I've placed this formula in within the same group but as a separate section (after all the subreports).
This part does not seem to work. I want to use the result to determine whether the group header section is suppressed i.e.
Suppress if:
{@formular above}=0
What am I doing wrong? Or is there a better way to suppress a section? The problem is not having any of the subreport data available on the main report.
Thanks,
Sam