Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: showing change of values Post Reply Post New Topic
Author Message
Heedsie
Newbie
Newbie
Avatar

Joined: 18 Aug 2010
Online Status: Offline
Posts: 5
Quote Heedsie Replybullet Topic: showing change of values
     Posted: 19 Aug 2010 at 10:23pm
could anyone help me with the following.
 
I am trying to find a change in value from looking at the same field but different revisions.
 
what we do is calculate a claim many times in a month, when we do this it changed a field called "claim revision". everytime we calculate the claim, the latest claim will be value of '0' and the previous claim calculated with go to '1'
 
i can get both revisions to show on the report but what i need is a formula that shows me any changes in money value from claim revision 1 (old) to claim revision 0 (new). i also need it to look at any money value that wasnt on revision 1 but is now showing on revision 0.
 
i was given this formula from our support but it doesnt work.
 
If{CLAIM.Revision} = 0 and
{@Product Total} <> Previous ({@Product Total}) Then True Else
If{CLAIM.Revision} = 0 Then True Else False
 
product total is the money value at the end ie £234.54
 
hope someone can help as ive been trying to resolve this issue for 2 months now lol thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Aug 2010 at 4:18am
the formula is a good start but can you post some sample rows of data and how you want to calculate them
IP IP Logged
Heedsie
Newbie
Newbie
Avatar

Joined: 18 Aug 2010
Online Status: Offline
Posts: 5
Quote Heedsie Replybullet Posted: 20 Aug 2010 at 5:28am

Sorry DBlank, im struggling to show you what it looks like via this forum.

It will look like below
 
Code         Type   Cost        Units   Product Total
 
Joe Bloggs
Revision 1
RET001      W       50.00     3.00     £150.00
TVL001      W       7.00       3.00     £21.00
Revision 0
RET001      W       50.00     3.00     £150.00
TVL001      W       7.00       3.00     £21.00
 
So we would have this for many people each person will have its own values.
 
what we are trying to achieve, is to show all people which value has chagned from revision 1 to revision 0
 
example
Joe Bloggs
Revision 1
RET001      W       50.00     3.00     £150.00
TVL001      W       7.00       3.00     £21.00
Revision 0
RET001      W       50.00     2.00     £100.00
TVL001      W       7.00       2.00     £14.00
 
we would then expect joe bloggs to show up on the report as he has changed value. but also we want to show joe bloggs up if he wasnt on revision 1 but is now on revision 0
 
hope this helps
thanks DBlank
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Aug 2010 at 8:23am
if you change your sort to by by name then the RET001 field then desc by revision field you can use a suppression formula using a version of the formula you had
or
if there are always a maximum of 2 rows (1 row of revision1 and one row of revision0) you could get a little more tricky about it.
group on name
group on RET001 field
make a formula field as
if revisionfield = 0 then currencyfield *(-1) else currencyfield
do an insert summary on this formula field at group2 level
do a group selection criteria of that summary <>0
 


Edited by DBlank - 20 Aug 2010 at 10:22am
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