calvin-and-hobbes

SSRS – Crazy Issues; Stupid Solutions

calvin-and-hobbes-e1328550590232

1. Interactive Sorting Garbling Table Header Text

As per best of my knowledge and googling capabilities there is no way to place the interactive sorting up and down arrows as per your choice and they will always appear on the right hand side of the cell / textbox /column header. And this wrecks havoc rendering your SSRS report if the cell / textbox /column header are not wide enough.  Check the below image :

Interactive Sorting Issue 2

A workaround is to have a dummy row below the header row and turn on the interactive sorting for the columns of this dummy row like below :

image

image

And then the when you run the report it will come out like this :

image

2. Image with Transparent Background Getting Garbled When Exported to pdf

This one is really weird, when the image you want to display in footer had a transparent background like below and the footer has a background (sky blue in my case):

image

then when the report is exported to pdf it looks like below, which is not really sharp:

image

So the workaround for this is to provide the image a background i.e. sky blue instead of transparent and then if you export your report in pdf it should be fine as below :

image

3. Display only the Currency Symbol

Typically we want to show the currency next to the numbers whenever we are displaying money in the report and the currency symbol has to be as per the client machine or browser locale, for example like below :

image

For this what we do is :

1. Set the Language property of report to User!Language

2. Set Format property of cells to C0 or something similar

As you can see, the currency symbol is also going to occupy some cell space and when the numbers has many digits this will cause a line break which will not be nice. So the ideal case is to display the currency symbol next to the column header like below :image

However the is no way to directly display the currency symbol because you need numbers so you can format them in currency but you have text

So the hack is

1. Create a placeholder instead of label for the column header and set the placeholders label as the column header text

2. Write a expression for the placeholder value which is

=”Column Header Text”
+ “<br>”
+ “(” + Replace(FormatCurrency(“0″,0),”0″,””) + “)”

which actually adds “Rs. 0” after the header text and then replaces the 0 with blank space

3. Set the markup type of the placeholder to HTML

4. Expand Drilldown while Exporting or Subscribing a Report

Drilldown is a great feature of SSRS, however if the drilldown is collapsed by default if you export or deliver a report by email by subscriptions then still the report content will be collapsed and for some use cases that’s what you will not want.

A workaround can be to add a report parameter ShowDetails with values Yes / No, default No , the drilldown visibility of groups / UI elements is governed by an expression based on this parameters value and when you subscribe the report, you subscribe it with ShowDetails = Yes

image

image

image

image

Advertisements

Your Comments / Inputs are Welcome !..

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s