What is {@Display Gap} ?
Spykair
Main Topics
Browse All TopicsWe have a report that includes variables to calculate an adjusted total.
The problem we have is that we need to suppress a group header where the value of a formula (including a variable) in the group footer is zero.
The setup of the report is as follows:
In a group header (Group 1 - Employee) is the folllowing formula called Declare Achieved Target:
WhilePrintingRecords;
NumberVar AchievedTotal;
if not InRepeatedGroupHeader then
AchievedTotal := 0
else if InRepeatedGroupHeader then
AchievedTotal := AchievedTotal
Then in the next group header (Group 2 -Competency) is the following formula called Calc Achieved Target:
WhilePrintingRecords;
NumberVar AchievedTotal;
AchievedTotal := AchievedTotal + {@Adjusted Achieved}
Then in the footer for Group 1 (Employee) is the following formula called Display Achieved Target:
WhilePrintingRecords;
NumberVar AchievedTotal;
AchievedTotal;
What we need to have happen is that if the value of the 'Display Achieved Target' is zero the Group header and group footer for Group 1 Employee need to be suppressed.
We can suppress the footer record by including the following in the suppress option against the footer
If {@Display Gap} = 0 then true else false
But this doesnt work for the header. I understand that this is because of the order in which Crystal processes but we need to find a way of suppresses the header row?
Any ideas if this can be done? We are using Crystal Reports v9.
thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I am not sure you can suppress the header based on the footers information because of the sequence that CR runs. The header will always run before the footer. Of course, you can try the beforeprintrecord function or provided your footer will lead into the next header. I am not even 50% positive on this. Will stay tuned.
Hi Dave Smith,
In the case where we want to suppress the header all the detail records for the group would be suppressed and the footer would be suppressed.
Hi Outn, I've tried it as all combinations and the header is still appearing.
I'll see if the beforeprintrecord function works and advise
thanks for all your suggestions
Hi,
I've tried adding
If {@Display Gap} = 0 then true else false
to the group select but the formula cant be saved
message is 'This formula cannot be used because it must be evaluated later.'
I then tried
Adding the following to the actual group header record
whileprintingrecords;
if {@Display Gap}= 0 then true else false
and this works. the header record no longer appears.
thank you for all your help
I still cannot see how your stated conclusion will apply to the Group as a whole or even for the Group Header:
whileprintingrecords;
if {@Display Gap}= 0 then true else false
I have tried the "whileprintingrecords;" state in a similar example, and it will always analyze differently for the Group Header and its Footer. The Header analysis is based on the "previous" Group's result, not on the "Current" Group.
Is there a "working" solution for this issue?
JR
Business Accounts
Answer for Membership
by: kbens0nPosted on 2006-07-04 at 21:31:32ID: 17040146
Does the "Accepted Answer" for this previous inquiry have any applicability?
e.com/Data bases/Crys tal_Report s/ Q_214607 58.html
http://www.experts-exchang