Hi all,
I am attempting to write my first reporting services script for input into rs.exe.
As it is failing, I have created a VB Console app to allow debugging.
When I run the script here, only 6 out of 60 reports actually get deployed.
The others fail with the following message:
{"System.Web.Services.Protocols.SoapException: The report definition is not valid. Details: '.', hexadecimal value 0x00, is an invalid character. Line 1009, position 10.
at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)"}
- Using Notepad+ I have checked my .rdl file for the 0x00 value - it is not there.
- Line 1009 position 10 is the end of the .rdl file.
- All reports deploy ok from BIDS.
Here is method that deploys the report:
Public Sub PublishReport(ByVal sourceFolder As String, ByVal reportName As String, ByVal targetFolder As String) Dim definition As [Byte]() = Nothing Dim warnings As Warning() = Nothing Try Dim stream As FileStream = File.OpenRead(sourceFolder + "\" + reportName) definition = New [Byte](stream.Length) {} stream.Read(definition, 0, CInt(stream.Length)) stream.Close() Catch e As IOException Console.WriteLine(e.Message) End Try Try 'name, folder, overwrite, definition, properties warnings = rs.CreateReport(reportName.Substring(0, reportName.Length - 4), targetFolder, True, definition, Nothing) If Not (warnings Is Nothing) Then Dim warning As Warning For Each warning In warnings Console.WriteLine(warning.Message) Next warning Else Console.WriteLine("Report: {0} published successfully with no warnings", targetFolder + "/" + reportName) End If Catch e As Exception Console.WriteLine(e.Message) End Try End Sub
It is the CreateReport method that fails.
Any assistance greatly appreciated.
Cheers, Clay