Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Running total - Resetting on change of field Post Reply Post New Topic
Author Message
awhawh
Newbie
Newbie


Joined: 31 Jul 2008
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote awhawh Replybullet Topic: Running total - Resetting on change of field
    Posted: 31 Jul 2008 at 12:30pm

I was wondering if someone could help me regarding an issue I have with running totals.

Currently, the running totals feature allows you to select the following:
  • [reset] on change of field
  • [reset] on change of group
  • use a formula

What I would like to do is use the first option and select more than one field. However, the option only allows you to select one field.

My question is, could I write a formula to mirror what the the 'change of field' is doing, but with more than one 'change of' field?
 
The example belows shows that on the change of 'Name' and 'Account', calculate the total money that has left the account.
 
Name                Acount                Money out (my running total)
 
P.Jones             Account XYZ        -12,000
A. Michaels        Account ABC       -23,000
A. Michaels        Account 123       -14,000
 
If I create a 'change of field' for just the 'name' I would get the following:
 
Name                Acount                Money out (my running total)
 
P.Jones             Account XYZ        -12,000
A. Michaels        Account ABC       -37,000
A. Michaels        Account 123       -37,000
 
Note: I have incorporated the running total within a cross-tab.
 
Thank you
 
Adam
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 31 Jul 2008 at 5:37pm
Yes, you'll have to use the third option that uses your own formula. For example,
{yourtable.Name} <> PreviousValue({yourtable.Name} AND
{yourtable.Account} <> PreviousValue({yourtable.Account}
I cover all the running total options as well as how to write custom functions in my Encyclopedia book. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.


Edited by BrianBischof - 31 Jul 2008 at 5:38pm
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
awhawh
Newbie
Newbie


Joined: 31 Jul 2008
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote awhawh Replybullet Posted: 01 Aug 2008 at 2:45am

I shall give this a go.

Thanks for your help

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.016 seconds.