May 28, 2009 at 12:27 am
I work with Project Server and Reporting Services and I have to display a project task's note in a report. I found a good post explaining how to do it:
The report works well in the Visual Studio preview, but fails when I deploy it and the task's note doesn't appear.
Have you got any idea about the difference between the rendering is done in Visual Studio Preview and once the report is displayed ?
The post mentioned above contains a code to put in the report properties :
‘Instantiate a rich text box control in memory
Public rtfRTB As new System.Windows.Forms.RichTextBox
‘Instantiate a stringbuilder object
Public s As New System.Text.StringBuilder()
Public Function byteArrayToString(ByVal b() As Byte) As String
Dim i As Integer
dim mystr as string
on error goto errortrap
s.length = 0
For i = 0 To b.Length - 1
Console.WriteLine(chr(b(i)))
If i <> b.Length - 1 Then
s.Append(chr(b(i)))
End If
Next
mystr = left(s.ToString, len(s.ToString)-1)
rtfRTB.rtf = mystr
return rtfRTB.text
rtfRTB.clear
exit function
errortrap:
return "n/a"
rtfRTB.clear
s.length = 0
End Function
and I think it's the "rtfRTB" function which doesn't work when the report is deployed.
I hope someone will be able to help me.
Thanks
Stanizlas
June 5, 2009 at 10:48 am
I'm not sure about this answer, but I am under the impression that the System.Windows.Forms.RichTextBox would not be available from a website. I thought the only controls you could use were ones that were native to System.Web... namespaces. IT works in VS because you have the ability to use the Windows Forms controls, It won't work from the SSRS because you can't access those controls.
June 9, 2009 at 8:00 am
Thank you for these answer.
Have you got any idea about a workaround to be able to get this report working. Or may be there is another way to display these information stored in the database as "binary" ?
Stanizlas
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply