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

Display a Value in Group Header

Status
Not open for further replies.

jwrjwr54

Technical User
Apr 21, 2003
41
US
Using Crystal Reports XI against an Oracle database.

How do I display a field/GH value in a higher group? In this example, Task B has a Start Date of 11/25/2009. I would like to display this value in GH1, but because of the null values, if I drag the field to GH1, I get blanks.

The formula (or maybe a variable?) would be: if Task B has a value <> NULL, then display the value in GH1 (so I can hide GH2). Many thanks


Project Task Start Dt
GH1 Proj 1
GH2 A
GH2 B 11/25/2009
GH2 C

GH1 Proj 2
GH2 A
GH2 C
GH2 G
GH2 B 11/25/2009
GH2 D 1/15/2010
GH2 F
 
The question is whether the date in the GH2 is already a summary or whether it reflects the date on all Group #2 detail records. If the latter is the case, you can create a formula:

if {table.task} = "TaskB" then {table.startdate}

Place this in the detail section and then insert a maximum on this at the Group #1 level, and then drag the result into the group header.

-LB
 
When you insert a summary into a group, the summary is calculated for that level of grouping. Moving it to another level group usually means that the summary is calculated at the new level

All the summary functions are available to the formula editor for any group in the report.
Sum({Table.field}) is a grand total
Sum({table.field}, {table.groupfield}) is a summary at the groupfield level

Special case for groups on date fields...
Sum({table.field},{table.datefield},"frequency") where frequency is "daily", monthly, etc.

One problem to watch out for is that if you change or delete the group, you may end up with invalid formulas.

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top