6/02/2012

MS SSRS: Jump to the Report Manager´s folder from a report

Case 1: I want to have link text “Go to Documents” in my report and clicking it takes me to ”Documents” folder in the Report Manager (ReportServer1).
> I add a Text Box to the report and type "Go to Documents" to it. Then I open the text box properties > Action. I choose "Go to URL" and click fx-button. See pic. below. 

I type the target folder URL to the expression box:

=”http://ReportServer1/Reports/Pages/Folder.aspx?ItemPath=%2fDocuments&ViewMode=List”                                

And it works.

Case 2: I want to have link text in my report and clicking it takes me to ”Documents” folder in the Report Manager (Report Server1). I can’t have Report Server name in the link because same report and it’s link has to work in several different report servers.
> There's a Built-in fields collection the Globals in the Reporting Services and one of the variables is ReportServerUrl. It returns the URL of the report server on which the report is being run. I use that:
=Globals!ReportServerUrl + "/Reports/Pages/Folder.aspx?ItemPath=%2fDocuments&ViewMode=List"                                      
As a result, it jumps to Report Server database directory:

And when I look at the address:
http://ReportServer1/ReportServer/Reports/Pages/Folder.aspx?ItemPath=%2fDocuments&ViewMode=List
I see ReportServer in the path because ReportServerUrl variable returns “http://servername/ReportServer”.

> So I have to revise this expression to have right path. Let’s take off that part using REPLACE function:

=Replace(Globals!ReportServerUrl + "/Reports/Pages/Folder.aspx?ItemPath=%2fDocuments&ViewMode=List", "ReportServer", "")

And now the link text works as I wanted.

3/04/2012

MS SSRS: Multivalue report parameter and "Select All" default value

For example report user is prompted to select one or more employees from a drop-down list to filter the report data. The "Select All" check box is automatically the first choice in the list and easy to choose but when report user wants to make the subscription of that report "Select All" is not included and she needs to go through clicking the whole list. 
This is my solution to handle multivalue report parameter filter with ´Select All' default value:

1. Make dataset query that retrieves all the employees.
2. Add report parameter, choose Allow multiple values option  and get Available values from "employee"-dataset.
3. Add filter to the dataset that retrieves the report: "employee IN [@employee]" (data type Text).
- - Now you have a multivalue parameter filter ready for the report. --
4. Set default values for the parameter using same employee dataset.
- - Now all employees are checked in the report prompt by default and subscription is also easier to do. - -

1/12/2012

Column headers differ in IE6 and IE8

I have an example how cognos report studio column (or row) headers appear in different versions of Internet Explorer and one way to make them look the same.

In these crosstab column headers text is in the multiple lines and background colour is purple. Looking the report in IE8 headers look fine but in IE6 top is gray [pic.1].

pic. 1