Approaches to Filtering
From SmartWiki
Revision as of 16:51, 20 March 2009 by Julia Decker (talk | contribs)
The SmartSimple reporting sub-system can be a bit of a misnomer as the reports can be considered more like queries, and because the results are generally web-based, the reports can be used for more than simple reporting. A couple of not-so-obvious examples are:
- Using a report to front a user's interaction with data.
- Exposing a report to the Internet to populate part of a website.
Let's look at using a report to front a user's interaction with data and how that works. The key elements of the reporting tool needed are:
- Report Criteria - these features let you hard code the criteria and prompt the user for the criteria when the report is previewed.
- Linked Fields - this feature lets you make a report dynamic and gives the user the ability to drill into a record retrieved by the report.
- Report template - as well as controlling the layout of the report, the report template also provides the ability to add scripting to the report as viewed by the user.
- Report URL - this is simply the URL associated with the report but that's what you need to link a report to a portal.
In Detail
- Reporting Criteria - these can be hard-coded criteria expressions, user-prompted values (??? syntax), or sometimes the @CompanyID@ or @userID@ to restrict the results to those specific to company or user.
- Linked Fields - these depend on the entities referenced in the report (for the company table you can choose the company name as static text, or the company name as a link, for the contact table you can choose the contact name as static text, or the contact name as a line and for level 1 entities you can choose the name of the entity or template type as static text or as links). These Link fields when used in a report give you a drill-down capability.
- Report Template - this controls the format and content of the report and by adding scripting to the header you can convert a report into a real web page with any functions required.
- Report URL - you can take the link from the report list - right click and properties or copy link location - depending on the browser.
Bringing it all Together
- Create the report you need with the prompts for parameters you wish the user to enter or the underlying criteria.
- If you want the report to link to referenced records, make sure you have added the Link fields rather than the static fields.
- Add any formatting or scripting (for example, a link to a new entity if you wish the user to be able to create a new entity directly from the reporting page).
- Take the report link and add to a new portal link.
- Make sure the report is permissioned correctly for the roles of users that will be accessing the report.
- Test everything.
- Good to go!