Groups | Blog | Home
all groups > sql server reporting services > september 2005 >

sql server reporting services : Printing X Axis Label values away from the 0 Axis


Peter Nolan
9/24/2005 3:01:51 PM
Hi All,
I have some bar charts I am writing that will go from -50 to +50 with 0
meaning 'average'. So when doing something like response rates by age
band the age bands that do better will be in the + region and the age
bands doing worse than average will be in the - values and those on
average will be 0.

However, on the bar chart the age bands print just on the left of the
axis representing 0. Meaning that the bars are printed on the same
piece of the chart as the age band and it looks bad...

Does anyone know if the values for the axes can be printed to the left
or right of the chart itself? I would like to print the age bands to
the right of the plot if possible....

(Remembering on a bar chart RS2000 calls the vertical axis the X axis.)

Thanks

Peter
Robert Bruckner [MSFT]
9/24/2005 6:19:35 PM
I think you are looking for the "CrossAt" property of the X-axis. Just set
the CrossAt property to -50 and the x-axis labels should show up in the
place where you want them.

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]

Peter Nolan
9/25/2005 5:45:18 AM
Hi Robert,
thanks for this.....I tried it out and it is not quite what I am
looking for.....when I put cross at -50 the labels are written down the
LHS but all the bars are started at -50 so the bars which have a value
of say 40 then go from -50 up to 40....

The effect I am looking for is that the bars all start at 0 and go to
the amount that they represent....the chart is sorted by value of bar
and so the + values go to upper RH quadrant and - values go to lower LH
quadrant.....

I have just downloaded SP2 and I will try with that as well....

Thanks Again...

Peter
www.peternolan.com
Robert Bruckner [MSFT]
9/26/2005 4:08:55 PM
Do you really need labels for the x-axis then? You can set the grouping
label expression to =" " (i.e. one space) to hide the labels.
You could then use a custom legend approach similar to the one shown in the
following blog article to add the age-band information outside the chart
where it does not overlap with anything else:
http://blogs.msdn.com/bwelcker/archive/2005/05/20/420349.aspx

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

Peter Nolan
9/28/2005 9:21:32 AM
Hi Robert,
well, I need something that will put the labels in the order the rows
are sorted into....they do not always turn up in the same order...I'll
give the custom legent a go as it might be able to present the age
bands in the order I want....

Thanks

Peter
Robert Bruckner [MSFT]
9/28/2005 1:22:57 PM
You can apply a sort expression on the chart category grouping. You can then
use the same sort expression is a custom legend table.

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]

Peter Nolan
10/8/2005 8:49:24 AM
Hi Robert,
I am soooooo close with this....I have created the custom legend in a
table and it really only needs to print the age bands.....and it
does....the last problem seems to be that when sitting the chart and
the custom table next to each other the table runs over the page even
though there seems to be room on the page.....I have put the chart and
the table into a rectangle to try and get the to stay next to each
other....but the table data flows over a page..

I have created the table as a single line grouped on age bands in
exactly the same way as the chart is created......so I am at a bit of a
loss to explain why the table flows over the page even though there is
space available...

Frustratingly enough, if I print the chart to a PDF it does keep the
legend with the chart....so it looks like it is something to do with
how the rendering takes place with the screen based version...

Anyone have any ideas about how to make the customer table legend stay
with the chart in the explorer version of the report?

Thanks

Peter
AddThis Social Bookmark Button