Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: formating issue Post Reply Post New Topic
Author Message
johnwsun
Senior Member
Senior Member


Joined: 28 May 2008
Location: Australia
Online Status: Offline
Posts: 179
Quote johnwsun Replybullet Topic: formating issue
     Posted: 13 Mar 2009 at 8:02pm
Hi,
 
In my report, I wish to conditionally reformat the values based on different invoice types: Main, Debit, Crredit.
I have a formula where I do some calculations to get value to display in the report, e.g.
 
Item     INV TYPE        Actual INV COST
 
A           M                      $140
A          DB                      $20     
 
B          M                       $45
B          CR                      $5
 
How can I formt the value with DB and CR to ($20), ($5)  --surround with a (). This Actual Inv Cost was obtained throught a formula:
 
if {CCY.ANSI} <> 'SGD' then
  {@get_foreign_$} * {CCS.BNKRATE}
else
  {PRC.UNIT} - {PRC.DISCAMT} + {PCH.AMT}
 
NOTE: the above lines doesn't take into consideration of quantity, that's fine for this circusmstances.
 
I have searched around and can find anything useful in the "Format Field"
Could anyone please advise about the above, thanks in advance.
 
John
IP IP Logged
johnwsun
Senior Member
Senior Member


Joined: 28 May 2008
Location: Australia
Online Status: Offline
Posts: 179
Quote johnwsun Replybullet Posted: 13 Mar 2009 at 9:08pm
Hi
 
I have resolved the problem by changing the formula like the following:
 
if {CCY.ANSI} <> 'SGD' then
   if ({ILT.TYPE} = 'DB' or {ILT.TYPE} = 'CR') then
        "( " + totext({@actual_inv_cost_S$})+ " )"
    else
        totext({@actual_inv_cost_S$})
else
  totext({PRC.UNIT} - {PRC.DISCAMT} + {PCH.AMT})
 
Thanks.
 
John
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