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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datatype conversion

Status
Not open for further replies.

karnd

Programmer
Feb 1, 2003
190
US
Hi,

I have an amount field in money datatype but in Crystal XI could try to do the following
if isnull(Amount)
then ('N/A')
else
(Amount)
but getting error "A string is required"
But would like to handle when there is an amount it shows amount otherwise it shows "N/A"

Thanks alot,
 
You can't have two different datatypas returned within a formula.

Try:

if isnull(Amount)
then ('N/A')
else
totext((Amount))

There are parameters you can pass in the TOTEXT function.

-k

 
Hi,

Then i got into a question by using of the above syntax - so in that case how should i total to the group footer and report footer using the above formula field.

I have tried using of the Summary button but i dont see SUM function for the above formula field.

I would like to show TOTALs both at the Group Footer level and Report Foooter level.

Appreciates for your ideas.

Thanksa lot,
 
Dear Karnd,

Create a different formula for the sums.

if isnull({Table.Amount})
then 0
else
{Table.Amount}

Place the field in the detail section, create your summaries and then delete or suppress the field from the detail section.

regards,

ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top