Posts

Showing posts from January, 2009

SSRS Reports Rotate Text Or Split Alphabet Per Line

Image
Few days ago my client requested a report, which required rotation of text and alphabet by 45 degree. Expected output was something Like this: Many of you may know that you can rotate a text in textbox by setting WritingMode to "tb-rl", which will rotate the text and it will look something like this: In order to rotate text at desired angle do following: (1) create an image with desired text (2) rotate that image (3) import it to the image box in report Add System.Drawing to the references by going to the Report Properties -> References. for step1 use following function: Function CreateImage(ByVal sImageText As String, ByVal FontType As String, ByVal FontSize As Integer) As System.Drawing.Bitmap 'Create an image from scratch Dim bmpImage As New Drawing.Bitmap(1, 1) Dim iWidth As Integer = 0 Dim iHeight As Integer = 0 'Create the Font object for the image text drawing. Dim MyFont As New Drawing.Font(FontType, FontSize, System.Drawing.FontStyle.Bold, System.Drawing.G...