Debugging SSRS Reports

By Becky Newell | March 17, 2013

If the Debugger will not break in your SQL Server Reporting Services Report and/or you want to speed up the debugging session by not printing the report and only stepping through the class logic, try the following steps:

  1. In the AOT under Tools > Options click the Development link and unmark the 'Execute business operations in CIL' checkbox
  2. Set breakpoints in the RDP class
  3. Manually invoke the RDP class via a job

RDP classes:
-Take contracts which sets their parameters
-Have processReport methods which act as the driver method in the class
-In a job create code like the following:

TmpTest tempTable; 
   //This is the temp table the RDP class populates and the one you want to view the contents of.
CustReportDP dataProvider = new CustReportDP(); 
   //This is the RDP class used by the report
CustReportContract contract = new CustReportContract(); 
  //This is the contract class used by the RDP class
contract.parmAccountNum('12345');  
  //The parm methods are on the contract become the parameters for the report
contract.parmCustGroup(10);
contract.parmCategory('Custom');
dataProvider.parmDataContract(contract);  //Send the contract to the RDP class
dataProvider.processReport();  //Execute the primary method in the RDP class
tempTable = dataProvider.getTmpABC(); 
//Get the populated temp table in order to view its contents.  
//Every RDP class has a get method for each temp table it populates.
while select tempTable  //View the contents of the table
{
  info(tempTable.AccountNum);
}

With this approach any breakpoints in the RDP class will definitely get hit as the debugger will run on the client side just like a normal debugging client session. Using the job will completely bypass the SSRS report but you can debug your logic and simulate the report behavior by passing the appropriate parameters.

Becky Newell

Related Posts


Under the terms of this license, you are authorized to share and redistribute the content across various mediums, subject to adherence to the specified conditions: you must provide proper attribution to Stoneridge as the original creator in a manner that does not imply their endorsement of your use, the material is to be utilized solely for non-commercial purposes, and alterations, modifications, or derivative works based on the original material are strictly prohibited.

Responsibility rests with the licensee to ensure that their use of the material does not violate any other rights.

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!