posted Jan 31, 2012, 9:34 AM by Eric Patrick
The QBO 2.0 Report module allows generation of reports in output in HTML, XML, Excel, Crystal Reports, and via "plug-in" pages.
Each report comprises:
- a Report name (Report.Report)
- one or more ReportQuery rows, each of which is usually a stored procedures (though they could be web service calls)
- a Prompt Url: a page that prompts users for parameters needed to run the report
- a Prompt Xslt: an optional plugin XSLT that drives the layout of a parameter page
- a Result Url: a Url that accepts the report parameters, executes the report, and renders the results
- a Result Xslt: an optional plugin XSLT that drives the transformation of the resulting ADO.NET DataSet into some other format
- a MimeType: optionally used by the Result Url to determine the mime type delivered to the browser
The qbo.ReportWeb module includes the following "standard" URLs for prompting users for parameter data:
- ReportPrompt.aspx: deprecated; do not use
- ReportPrompt.Auto.aspx: this will scan SQL tables for stored procedure parameters, and prompt the user with any parameters found
- ReportPrompt.Object.aspx: this is for "object-centric" reports, and prompt only for an Object/ID
- ReportPrompt.Legacy.aspx: deprecated; do not use
If a Prompt XSLT is specified, the ReportPrompt.Auto.aspx will transform the Report row from the database against the Prompt XSLT, enabling the power user to control precisely what prompts the user sees. For complex or drop-down list based parameters, this is preferable.
The qbo.ReportWeb module includes the following "standard" URLs for rendering data:
- ReportViewer.Html.aspx: renders the data set as an HTML table. If a Result Xslt is specified the data set is transformed against the xslt.
- ReportViewer.Xml.aspx: transforms the data set against a Result Xslt, and delivers the results using the Mime Type specified by the Report.
- ReportViewer.MSExcel.aspx: delivers the data set as an Excel mime type
- if no XSLT is specified, simply HTML tables are delivered, which Excel interprets as worksheets
- if an XSLT is specified, it should produce Excel Xml
- ReportViewer.CR.aspx: pass the ADO.NET dataset to a Crystal Report .rpt file, and exports the data in accordance with the Report Mime Type
- the Prompt XSLT should point to a Crystal Report .rpt file
- the Mime Type must specify a mime type that CR is capable of exporting to (Word, Excel, PDF, etc.)