Tips and Tricks
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Tips and Tricks
Message Icon Topic: Group Summary formula Post Reply Post New Topic
Author Message
bash
Newbie
Newbie


Joined: 30 Jan 2013
Online Status: Offline
Posts: 12
Quote bash Replybullet Topic: Group Summary formula
    Posted: 01 Feb 2013 at 10:40pm
Hi,
I am using CR 9.2. Please help me to form a formula for a group header. When i use 'Insert>Summary', it gives me exact summary of my group. But no option to put a condition by date range. How can i make a conditional sum for a group? I will try to explain it more with an example:
 
Sugar (Group)  (Summary of below items needed here with condition of date. Eg: 50)
  - Sugar itemA      20
  - Sugar itemB      20
  - Sugar itemC      10
 
Tea (group)      (Summary of below items needed here with condition of date. Eg:40)
  - Tea itemA          10
  - Tea itemB           10
  - Tea itemC           20
 
 
Thanks for your help..
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 11 Jul 2013 at 4:23am
I know way late...but shared variables or running totals would be the answer.

shared variables come in groups of 3 formulas usually:
reset (group header)
shared numbervar s:=0;
"" //hides the 0 from the formula

increment (details)
shared numbervar s;
if {table.field1} > some criteria then
s := s + {table.field2};

"" //hides the output

display (group footer)
shared numbervar s

I know it is late, but perhaps it will help in the future.
The locations: group header/footer and detail are just suggestions/most typical locations for these formulas.

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.