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

run logic from details for the group header in CR 2

Status
Not open for further replies.

jagdishkab

Programmer
Jun 4, 2003
3
US
Hi,

I have a boolean field (test) in the database. The crystal reports does grouping on a unit. Even if one value goes false then i have to show false on the group header for the detailed items which include the boolean field.

Question is how to get the logic from the details item and place it on the header before the detail items are printed on crystal report

Thanks
 
OK, I guess you're trying to say that you need to display false in the group header if ANY of the boolean values for a given group are false.

Unfortunately I don't have Crystal with me, so I can't test, but try:

Create a formula of:

@MyBooleanFormula
whileprintingrecords;
if isnull({table.boolean})
or {table.boolean} = false then
"False"
else
"True"

Now create a formula in the group header of:

minimum(@MyBooleanFormula,{table.groupfield})

I assumed that the field might be null as well, correct it if required, but if it's null or false in the above it will display accordingly.

You might be able to just use:

minimum({table.boolean},{table.groupfield})

-k
 
I think you should be able to right click on the boolean field and insert a minimum at the group level. Then drag the result from the group footer to the group header.

-LB
 
Thanks a million ...
synapsevampire and lbass
u made my Day:-D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top