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

Conditional % Format

Status
Not open for further replies.

basquiat

Technical User
Jun 1, 2005
22
ZA
Hi

I've got a report with a formula field;
Depending on the paramater selected by the user, the field should be displayed either as a number or as a %;

Is there an easier way of doing this apart from adding another formula field with a % format and suppressing the fields based on the paramater selected?;

Thanks
 
Rt click the field and select format field. Customize the display to enable currency symbol, use % as the currency symbol, and make it a trailing currency symbol.

Finally, hit the X-2 button to the right of the currency symbol and enter a formula:

if {?Parm}="Pct" then "%" else ""

Replace the first part of the formula above with the proper test for the parameter value you are using.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
If there were more than one formula fields with this problem, it would make sense to create a formula field with dgillz's test and include it with the values that might or might not per percentage.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top