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

Number required

Status
Not open for further replies.

CRilliterate

Technical User
Dec 7, 2005
467
US
Hi,
I have a formula
IF{?BeginAmount}= $0.00 then 'ALL'

I went to change it to
IF{?BeginAmount}= $0.00 then 'ALL' else {?BeginAmount}

It wouldn't save because it says Number required and highlighted last {?BeginAmount}

BeginAmont field dtatype is a Number.

Please, help.Thanks

________________________________________
I am using Windows XP, Crystal Reports 9.0 with SQL Server
 
IF{?BeginAmount}= 0 then true else
BeginAmont field = {?BeginAmount}
 
The above said is if you are trying to get all records into your report if user gives 0 for your parameter.

If you are trying to create a formula to put on your report then

IF{?BeginAmount}= 0 then 'ALL' else
BeginAmont field = cstr({?BeginAmount})
 
iif({?BeginAmount}=0,TRUE,{FAR_TXN_DETAIL.BASE_AMOUNT}=cstr({?BeginAmount}))

It says Number required here - cstr({?BeginAmount}))

Oh, my...

________________________________________
I am using Windows XP, Crystal Reports 9.0 with SQL Server
 
Also my field set to a 0 as default value, not 'ALL' because it is a Number.

Also when I am trying to change {?BeginAmount} to a 10 for an example message pops up telling me that value MUST be 0.
It does not happen to {?EndAmount} - I can change it.

I've checked both param settings and nothing that I can see that is different.

________________________________________
I am using Windows XP, Crystal Reports 9.0 with SQL Server
 
Hi,
Eliminate the string conversion ( assuming that
{FAR_TXN_DETAIL.BASE_AMOUNT} is a Numeric field and {?BeginAmount} is a Number parameter) .



Code:
iif({?BeginAmount}=0,TRUE,{FAR_TXN_DETAIL.BASE_AMOUNT}={?BeginAmount})

What is the entire formula using these 2 parameters?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I need to get range between BeginAmount and EndAmount.
Thanks

________________________________________
I am using Windows XP, Crystal Reports 9.0 with SQL Server
 
Try IF{?BeginAmount}= $0.00 then 'ALL' else ToText({?BeginAmount}). Crystal considers that a formual field should return just one type of data, either numeric or string.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
OK, but how aboout the range? CR query doesn't show 'BETWEEN' range for some reason.

Let me start over again.

I may have combinations
BegAmount 0
Endmount 0

BegAmount 0
Endmount <>0

BegAmount <>0
Endmount 0

BegAmount <>0
Endmount <>0

BegAmount and Endmount are parameters set to 0 as default.
So when both are 0s - print all amounts.

All the formulas I had been using so far worked for
BegAmount 0
Endmount 0
and
BegAmount 0
Endmount <>0
only but not for all 4 variants.

I am banging my head against the wall. Please, help.

________________________________________
I am using Windows XP, Crystal Reports 9.0 with SQL Server
 
I think I figured this out, thanks

________________________________________
I am using Windows XP, Crystal Reports 9.0 with SQL Server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top