Skip to main content

Posts

Showing posts with the label SQL Reporting Server 2005

How to: show dynamic columns in SQL server Reporting services

How to display dynamic columns in Reports? Let me explain what I mean dynamic here. I have a stored procedure which return some columns depending on User choice. In that case I dont have any clue about the columns which are in the report. In plain english, whatever dataset is coming from database, I need to display that information in a table or matrix. The dataset may contain 2columns or 25 columns. How to achieve this? After so much search I found an interesting property in SQL Server Reporting services for all Fields. There will be a property 'IsMissing' for each Field in the Dataset we defined in the report. To achieve dynamic behavior, I Created a table with all possible columns and toggled the visibility of the columns depending on their IsMissing status. For each column in the table there will be a Visibility Expression set on Hide Property. For Example, say the column is binded to a column 'Name' the details cell will have text Fields!Name.Value. The visibility ...

SSRS: Vertical Headings

This is one of the common requirement for most of the report developers. Many times we need to display table header vertically. When I came across this, I did a bit googling. But no where it is documented properly. Then I checked all the properies available for the Text box. Vertical text with reports can be done with one small property change. There will be a property called 'WritingMode'. By default the writing mode will be lr-tb. If we change that to tb-lr the text in that text box will be written vertically. Follow the steps to get vertical headers: Go to the Textbox in which you need Vertical Text Press F4 or Goto Properties Window Search for WritingMode Property and change the value to 'tb-lr' You can check your report preview for the changes. Happy reporting!!