Friday, September 13, 2013

Debugging Reports

Before we continue adding additional features to our report, I think it is important to discuss the debugging capabilities of Logi Studio. Logi Studio provides the following features to help in debugging your reports.

The first feature is in the Attributes panel. Red asterisks (*) indicate required attributes.

The second feature is application/report validation. Logi Studio provides three ways to perform validation:


  • To validate a report, select the report in the Application panel, and click the “Validate” button in the Application panel toolbar.

Figure 2.20: Validate button in Application Panel
  • To validate all reports, select the Reports folder in the Application panel, and click the “Validate” button in the Application panel toolbar.
  • To validate the application, select the Definition folder in the Application panel, and click the “Validate” button in the Application panel toolbar.
The third feature is the Application Trace debugging page. To enable the debugging page, in the _settings definition set the General element’s Debugger Style attribute to “Debugger Links”.
 
Figure 2.21: Attributes Panel after setting the Debugger Style attribute
Setting this attribute causes a “Debug this page” link to be added at the bottom of all pages. To only display the debug web page when an error is encountered, set the Debugger Style attribute to “Error Detail”.

Hint: In production, set the General element’s Debugger Style attribute to “No Details” to avoid displaying sensitive information to users.  

Selecting the debug link on a page will display the Application Trace web page. This page provides wonderful insight into what’s going on behind the scenes. In particular, it includes the data layer source (SQL) and data, security information (Authenticated User, User Roles, and User Rights), request tokens, and performance metrics. 

To view the SQL and data associated with a data layer, preview the report, and select the “Debug this page.” link at the bottom of the report. 

Figure 2.22: Application Trace page data layer debug information
Click the “View Data” link to display the data associated with the data layer: 

Figure 2.23: Data associated with the data layer
Notice that the data is in XML format, where each data layer row is represented by an XML element and each column is represented by an XML attribute. 

Another debugging feature helpful in pinpointing bottlenecks in a report is the duration column in the Application Trace. The duration metric indicates the elapsed processing time for each event during the rendering of a report.   

No comments:

Post a Comment