Reports
All reporting is done via Crystal Reports
Reports and Slots
Crystal Reports
This details conventions and requirements for developing Crystal Reports.
Crystal Reports Runtime v13 is being used on the Appliances themselves. Report development is being done in v14 on Stella.
Database Connections in Crystal
There are two ODBC connections available:
- The main database (
WOL_Prod
) - The logs and stats database (
WOL_Prod_Log
)
ODBC connections are configurable in Site Settings. But generally shouldn't need to be changed from their default in production environments.
Reports themselves have their connections remapped to the config settings. The convention is as follows:
- Any DSNs which do not start with
WOL_
are not touched - Any DSNs which start with
WOL_
and end in_LOG
are remapped to the logs and stats database - Any DSNs which start with
WOL_
and do not end in_LOG
are remapped to the main database
Parameters
The following common parameters are passed to every report:
Crystal Name | Data Type | Sample Value | Comments |
---|---|---|---|
__ApplianceRootUrl | string | https://demo.wiseowllegal.com.au | Used to load a custom logo: combine with "/CustomReportLogo" |
__CurrentUser | string | larry.lawyer | The current user name who is running the report |
__ReportName | string | Trust Trial Balance | The name of the report as listed in the reports in Wise Owl Legal. Note that this may be different from the Crystal Report name. |
__ReportId | integer | 8 | The report id which is being run. You can access additional information about the report via the table report.CrystalReport . |
Other parameters are passed based on view model data, ONLY when the report is assigned a to slot and the user clicks on the Print icon, base on the following rules:
- Any readable property of the view model is mapped to a corresponding Crystal Parameter based on name.
- The Crystal Parameter may be prefixed with a "p". That is the view model property "MatterNumber" can be mapped to either "MatterNumber" or "pMatterNumber" on the Crystal Report
- Mapping is case-insensitive.
The actual values in view model data varies from page to page, however the following pointers should help you find the right parameters:
- Most pages which show a single record will have an
ID
property which relates to the primary key of a database table.- Trust Transaction Lines, however, have a composite primary key based on the transaction id and line number.
- Pages which allow searching of records commonly have a Name property.
- You can view the raw view model data by appending
?__ViewModelDebug=y
to a page you load. This will show all the view model properties available; usually there will be enough there to pass to a report.
Any report parameters not mapped by Wise Owl will be shown on the usual Crystal Reports parameter dialog. This allows for a last ditch attempt to map parameters, but is generally not the best experience for the user.
Any reports viewed directly from the report list will rely on the Crystal Reports parameters dialog.