Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Call Per from the next number Post Reply Post New Topic
Author Message
rlassalle
Groupie
Groupie
Avatar

Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Quote rlassalle Replybullet Topic: Call Per from the next number
     Posted: 29 Oct 2012 at 3:31pm
Hi there, I have db with different number (column) I need to get the percentage from one number divide the second one.eg
        1,885
        1,885
        3,861
        3,861
        1,976
        1,976
an get this result
100.00%
100.00%
204.82%
204.82%
104.82%
104.82%
3861 / 1885 the prev ones
From the DB get the number the reports has to be formulas that give me the percentage.
 
any idea...Thanks
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 30 Oct 2012 at 8:53am
{table.field}/previous({table.field}) 
 
 check help for Next...it probably has a link to Previous
 
the only caveat is that the function does not respect group boundaries.  Also I don't recall off hand what it will do on the first record, since there is no previous record...you might want to skip the first record by using
if onfirstrecord then
  100
else
  {table.field}/previous({table.field})
 
HTH
IP IP Logged
rlassalle
Groupie
Groupie
Avatar

Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Quote rlassalle Replybullet Posted: 31 Oct 2012 at 6:51am
Thansk for your help. It works
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