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

Don't display in header if detail lines are suppressed 1

Status
Not open for further replies.

TimothyP

Programmer
Aug 6, 2002
135
US
I am running a Crystal XI report against a SQL table.

My SQL table looks something like this

Fund Dept Character Amount
100 A 1 100
100 A 2 200
100 B 1 0
100 B 2 999
100 B 3 888

My report has 3 groups (Fund, Dept, and Character), all of which are referenced in my page header.

I suppress the detail lines when Amount = 0.

In my page header, how can I ONLY display the Characters when the detail lines are NOT suppressed?

In other words...
Based on my sample table above, I want my report to look like this.

***Page 1***
PH Fund: 100 Dept: A Character: 1
D Amount = 100

***Page 2***
PH Fund: 100 Dept: A Character: 2
D Amount = 200

***Page 3***
PH Fund: 100 Dept: B Character: 2
D Amount = 999

***Page 4***
PH Fund: 100 Dept: B Character: 3
D Amount = 888

Thanks in advance!
Tim
 
You should consider eliminating the rows from the report ratehr than suppressing them in the details.

Go into the Report->Selection Formulas->Record and place something like:

{table.amount} = 0

If this amount is not a field in the details, explain what it is, saying amount is far from descriptive.

-k
 
If you used a repeating group header for the Character group (report->group expert->options->repeat group header on each page), and added the groupnames from the other two groups to this header, you could use the group header instead of a pageheader and then you wouldn't run into this problem.

-LB
 
Actually, on second thought, I guess you would have to conditionally suppress the character group header using:

sum({table.amt},{table.character}) = 0

And then you would need to make the page break on the character group footer conditional also:

sum({table.amt},{table.character}) > 0

-LB
 
I apologize for the lack of information in my first post, as you know, it is not always easy relaying complex CR definitions in a forum environment and I understand that challenge transfers to anyone trying to help.

In an attempt to isolate my problem, I over simplified my situation and did not give enough details to help you help me. Let me add some more detail to see if this helps.

This report is a subreport, so I already have the Page Header information in a Group Header for it to show on each page.

The "Amount" reference refers to a group summary. When I try to add the formula {@f_Group4_Summary}=0 in the selection formula, I get the CR message, "This formula cannot be used because it must be evaluated later." Which makes sense.

Any other ideas?
 
In the subreport, go to report->selection formula->GROUP and enter the contents of {@Group4_Summary} there like this:

sum({table.amt},{table.character}) > 0

This will display only those character groups that are greater than 0. Remove all section suppression formulas.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top