views:

209

answers:

1

I using a three columns in my crystal report credit, debit ,netamount.Here net amount is the running total fields.i have done like this using a formula like{credit}+{debit}.and this formula i have invoked in the running total the net amount is calculating fine but a small issue in this i have to show net amount with cr and dr how to do this. for example:

DEBIT
--------
     .00
     .00
3,933.00
3,630.00
3,630.00
3,933.00
     .00
     .00
3,630.00
3,933.00

DEBIT:
------------                                 
6,875.00
6,875.00
     .00
     .00
     .00
     .00
6,875.00
6,875.00
     .00
     .00

NETAMOUNT:
-----------
 6,875.00DR                             
13,750.00DR
 9,817.00DR
 6,187.00DR
 2,557.00DR
 1,376.00CR
 5,499.00DR
12,374.00DR
 8,744.00DR
 4,811.00DR

In net amount should be display with cr and dr how to do this

A: 

In general, I have found that it is best if you do most of your data preparation in application code and SQL. Then you can just use CR to preset the data in an attractive, usable format.

That said, try this

1) Create the base report with the Credit and Debit columns

2) Create a new formula field that is (Credit-Debit), call it "NetAmount"

3) Create another formula field with the following code

WhilePrintingRecords;

numbervar RunningTotal;  
RunningTotal := RunningTotal +  {@NetAmount}

This would give you [Credit] [Debit] [NetAmount] [RunningTotal]

Does that do what you need?

bluecoder