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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to supress a group and subgroups based on formula

Status
Not open for further replies.

SuperTime

Programmer
Dec 21, 2004
183
US
I have the following fields

G4: Name Number

G5: Description

Data Sample:

Tim 100223
BlahBlah

Luk 100223
Blah2

Gorden 20011
Blah3

Tim 100223
Blahlah

I want to supress all the groups below only if the combination of the name and the number duplicates.

I have created a formula @concat that combines the values of the two fields in to one.

Tim100223

So how do I supress the groups if the @concat is duplicated?


Please advice.

Thanks
 
Hello!
Alternate-click the group name field in the design section of your report...click on format field...
You will see the format editor dialog box appear...Click the "Common" tab...
At the bottom you will see "Suppress if Duplicated"...Check that box...
Hope this helps!
Boni


Boni J. Rychener
Programmer
boni@hammerman.com
Hammerman Associates, Inc.
 
Nope doesn't work . You are asking me to supress the formula/ groupname. But that what I dont want. I want to supress the groups below it as well.

And besides that for some reason when I just tried to supress the formula if duplicated, that doesnt work either.

:(


Please help.

THanks.
 
hmmm...
sorry I miss understood...
let me think about this, I will post as soon as I find anything...
Boni
:)




Boni J. Rychener
Programmer
Hammerman Associates, Inc.
 
Okay...let's try again!
This will only work if you absolutely never want the group to display more than once...
Try creating three calculated fields---one to initiate a variable, one to accumulate the variable (var = var + 1), and one to reset the variable...
Insert the init_variable into the report header, the accum_variable in the group header (#4), and the reset_variable in the group footer.
Then conditionally suppress the group if the variable is equal to 2 using the section expert...
Hope this helps!
Boni
:)


Boni J. Rychener
Programmer
Hammerman Associates, Inc.
 
So Boni, are you asking me to create these three shared variables as numbers??

Can you please elaborate I am a little confused here.

Also please keep in mind that the data sample that I have given is from G4 onwards my data shown based on other groupings as well

So I am creating an accu_variable that has to only carry the value for that group and the groups below it.

So my extended sample looks as follows:

Data Sample:

DeptA
Tim 100223
BlahBlah

Luk 100223
Blah2

Gorden 20011
Blah3

Tim 100223
Blahlah


DeptB
Tim 100223
BlahBlah

Luk 100223
Blah2

Gorden 20011
Blah3


Now since I said that the person with the same names have to be displayed only once
so in the above example from deptb, since tim is displayed once it has to be shown and not suppressed.

pls. advice.
thanks
 
Sorry about that...
Here are the three formulas to create
Formula 1: (insert in report header)
Init_Variable
WhilePrintingRecords;
NumberVar Counter := 0;
Dept := 0
Formula 2: (insert in group #4 header)
Calc_Variable
WhilePrintingRecords;
NumberVar Counter;
Counter := Counter + 1;
Formula 3: (insert in group #4 footer)
Display_Variable
WhilePrintingRecords;
NumberVar Counter;
Counter := Counter
Then use the section expert to suppress group #4 where Counter > 1...this should also suppress anything inside group #4 for the suppressed item...
This will allow group #4 to display once per group #3...
I hope that I elaborated enough...
Boni
:)


Boni J. Rychener
Programmer
Hammerman Associates, Inc.
 
in reviewing this I noticed a mistake in the last formula...sorry about that...
The Display_Variable should be Reset_Variable and should show:
WhilePrintingRecords;
NumberVar Counter;
Counter := 0;
Sorry again!
Boni
;)


Boni J. Rychener
Hammerman Associates, Inc.
Crystal Training and Crystal Material
On-site and public classes
Low-cost telephone/email support
FREE independent Crystal newsletter
800-783-2269
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top