Hi Everybody,
I hope that someone will be able to help me with that problem. I have a .rdl file on the server (report Server). Now I need to use this .rdl, make somes changes and create a new one on the same server in another directory.
Here are the codes that do all the work;
Dim streamData As New MemoryStream(rptDefinition)
Dim doc As XmlDocument = New XmlDocument()
doc.Load(streamData)
' do the changes process here
Dim rpt As Byte() = System.Text.Encoding.Unicode.GetBytes(doc.OuterXml)
Return rpt
I always got this error:
The report definition is not valid. Details: Name cannot begin with the '.' character, hexadecimal value 0x00.
How can I solve that?
Thanks
Hi,
I would check two things:
(1) The encoding you are using. The document might be using UTF-8, not unicode.
(2) The byte order mark. Check if the first two bytes of the array are [239] [187] (In decimal viewed through the debugger). If so remove these before returning the array.
-JonHP (MSFT)
|||
Hi JonHP,
It works now. I just replaced the unicode encoding with the UFT8.
Thanks a lot.
No comments:
Post a Comment