Wednesday, July 28, 2010

SSRS-Column Text

Recently I had to develop a report where column names had to have text in vertical direction. There have been enhancements made in Sql server 2008 R2 called Rotating Text 270 degrees. Currently working on SQL Server 2008, this option is not there. In order to make the Column header text vertical, I had to set a property on the column textbox called WritingMode and set it to Vertical. Once this was done I got the column header to show up in a vertical fashion. The other requirement was to center the text. Initially I set the following properties of the textbox:
They were TextAlign set to Center, The VerticalAlign was set to Middle. I ran the report after the properties were set and still the column text was not perfectly centered. After playing around with the different properties, I set the Property CanGrow to false. Once this was done, i got the text to center in the column textbox. Interesting this took a while set it right, at first sight it seemed very easy requirement. In summary the following properties were set:

WritingMode  Vertical
VerticalAlign  Middle
TextAlign       Center
CanGrow       False.

No comments:

Post a Comment