Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Need a formula Post Reply Post New Topic
Author Message
mjawadkhatri
Newbie
Newbie
Avatar

Joined: 09 Sep 2009
Location: Pakistan
Online Status: Offline
Posts: 14
Quote mjawadkhatri Replybullet Topic: Need a formula
    Posted: 19 Jul 2011 at 10:18am
Hi, I need Some help. i have report which generate invoice, there is two amount field one in $ and other is PK , In $ field always some value but some time pk field is null,

Now

i need some formula which is check,when PK field is null then convert $ field in word else  convert pk field

hope you are understand my question

I use blow formula to convrt number into word this formula working perfectly

currencyvar tt;
currencyvar dect;
tt :={ship.comm_amount};
dect := tt - Truncate(tt);
tt := truncate(tt);
dect := dect * 100;
if dect = 0 then
UPPERCASE('$ ' + ToWords (tt,0 )) + ' ONLY'
else
UPPERCASE('$ ' + ToWords (tt,0) + ' And CENT ' + ToWords(dect,0)) + ' ONLY ';


Thanks in advance

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 21 Jul 2011 at 7:51am
if isnull({table.pk}) then
  tt:={table.pk}
else
 tt:={table.$}
 
or something similar
 
HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.