Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Group footer distinct count Post Reply Post New Topic
Author Message
Runner
Newbie
Newbie


Joined: 08 Feb 2013
Online Status: Offline
Posts: 22
Quote Runner Replybullet Topic: Group footer distinct count
     Posted: 08 Feb 2013 at 11:37am
I am having an issue with a formula in my group footer dividing total dollars by a distinct count of units. I received an error a summary has been specified on non-recurring field. I have added:
Whileprintingrecords;
NumberVar X:= 0 ;

Whileprintingrecords;
NumberVar X := x + {@UnitCount} ;

Whileprintingrecords;
NumberVar X ;


Now the totals dollars are not summing, it's only returning the first value but the units are correct. Any suggestions would be appreciated.

Thanks,
Runner
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Feb 2013 at 4:18am
what is @unitcount?
IP IP Logged
Runner
Newbie
Newbie


Joined: 08 Feb 2013
Online Status: Offline
Posts: 22
Quote Runner Replybullet Posted: 11 Feb 2013 at 10:49am
The @unitcount is the number of pieces of equipment.  Each equipment has it's own number.

Edited by Runner - 11 Feb 2013 at 10:50am
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 12 Feb 2013 at 2:45am
Hi

Try this :

Whileprintingrecords;
numbervar x;

Sum({dollars},{Groupname}) / x


Edited by Sastry - 12 Feb 2013 at 2:45am
Thanks,
Sastry
IP IP Logged
Runner
Newbie
Newbie


Joined: 08 Feb 2013
Online Status: Offline
Posts: 22
Quote Runner Replybullet Posted: 12 Feb 2013 at 4:48am
Awesome!  That worked.  I really do appreciate your help.

Thanks.
Runner
IP IP Logged
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