on 02-13-2012 11:11 AM
Dear Sir,
i am facing a problem in crystal report formula in which i has to use if condition and perform add and subtract
in a row the design is describe under
_*in qnty_ _production_ _out qnty_*
*600 600 0*
*1200 1800 0*
*0 1300 500*
*300 1600 0*
*0 1200 400*
*400 1600 0*
in qnty has to add and outqnty have to subtract
i has used this formula
WhilePrintingRecords;
NUMBERVAR NUM9;
NUMBERVAR NUM8;
if {@detail}=1 then
NUM9:={@openingbalance}
ELSE
if {trialprocedure2;1.InQty}>=0 then
NUM9:= NUM9 +{trialprocedure2;1.InQty}
else
if {trialprocedure2;1.OutQty}>=0 then
NUM9:= NUM9 -{trialprocedure2;1.OutQty}
plz give solution for this problem
Edited by: bhatt45 on Feb 13, 2012 12:12 PM
Hi
Iu2019m able to get the desired results, you may have to follow three steps to create this:
1. Sum the opening qty. Normally we will have only one opening qty, which is off last year closing qty.
Sum(@openingqty)
2. Create a running total u2013Go in Field exploreru2014Running total u2013new u2013OpenQtyu2014add the open qty field and sum it.
Place the same field in your detail.
3. Create a running total for your out qty also .. follow step two.
4. Now create a formula u2013(Sum(@openqty)+#OpenQty )-#ClQty.
This will give you the closing qty for each row.
Thanks,
Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have to take closing of a month to next month opening,In the production quantity.and i dont have to use sum because i have to
show all month entry so i can sum it.So please see the problem.
(opening ) (production) (sales)
or inqnty opening or outqnty
opening should be last month closing
production should be opening +inqnty - outnty
the production should be add and subtraction of inqnty and outqnty
it should form a primid so that production - sales as show closing qnty
diagram is post in pervious post
inqnty production outqnty
0 1 0
2 3 0
5 8 6
0 2 1
0 1 0
production should work like this ifonfirstrecord then opening value of last month with show
and in next value inqnty will be add to production and outqnty will be subtract from production and so on the process follow
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.