Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress group 1

Status
Not open for further replies.

swiss2007

Technical User
Aug 13, 2007
92
US
I have 2 groups country and region and at the region level I am calulating the %diff between currentmonthtotal and prior yr currentmonthtotal how do I suppress country and region when %diff is less than 5%
 
Please show the content of your actual %diff formula and of any formulas nested within it. Also explain which group is group #1 and which is #2.

-LB
 
Group 1 is country and 2 is region.
At region level I am using a formula like this for present yr
If year(orderdate) = year(currentdate)
and month(orderdate) = month(currentdate)
Then orderamt and I use formula @presentyrsum to sum orderamt
For previous yr
If (year(orderdate) = year(currentdate)-1
and month(orderdate) = month(currentdate))
Then orderamt and I use formula @previousyrsum to sum orderamt
% diff is calculated as (@presenyyrsum-@previousyrsum)%previousyrsum  
 
You didn't show your ACTUAL formulas OR your summary formulas, and I'm guessing that's where the problem lies.

You should be able to use a formula like this for suppression of region:

(sum({@presentyr},{table.region})-sum({@previousyr},{table.region}) % sum({@previousyr},{table.region}) < 5

For suppression of country, I'm a little unclear--do the same criteria apply, or do you just want to suppress the country if all regions are suppressed?

-LB
 
I want to suppress the country if all regions are suppressed. Thanks
 
That's more complicated. I think you would have to save the report under another name and then use it as a subreport in a GH1a (country) section and link on the country field. Then in the sub, use a shared variable like this in the region group section (header or footer):

whileprintingrecords;
shared numbervar cnt;
if sum({@presentyr},{table.region})-sum({@previousyr},{table.region}) % sum({@previousyr},{table.region}) < 5 then
cnt := cnt else
cnt := cnt + 1;

In the country group header (still in the sub), use a reset formula like this:
whileprintingrecords;
shared numbervar cnt;
if not inrepeatedgroupheader then
cnt := 0;

In the country group footer, use:
whileprintingrecords;
shared numbervar cnt;

In the main report, go into the section expert->GH1_b (where your usual country group header fields are)->suppress->x+2 and enter:

whileprintingrecords;
shared numbervar cnt;
cnt = 0 //note no colon

To make the GH1a section disappear, remove the borders from the subreport, format the subreport to suppress if blank(format subreport->subreport tab->check "suppress blank subreport"), suppress all section WITHIN the subreport, and in the main report, format GH1a->check "suppress blank section".

-LB
 
Hi, I thought of opening a new thread but my question is referred to this so I am using the same forum.
There are some text fields in the page header and I would like to suppress when this condition is met

(sum({@presentyr},{table.region})-sum({@previousyr},{table.region}) % sum({@previousyr},{table.region}) < 5

I tried everything, running totals, evaluateafeafter to get a count on the number of records that meet the condition above but I see the correct records calculated in the Report footer but not in the page header. Is there a way to suppress the Page Header when no records meet the condition.


 
Your formula is referencing a specific group, so if used in the page header, it would read the value of the first group on the page. What criterion do you mean to use to suppress the page header text? What is the text you are trying to suppress and why do you want to suppress it?

-LB
 
I have some text fields in the page header like customer name, customer address,currentmonthtotal,prioryrcurrentmonthtotal of the orderamt, %increase
and I am trying to suppress these fields when nothing meets the condition
(sum({@presentyr},{table.region})-sum({@previousyr},{table.region}) % sum({@previousyr},{table.region}) < 5

And. Want to display a message in the report footer
"this customer has no accounts
with order amounts less than 5 % diff"
so when this message is displayed I want to suppress page headers containing the text fields
 
I have some text fields in the page header like customer name, customer address,currentmonthtotal,prioryrcurrentmonthtotal of the orderamt, %increase
and I am trying to suppress these fields when nothing meets the condition
(sum({@presentyr},{table.region})-sum({@previousyr},{table.region}) % sum({@previousyr},{table.region}) < 5

And. Want to display a message in the report footer
"this customer has no accounts
with order amounts less than 5 % diff"
so when this message is displayed I want to suppress page headers containing the text fields
 
The formula is not referencing a particular customer--it is based on a region group. I have no idea how the customer fits into this. In the future please also show the actual formula, as I asked previously, not a description of it.

-LB
 
Sorry LB, Here is the actual desc, thanks for your patience.here is the structure

Page Headers Current PreviousFY %Increase
monthTotal monthTotal
GH1 Country
GH2 Region
Details suppressed
(has customername,
orderamt,address)

GF2 Region id1 3000 4000 -25%
Region id2 2000 4000 -50%


GF1 Suppressed


So when there is no matching criteria of less than 5% for a regioid for the whole report, I want to suppress the Page Headers. Hope I gave you enough information. Let me know if something is needed.
 
I don't see the fields you mentioned earlier as being in the page header, and I'm not following what you are trying to do or why. Can you provide a little more context?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top