In version 10 of CR it isn't easy to format the x-axis of a chart. I don't know why. I think in XI you can with the chart expert. How I got around this was to create a formula and base the x-axis of the chart off it. This is the formula I created:
//START OF FORMULA
// This formula basically strips off the '.00' (two decimal places) from the number in the database, so that it doesn't appear on the xaxis of a chart.
Shared stringVar score:= totext({table.field}); //This creates a shared string variable called 'score', and assigns the value of the field to it.
if score [3] = "." then left(score, 2) else //This caters for a two-digit number (e.g. 22.00)
if score [2] = "." then left(score, 1) else //This caters for a one-digit number (e.g. 2.00)
left(score, 3) //This caters for a three-digit number (e.g. 222.00)
//END OF FORMULA
So if the input is '22.00', the output becomes '22'.
There is probably a more efficient way of coding this, but it worked for me. I hope it can help someone else.
Regards
Phil Gevaux
//START OF FORMULA
// This formula basically strips off the '.00' (two decimal places) from the number in the database, so that it doesn't appear on the xaxis of a chart.
Shared stringVar score:= totext({table.field}); //This creates a shared string variable called 'score', and assigns the value of the field to it.
if score [3] = "." then left(score, 2) else //This caters for a two-digit number (e.g. 22.00)
if score [2] = "." then left(score, 1) else //This caters for a one-digit number (e.g. 2.00)
left(score, 3) //This caters for a three-digit number (e.g. 222.00)
//END OF FORMULA
So if the input is '22.00', the output becomes '22'.
There is probably a more efficient way of coding this, but it worked for me. I hope it can help someone else.
Regards
Phil Gevaux