Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Get last Value Post Reply Post New Topic
Author Message
fernando
Newbie
Newbie


Joined: 19 May 2008
Location: Portugal
Online Status: Offline
Posts: 3
Quote fernando Replybullet Topic: Get last Value
     Posted: 26 May 2008 at 2:52am
hy there again!
 
 
i still got one problem with one of my reports.
 
Here's the deal:
 
ITEM CODE - ITEM NAME - JAN - FEB - MAR - APR - MAY
12345        -  glass n1    -  1,1 - 2,1  - 3,1  -  1,9  - 2,1
42341        -  fiber za1   -  2,1  -        -        -         - 3,4
 
for the item code 42341 only JAN and MAY have prices because the price only changed in MAY.
 
----> what i want is to tell that in FEB if field has no value the USE THE LAST MONTH VALUE, then the same do MAR and APR.... and any other months, if the value is empty use the latest value available...
 
anyone can help??? thanks... Confused
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 27 May 2008 at 12:41pm
You can use "PreviousValue ". Look under 'functions' in CR help. Read through the detail and see if it does what you want. There are also some examples that may be helpful.
 
Hope this will do what you want.
 
Regards,
 
John W.
www.CustomReportWriters.net
IP IP Logged
fernando
Newbie
Newbie


Joined: 19 May 2008
Location: Portugal
Online Status: Offline
Posts: 3
Quote fernando Replybullet Posted: 28 May 2008 at 9:31am
hy there!
 
i cant find that function "PreviousValue ", but i think its because of my CR, iam working with version 8.0 :(
 
but the problem remains, imagine i get a value for month april, ok until here. but since january all the values are empty because the last value is in december of the last year.
 
and that last value(from december) is a SUM OF 3 AMOUNT FIELDS
 
damn this is getting hard Smile
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 28 May 2008 at 3:39pm

Since you dont a version that will read the previous value, anything I could suggest would involve multiple lines of code, likely dispersed in formulas for each month. While it would someone else on the forum may have a better solution. I hate to have anyone do unnecessary work, and perhaps CR 8 has a function similar to PreviousValue.

Anyone else have a quick solution for fernando?
 
Regards,
 
John W.
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