Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need formula in Crystal Report 1

Status
Not open for further replies.

hormaz

MIS
Oct 22, 2011
24
US
I want to overcome a crystal report situation,In my report there are two main fields,
LCY_Balance and FCY_Balance,
When i run the report.. It shows this scenario.

FCY_Balance LCY_Balance
GCB $5 RS. 250
LCY $5 RS. 249
Difference: 0 1

My requirement is when the fcy balance is zero then the lcy balance should also come as zero.In the report there is no conversion formula. Kindly guide. Thanks
 
Hi,
Do you mean you want to display something different from what the actual data from that field is ?

If so use a formula for that field like:

@fcy

If FCY_Balance = 0 then 0 else LCY_Balance

place that formula in the report and not the field itself.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Turkbear,
Thanks for your feedback. My requirement is whenever above scenario occur the difference feild should tally, but it doesn't tally due to different foreign currency rate taken by LCY Balance automatically.

Eg,
FCY = rs 49
LCY= rs 48

I just want that LCY should also be rs 49.
 
How are you calculating the difference for FCY? What is the content of your formula?

-LB
 
There is no formula both are separate feild, there is no conversion formula too.
 
In your first post you are showing differences of 0 and 1. What is the content of the formula you used to calculate this?

-LB
 
Between the lcy balance and fcy balance there is a one formula called FCY code. the formula contains
if{ib600mb.pfd_account_ccy}="INR" then "fcy" else {ib600mb.pfd_account_ccy}
 
That isn't what I meant. However, if there are only two rows, you could use a formula like this in place of the LCY Balance field:

//{@LCY_Bal}:
if {FCY_Balance} = previous ({FCY_Balance}) then
previous({LCY_Balance}) else
{LCY_Balance}

If this is being done within a group,e.g., {table.account}, then the formula should be:

//{@LCY_Bal}:
if not onfirstrecord and
{table.account} = previous({table.account}) and
{FCY_Balance} = previous ({FCY_Balance}) then
previous({LCY_Balance}) else
{LCY_Balance}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top