Dear Anyone,
We have custom raise error messages embedded in our stored procedures. I've noticed that using Business Intelligence Dev, when these errors are invoked, they actually display on the RS report. But unfortunately, when I tried it on a deployed report, I always get the error below.
Is there a way to display custom SQL errors from my stored proc to the RS page? Where do I enable the remote errors?
Thanks,
Joseph
Regarding remote errors:
You could set the "EnableRemoteErrors" configuration value to True in the ReportServer.ConfigurationInfo database table. Alternatively, you can use the SetSystemProperties SOAP call:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_63le.asp
Here is an example for a .rss script that will turn it on:
Public Sub Main()
Dim P As New [Property]()
P.Name = "EnableRemoteErrors"
P.Value = True
Dim Properties(0) As [Property]
Properties(0) = P
Try
rs.SetSystemProperties(Properties)
Console.WriteLine("Remote errors enabled.")
Catch SE As SoapException
Console.WriteLine(SE.Detail.OuterXml)
End Try
End Sub
Then run the .rss script by using the rs.exe command line utility:
rs -i EnableRemoteErrors.rss -s http://Server/ReportServer
Once remote errors are enabled, you could throw a specific exeception with a informative error string in the stored procedure. That message should then be shown as inner message.
-- Robert
No comments:
Post a Comment