Display Restrictions in Paginated Reports
Display Restrictions in Paginated Reports
Technologies > Business Process Owner Views > Paginated Reports >Report with Print-out Restriction
When you apply a console restriction to a paginated report, you can enable the
printRestriction
option to instruct the paginated report to print the restriction as a formatted table at the top of the first page.
The report can automatically print all standard restriction clauses, such as equals, less than, greater than, and IN (values).
For complex restrictions, you can use custom restriction formatting by providing restriction titles and displayed values.
This feature allows the view designer to include the client-side restrictions that are in effect in a group band at the top of the first page of the paginated report.
Print the client-side passed parsed restriction clauses:
To instruct the paginated report service to print the parsed restriction, add the
printRestriction
parameter to the parameter list in javascript.
var parameters = {‘printRestriction’: true };
var restriction = new Ab.view.Restriction();
restriction.addClause('fl.bl_id', HQ', '=');
restriction.addClause('fl.fl_id', ['16', '17', '18'], 'IN');
var parsedRestrictions = {'ds_abExRmxflRpt_owner': restriction};
View.openPaginatedReportDialog(reportViewName, parsedRestrictions, parameters);
Print the client-side passed customized restriction:
For some restrictions, you cannot clearly print the restriction just using the parsed restriction clauses because:
- You want to express value ranges, such as Month, Quarter, or Year, as a single line rather than as a pair of less than/greater than clauses.
- Your restriction involves radio-button selections or checkboxes – such as the “Analyze Costs From” or “Show Cost Types of” controls in the Cost Forecasting console below.
- Your restriction in JavaScript is just parameters for a complex SQL statement defined in the .axvw.
One technique is to dynamically assemble the view title to reflect the restriction (e.g. “Leases that are ‘Not Expired’ or that are ‘Coming Due’). In these cases, you can specify the titles and values of the summary “soft” restriction header from JavaScript:
var printableRestriction = [
{ ‘title’:”Show Cost of Type”, ‘value’:“Only Income” },
{ ‘title’:”Analyze Cost From”, “value”: “Recurring Costs Only” },
{ ‘title’:”Show Costs of Type”, “value”: “Only Income” },
{ ‘title’:”Show Costs Associated With”, “value”: “Only Leases” },
{ ‘title’:”Exclude Costs in These Categories”, “value”: “ADMIN – TRAINING/SEMINARS, BUILDINGS – MAINTENANCE - OTHER” },
{ ‘title’:”Group Results By”, “value”: “Month” }
] ;
var parameters = {‘printRestriction’: true, ‘printableRestriction’: printableRestriction };
View.openPaginatedReportDialog(reportViewName, null, parameters);