on 04-08-2008 2:27 PM
Post Author: opmiguel
CA Forum: Charts and Graphs
Hi Guys
I would like to know how to scale all values in an olap grid scaled by 1000. Example : instead of displaying 9586, I would like all the values to display 9.6.
The source for the data is a BW query with a scaling factor applied in the query which Crystal remove.
Could you tell me how to scale all the figures of an OLAP grid?
Best regards,
Miguel
Post Author: Fighting Miao
CA Forum: Charts and Graphs
Same problem to me, Who can give an idea??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have solved this problem (or a similar one) on a per-cell basis using display string formatting in my Crystal Report. To access this formula editor, right click on a field, select Format Field, select the Common tab, and then click on the formula editor button for the Display String line.
Simple example
Scale a value by a factor of 1000 with 1 decimal place displayed
ToText(CurrentFieldValue/1000, 1)
Please note that this discards your other formatting on the values so you may have to code the simpler things like your choice of negation symbols or zero display. Here's the more advanced version that I am using for my report:
Advanced example
Scale by a factor of 1000, display negative values using parenthesis instead of a minus symbol, and display zeroes as a minus symbol
if CurrentFieldValue < 0
then "(" + ToText(abs(CurrentFieldValue/1000), 1) + ")"
else if CurrentFieldValue = 0
then "-"
else ToText(CurrentFieldValue/1000, 1)
Additional note
You can of course use the format painter or multiple selection of fields to apply this formula to more than one field at once.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.