Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Summarise a formula Post Reply Post New Topic
Author Message
bendrick
Newbie
Newbie
Avatar

Joined: 31 Oct 2012
Location: United Kingdom
Online Status: Offline
Posts: 1
Quote bendrick Replybullet Topic: Summarise a formula
    Posted: 31 Oct 2012 at 11:45pm
I have a formula field that I need to summarise. The formula is as follows:

if sum({Command.MR},{Command.JN})= 0 then 0 else 1

I know it's not possible to summarise a formula that contains a sum but have no idea how to get around it

Any help appreciated

Thanks
Ben
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 01 Nov 2012 at 8:25am
you can create a shared variable and increment it as needed:
shared numbervar aSum;
local numbervar temp;
if sum({Command.MR},{Command.JN})= 0 then temp:=0 else temp:=1;
aSum := aSum + temp;
temp
 
later you can display the summary with:
shared numbervar aSum;
aSum
 
HTH
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.