Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Abs value of Sub Total field Post Reply Post New Topic
Author Message
VivTheKing
Newbie
Newbie


Joined: 11 Apr 2007
Online Status: Offline
Posts: 1
Quote VivTheKing Replybullet Topic: Abs value of Sub Total field
    Posted: 11 Apr 2007 at 3:11pm
Hi,
 
I want to have a Trans Total field at the end of the report that should sum the abs value of the Sub Totals.
 
Any help would be greatly appreciated.
 
Thanks in Advance.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 11 Apr 2007 at 3:51pm
You might be able to do this using a variable....I don't guarantee this will work, but you could try something like this:
 
Numbervar TransTotal;
If PreviousIsNull({table.subtotal group field}) then TransTotal := 0;
If NextIsNull({table.subtotal group field}) or ({table.subtotal group field} <> next({table.subtotal group field})) then
  TransTotal := TransTotal + abs(sum({table.field to total}, {table.subtotal group field});
TransTotal
 
-Dell
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.032 seconds.