Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Computing 2 columns Post Reply Post New Topic
Author Message
argel_joseph
Newbie
Newbie
Avatar

Joined: 26 Apr 2011
Location: Philippines
Online Status: Offline
Posts: 8
Quote argel_joseph Replybullet Topic: Computing 2 columns
     Posted: 27 Apr 2011 at 4:33pm
I have 2 columns Received and Issued, what I want is to compute the 2 columns and show the result on Balance column.

for example:


i have a beginning balance of 100

I input 10 on received and no input on issued column on row(a)

now, if the issued column is equal to 0 then received
column will add to the beginning balance. and now the balance
is 110 on the row(a) where I input the "10".

Now, I input 30 on issued column and no input on recieved column on row(b)

then if the received column is 0 then issued column will subtract
to the balance of row(a) and the difference on Balance Column row(b) will be 80.


Anyone help me here. ..please. .

I need it on my report. .

Thanks in advance


IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 27 Apr 2011 at 5:35pm
Are you doing this as a summary to add the columns?and if so have you tried to input a negative number for the issued?

If not a summary you may be able to do this as a running total and input the negative that way.


Edited by CircleD - 27 Apr 2011 at 5:38pm
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 28 Apr 2011 at 5:42am
You can use variables to accomplish this as well.

Declare your beginning balance in the report header as a global variable.

For each record, add the amount in the "received" box to the variable, and subtract the amount in the "issued" box from the variable.

In the report footer, print out your variable.

With a running total, write a new formula that calculates the difference between received and issued, then sum on that formula.

Edited by Keikoku - 28 Apr 2011 at 6:36am
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