Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: [Resolved] Summarys in Groupheader. Post Reply Post New Topic
Author Message
Matheuus
Newbie
Newbie


Joined: 14 Mar 2011
Online Status: Offline
Posts: 5
Quote Matheuus Replybullet Topic: [Resolved] Summarys in Groupheader.
    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.

Edited by Matheuus - 15 Mar 2011 at 7:16am
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet 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
IP IP Logged
Matheuus
Newbie
Newbie


Joined: 14 Mar 2011
Online Status: Offline
Posts: 5
Quote Matheuus Replybullet 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!


IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 15 Mar 2011 at 3:42am
Ah....Don't use Count, use Sum.  Sorry about that!
 
-Dell
IP IP Logged
Matheuus
Newbie
Newbie


Joined: 14 Mar 2011
Online Status: Offline
Posts: 5
Quote Matheuus Replybullet Posted: 15 Mar 2011 at 7:15am
Hi hilfy!

It worked!

Thanks!

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.