Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Report Post Reply Post New Topic
Author Message
Paulajw
Newbie
Newbie


Joined: 12 Nov 2008
Location: United States
Online Status: Offline
Posts: 5
Quote Paulajw Replybullet Topic: Report
     Posted: 12 Nov 2008 at 5:41am
I have a report that I need to add a subtotal to. It looks something like this
Assets
            Cash         200
            AR               50
            Inv              30
            Prepaids    100
            Long term    20
Total ASSETS                                          400
 
Liabilities
            Ap                    50
            NP                  100
            Accrue              20
            Acc Pension      10
TOTAL Liab                                            180
 
NOW I need a column between the two that adds up certain things
example    Cash and AR,      prepaids and long term
 
Accru and Acc Pension.
 
How do I get that column between the list and the totals
PJ
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 12 Nov 2008 at 6:31am

You could create a formula that sets the value of totals into variables and compute the value you are looking for.  If these numbers are from a group footer, in the footer you could deploy a formula that has some if statements in it like 'if type="Cash" then Cash:=(the summary value)' Later on you could have another if like 'if Cash<>0 and AR <> 0 then Cash+AR'  I know either/both Cash or AR might be 0 (times are rough) so you might set them initiall to some bogus number and compare to that, but this should give you the middle column.  It won't be pretty, but it should work.

 
Hope this helps.
IP IP Logged
Paulajw
Newbie
Newbie


Joined: 12 Nov 2008
Location: United States
Online Status: Offline
Posts: 5
Quote Paulajw Replybullet Posted: 12 Nov 2008 at 6:37am
But how do I position it in the second column next to AR without having a number coming all the way down the column IE
 
Cash       100      150
AR             50      150
Inv            80       150
PP             20       150
 
I want
Cash       100     
AR             50      150
Inv            80      
PP             20       100
PJ
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 12 Nov 2008 at 6:40am
use another if to only execute the calculation if the first type is 'Cash' or 'AR', otherwise print "" which will display nothing.
 
Hope it helps
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