Kasim Husaini
Kasim Husaini

Reputation: 422

SSRS Report Stacked Bar Chart Bar Width changing while printing the report

In the design view of SSRS Report Builder, the developer had set the custom attributes for the bar "PixelPointWidth" to 30.

The width of the bar in the bar-chart is appearing good while viewing the report in the browser. However, when trying to export it to pdf or to print the report, the width of the bar in the bar-cart becomes very thin and the text labels within becomes almost unreadable.

Same scenario happens with stacked-bar-chart as well. Tried changing the pixepointwidth and other related parameters but in-effect the issue remains as is.

Upvotes: 1

Views: 623

Answers (1)

Alan Schofield
Alan Schofield

Reputation: 21683

I'm not sure why the PixelPointWidth would not be left as default, maybe the developer thought this was the way to adjust the width of the bars (which it does, but not directly).

What you should probably do is set the PixelPointWidth to 0 (default) and then adjust the PointWidth property instead, so that you get the desired width.

PixelPointWidth (I think) sets the datapoint width to an exact number of pixels, depending on how you render the report, that will result in different physical dimensions (150 pixels at 100dpi is roughly 38mm but at 150dpi it's approx 25.4mm)

Here's an exmaple where I set the top bar to PixelPointWidth=40 and the bottom bar to PointWidth=0.5 . In design view, on my monitor, it appears the top bar is slightly smaller than the bottom bar.

enter image description here

When previewed (screen rendering) they appear more or less identical heights.

enter image description here

When I render the report to a PDF they look totally different.

enter image description here

As I said earlier, if you set the PixelPointWidth to 0 (default) and then adjust the PointWidth as a percentage of the default gap between categories then you should get much more consistent results. If you set the PointWidth to 1 there will be no gap between each bar, if you set it to 0.8 (default) then the bar will consume 80% of the space and the gap will consume the remaining 20%

Upvotes: 1

Related Questions