Topic: Hide Footer based on Report Section Posted: 08 Aug 2017 at 10:24am
Have a scenario where there is a main report with an embedded sub report (which can be a varying lengths). Trying to find a way to NOT show the footer (page count) on the sub report pages and then continue again on the main report. I can't just use Suppress where PageCount=page number because the sub report could 1 page or 5 pages long.
Rough Outline of report is
Report Header
Page Header
Group 1
Details Aa
Details Ab
Details Ac (Sub Report)
Details Ad
Group 1
Page Footer.
Is there a way to have the footer suppress where the Report section equals Details Ac?
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Posted: 10 Aug 2017 at 6:57am
What Sastry didn't mention is that you need to create a variable to do this. So, your formulas would look something like this:
{@Flag_Yes}
stringvar flag := 'y';
' '
{@Flag_No}
stringvar flag := 'n';
' '
(the last line with the blank string is there so that noting appears on the report when you use this.)
Variables have to be declared in every formula where they're used. Using them like I show above, without any modifier (e.g., Local, Shared, Global) makes them Shared so that they will share values in all places in the "report" where they're declared (Main report OR subreport, but not between the two...)
Your suppression formula will then change to this:
stringvar flag;
flag = 'y'
You'll notice a couple of things here. In the first two formulas I used ":=" to set the value. When using variables, you use ":=" to set the value and "=" to compare. You'll also see I didn't use an "If..Then" structure here. If an expression evaluates to true or false, it is redundant to use "If .... then true else false", you can just use the expression itself.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum