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

Aligment of Decimal points

Status
Not open for further replies.

IanWaterman

Programmer
Jun 26, 2002
3,511
GB
CR2011 on Oracle 11
I have a very complex cross tab report where data has mix of % and non % data. I have managed to suppress the % as required using the following conditional formula on the Currency symbol tab

if currentrowindex in[19,22]
then crNoCurrencySymbol else crFloatingCurrencySymbol

//then ' ' else crFloatingCurrencySymbol

The client does not like the misalignment when the % dispappears. I have tried left but - signs cause that to fail, centre again causes issues when % is visible.
I tried adding a space but the crFloatingCurrencySymbol is not a string so formula fails.

As a compromise the client will accept decimal point alignment but that option does not appear to exist in Crystal? Any suggestions gratefully appreciated.
Is there a third party addon to crystal that allows this?

Ian
 
Convert the data to string and right align. Would be able to strip off the % with the string functions. If using a summary field in a group footer align the fields with the details above by their right sides and then right align the data within the field. Keep an eye on fonts and font sizes and don't mix them.

Good luck and hope this helps.

 
That is not an otion. its a cross tab and I can not convert to string. I cannot use a manual cross tab as report can have 2, 3 or 4 columns.

Thanks

Ian
 
Actually had to bite the bullet and use SQL to summarise data as I wanted and then use Crystal Cross Tab to display data as required. I could then use strings with a Max function in the summary field.

Converted text to HTML and then usin right alignment and a white % to pad the cells which which did not show percentage.

Here is my formula

Code:
if not({StatisticsDual.REPORTGRP1}  in ["Sharpe Ratio*", "Beta*"]) 
then '<p align="right"><font size="1" face="Arial" color="black">'&totext(({StatisticsDual.RESULT}*100), 1, "")&'%</font> </p>'
else '<p align="right"><font size="1" face="Arial" color="black">'&totext({StatisticsDual.RESULT}, 1, "")&'</font><font size="1" face="Arial" color="white">'&'%</font> </p>'

Ian
 
Hi Ian

Just curious about this. Obviously the Cross Tab was petty complex, but was it not possible to reformat it by converting the data (for display purposes only) by using the "Display String" formatting tool, converting to text using ToText(CurrentFieldValue) and manipulating the result with an If-Then-Else?

Anyway, just a thought, albeit probably too late to be useful even if it dis work for you.

Cheers
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top