Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Crystal Report Previous Function in Grouping Level Post Reply Post New Topic
Author Message
ckchwa
Newbie
Newbie
Avatar

Joined: 20 Dec 2009
Location: Malaysia
Online Status: Offline
Posts: 2
Quote ckchwa Replybullet Topic: Crystal Report Previous Function in Grouping Level
     Posted: 20 Dec 2009 at 9:19am
Hi All,

I have one requirement which need to be bring my "Carry Forward (CF)" value from to another row in grouping level. For eg, I have a date group. In the grouping level, i have "Balance Forward (BF)", "Current Amount" and "Carry Forward (CF)".

Date                    BF                      Current Amount                 CF
1 Jan 2009          0                        100                                    100
2 Jan 2009          100                    50                                      150
4 Jan 2009          150                    100                                    250


I need to bring down the CF from one date to another date as example above in Crystal Report. However, i had tried on "Previous" function in Crystal Report formula but it could not be used in grouping level.

Anyone have any idea can be perform on this situation? Any formula can be use to resolve this?

Appreciated your kind suggestion.

Thanks.

Regards,
CK.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 21 Dec 2009 at 6:26am
I would create a formula with a shared variable to carry the amounts, DBlank would probably offer up running totals.
 
Formulas like this usually come in groups of 3, but yours might be only 2.
 
Usually there is a reset somewhere (usually a group header):
shared numbervar CF:=0;
""//to hide the zero on the report.
 
An incrementor (usually in details)
shared numbevar CF;
CF := CF + {table.field};
""//though if you want to see this number remove the ""
 
A reporter (usually in footer)
shared numbervar CF
 
HTH
IP IP Logged
ckchwa
Newbie
Newbie
Avatar

Joined: 20 Dec 2009
Location: Malaysia
Online Status: Offline
Posts: 2
Quote ckchwa Replybullet Posted: 21 Dec 2009 at 6:39pm
Hi,

Thanks for your prompt reply.

Can you briefly describe the step for doing this by using the shared variable?

Thanks Smile
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 22 Dec 2009 at 6:16am
I did. Each 'paragraph' is the syntax to go in a formula to access the variables.
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