Rotated text not rendering properly
I'm using SSRS 2008 R2 integrated with SharePoint 2010. In Report Builder 3, i have set the text to Rotate270 and it looks fine. When i save file to sharepoint and view it in the browser, the text is no longer properly positioned in the cell, see below.
Is this a bug? does anyone have any suggestions on how to fix this?
Image from Report Builder 3 preview mode (Business Development is rotated 270 and looks fine)
image from Browser - Business development is truncated
Dean MCTS-SQL 2005 Business Intelligence, SharePoint 2010, Configuration
June 19th, 2012 9:10am
Hi There
Can you please make sure that the CanGrow and CanShrink are both set to False
CanGrow=false
CanShrink=flase for the textbox and see if problem get resolved
CanGrow=false
CanShrink=flase
Please update
Many Thanks
Syed Qazafi Anjum
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2012 1:32am
Hello Dean,
This is not supported in Report viewer when you see the same report from application/explorer view..
for this 270 Degree rotation, you will have to write VB code and from that you can easily convert your text to 270 Degree rotation.
from my point of view and RnD, there is only way to convert 270 Degree rotation in reports.
use the following and you will get your answer.
for that,
first Use System.Drawing DLL in your report.
take image object.
MIME Type : JPEG and field : =Code.LoadImage("Your Text", "Total No Of Character")
example : =Code.LoadImage("20CF", "4") OR
example : =Code.LoadImage("20CF", Length("20CF")
and write this following code
Function LoadImage(ByVal sImageText as String,ByVal sImageTextMax as String)
sImageTextMax= sImageTextMax.PadRight(40)
Dim iFontSize As Integer = 10 //Change this as needed
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("Arial", iFontSize, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point)
'// Create a graphics object to measure the text's width and height.
'Graphics(MyGraphics = Graphics.FromImage(bmpImage))
Dim MyGraphics As Drawing.Graphics = Drawing.Graphics.FromImage(bmpImage)
'// This is where the bitmap size is determined.
iWidth = MyGraphics.MeasureString(sImageTextMax, MyFont).Width
iHeight = MyGraphics.MeasureString(sImageTextMax, MyFont).Height
'// Create the bmpImage again with the correct size for the text and font.
'bmpImage = New Drawing.Bitmap(bmpImage, New Drawing.Size(iWidth, iHeight))
bmpImage = New Drawing.Bitmap(bmpImage, New Drawing.Size(iHeight, iWidth))
'// Add the colors to the new bitmap.
MyGraphics = Drawing.Graphics.FromImage(bmpImage)
MyGraphics.Clear(Drawing.Color.LightGray)
MyGraphics.TextRenderingHint = Drawing.Text.TextRenderingHint.AntiAlias
MyGraphics.TranslateTransform(0, iWidth)
MyGraphics.RotateTransform(270)
MyGraphics.DrawString(sImageText, MyFont, New Drawing.SolidBrush(Drawing.Color.Black), 0, 0)
MyGraphics.Flush()
Dim stream As IO.MemoryStream = New IO.MemoryStream
Dim bitmapBytes As Byte()
'Create bitmap
bmpImage.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg)
bitmapBytes = stream.ToArray
stream.Close()
bmpImage.Dispose()
Return bitmapBytes
End Function
20CF
Hope you are clear with this. :)
June 21st, 2012 2:36am
Hi Dean,
Based on my test in local environment (SSRS 2008 R2+SharePoint 2010+IE9), the layout of the report that uses Vertical or Rotate270 writing mode may change unexpectedly if we view the report in IE9 normal view mode. However, the report displays well in
IE9 Compatibility View mode.
If you are using IE9 or IE8, I suggest that you first check the issue in IE Compatibility View mode. If it resolves the issue, you can add the SharePoint site to the IE Compatibility View site list or check the "Display intranet sites in Compatibility
View" option. Meanwhile, please make sure you are using the SQL Server 2008 R2 Reporting Services Add-in for SharePoint 2010. You can get the add-in from the following link:
http://www.microsoft.com/en-us/download/details.aspx?id=622
Regards,
Mike Yin
TechNet Subscriber Support
If you are TechNet Subscription user and have
any feedback on our support quality, please send your feedback here.
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2012 3:18am
Thanks for the suggestion, but i cannot do this because the tablix is grouping rows and the number of rows varies within each group so i must have the rotated text in a cell that can grow.Dean MCTS-SQL 2005 Business Intelligence, SharePoint 2010, Configuration
June 21st, 2012 11:41am
Hi Dean,
Thanks for your reply.
If I understand correctly, you were replying to Syed's suggestion. Have you tried my suggestion above? Besides, the report displays well in IE9 Compatibility View mode in my test environment, so the SharePoint Report Viewer Web Part should have the
capability to display "Rotate270" text. But 20CF's suggestion above provides us with an possible workaround. Thanks 20CF for the suggestion.
If you have any questions, please feel free to let me know.
Regards,
Mike Yin
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2012 10:00am
Hi Mike,
I am viewing a report in IE 8 and using compatibility mode and it still does not render correct
Should be centered and I would like it to show in the Middle of the text box -- the items that are Rotate270
Thanks!
LauraLaura
November 8th, 2012 8:37pm