Print Page | Close Window

[Resolved] Summarys in Groupheader.

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=12606
Printed Date: 03 May 2024 at 11:49am


Topic: [Resolved] Summarys in Groupheader.
Posted By: Matheuus
Subject: [Resolved] Summarys in Groupheader.
Date Posted: 14 Mar 2011 at 2:55am
Hi,

I have a report (In Crystal Report for Visual Studio 2005) and i need a few summarys(Count) staying in groupheader.
Also, this summarys have some conditions.

Example: I have a column named "Situation", i need a summary(Count) staying in groupheader for every register from that group where "Situation" is equal to "1'.

I tried many different ways so far, but i realized that the groupheader is printed before the section details and that's because they didn't work.

Light my way guys ! =D

Thanks.



Replies:
Posted By: hilfy
Date Posted: 14 Mar 2011 at 4:53am
You can't use running totals in group headers, but you can use summary functions.
 
To get the conditional summaries you're looking for, create a formula similar to this:
 
If {table.Situation} = 1 then 1 else 0
 
Then place a count summary on this formula in your group header section.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Matheuus
Date Posted: 15 Mar 2011 at 3:26am
Hi hilfy!

First of all thanks for the answer.

Well, i tried to put this @formula in my section details:

If {Table.Situation} = '1' then 1 else 0

and i put this @anotherFormula in my groupheader:

count({@formula},{Table.Name})

The result was, it count all the records without exclude the records where Table.Situation != '1'

I also tried changing the @formula by:

If {Table.Situation} = '1' then true else false

but the result was the same.

Another idea ?

Thanks all!




Posted By: hilfy
Date Posted: 15 Mar 2011 at 3:42am
Ah....Don't use Count, use Sum.  Sorry about that!
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Matheuus
Date Posted: 15 Mar 2011 at 7:15am
Hi hilfy!

It worked!

Thanks!




Print Page | Close Window