How can I troubleshoot "#Error" returned in fields populated by expressions containing custom code?
-
Tuesday, November 27, 2012 12:15 AM
Does anyone have specific suggestions for troubleshooting custom code in SSRS reports?
All of our reports in Reporting Services use a custom function to display header/footer information. Our test environment just suffered a major hardware failure, and when we rebuilt it, we stopped seeing the values we expected in the report headers, instead seeing "#Error" in each location. The main body of the report is fine.
I downloaded a sample RDL from Reports Manager, opened it in Visual Studio, tried to use the Preview function and got these errors:
--[rsRuntimeErrorInExpression] The Value expression for the textbox ‘txtReportSubtitle’ contains an error: Object reference not set to an instance of an object.
--[rsRuntimeErrorInExpression] The Value expression for the textbox ‘txtClientName’ contains an error: Object reference not set to an instance of an object.
--[rsRuntimeErrorInExpression] The Value expression for the textbox ‘txtPrinted’ contains an error: Object reference not set to an instance of an object.
I've compared everything I could think of between the test and live servers (live still works fine) and checked as many IIS and Report Services log files as I could find. The custom code is supposed to call a stored procedure to obtain the header/footer information, so I ran a Profiler trace and confirmed that that procedure is not being run. Also,when I run the procedure in Management Studio, it returns the expected results. This makes me think there is an issue with the custom code.
All Replies
-
Tuesday, November 27, 2012 12:27 AMModerator
Hi There
Thanks for your posting. Please have a look on this blog post that might help you.
Many thanks
Syed Qazafi Anjum
- Proposed As Answer by Fanny LiuMicrosoft Contingent Staff, Moderator Wednesday, November 28, 2012 10:31 AM
- Marked As Answer by Elvis LongMicrosoft Contingent Staff, Moderator Monday, December 10, 2012 2:20 AM

