Configure Reporting Rules

Contents

 

Reporting Rules Engine

The Reporting Rules Engine enables extensive modifications to the printing process flow without the need for invasive code changes. This would in turn reduce project time and total cost of ownership.

For more details on the Report Rule Engine visit this overview page.

Configuration

You may find Report Rule configuration forms at Solution Manager > Reporting > Operational Reporting

Report Rule Menu

Report Rule Overview

You can view or create new report rules from the Report Rule Overview.

Report Rule

Rule Id A unique Id is automatically created when you create a new rule.
Description A display name to the rule which describe what the rule is.
Report ID You can set one Report Id per rule. A rule will execute for all reports if the Report Id is set to blank.
Priority The priority level which will decide in which order a report rule will overrule other rules. Rules with same priority will execute in the order of rule Id. If you have two rules with the same Report Id then the order of execution will be the priority and then the Rule Id. One main thing to note is that the rule with the highest priority will execute last to override other low priority rule outputs. For example if you have 3 rules with priority 1,2,3 the order of execution would be 3,2,1.
No Multi Enabling this will prevent the rule from executing if multiple reports are select for single print job. This is checked by default. Disabling this will execute the report for all reports which meets the conditions and Report Id. Therefore it's essential to make sure that you have no action that would violate the confidentiality of the reports (eg. Emails sent after printing etc…)
Enabled Enable or disable the report rule.

Report Rule

Selecting one or more rules from Report Rule Overview, you can drill down to more details using View option from the context menus. A report rule has Conditions and Actions. When the Conditions are fulfilled, set Actions will be executed.

Report Rule Detail

Conditions

Conditions table have Ordinal , Logical operator , Expression 1 and Expression 2 , Operator and parenthesis ( , ) fields.

Ordinal This is a number which would define the ordinal of conditions. You can change the ordinal value to set the order of condition being interpreted.
Logical operator Sets the logical relationship among conditions. A parenthesis of either ( , ) can be used to group conditions with logical operators.
Expression 1 Expression 2 This can be any value including report properties, SQL statements, XPath or any combination of them which would reflect a final value. When you work with expressions, you can get help form "Set Expression Dialog". Select "Edit Expression 1" and "Edit Expression 2" from context menu to get the "Set Expression Dialog"
Operator Used to evaluate the values of "Edit Expression 1" and "Edit Expression 2"

 

Expressions

Expressions in both Conditions and Actions can be of 3 types

You can use this as a programming language where each expression works as a placeholder for some value.

e.g

[&select identity from fnd_user where web_user=’[#CurrentUser]’]

[&ARCHIVE_API.Get_Report_Title(‘[#Reportid]’)]

You can use the "Set Expression Dialog" to create these expression with ease.

Set Expression Dialog

This dialog is used to select values in the report using XPath from the Report XML or selecting Report Context Variables from the report process. Selecting XPath is only possible if the rule has defined a Report ID. Selecting Variables will set values from the report process to the expression. This dialog is also used to set Action Property attributes values.

Set Expression Dialog

Actions

Actions table have Ordinal, Type, Property List and Enabled fields.

Ordinal This is a number which would define the ordinal of Actions. You can change the ordinal value to set the order of Actions being executed.
Type There are different types of actions. You can select the action type you wish to execute when the respective condition is met. Action types are further descried below.
Property List Certain action types can have certain properties. You can set values for properties in the Property List field. Action Properties dialog will help you to find relevant properties for a selected Action type. Select "Edit Action Properties" from the context menu to open Action Properties dialog. The action properties listed in the dialog will vary depending on the action type. You can simple type a value or use the "..." button to bring up the "Set Expression Dialog" to select values.
Enabled Enable or disable the action.

Action Properties

Action Types

As mentioned before the Report Rule Engine is invoked by the Print Dialog. Print Dialog shows the default properties and forced properties for a print job. There are several levels of setting up these defaults using actions.

  1. Preselect Property
    If you decide to set an action with type Preselect Property, properties of that action will be set in print properties in the Print Dialog by default.
  2. Check In To Document Management
    This rule will attach a generated report automatically in to document management.

Document Archive

DocumentClass / DocumentNo : You can attach the generated report in to either a predefined document class or a predefined document number that is defined in document management.

DocumentTitle : The title in which the report is archived in to document management.

DocumentFileName : The file name in which the report is archived in to document management.

ConnectedLU / KeyRef : You can specify if the generated report should be attached to an application form as an attachment. In this case you have to specify the LU and key-value pair to uniquely identify an instance in the LU. For example, if you want to attach the 'Invoice' report, in to the 'Customer Invoice' form, you need to specify the LU as 'CustomerOrder" from the ConnectLU combobox and Invoice_no as the key and a value for that key. You can hardcode a value or retrieve the value from a xpath.

SendStream : If set to 'YES', you will get a stream notification once the report is archived in to document management. You can preview or navigate to the document by selecting the link in the stream.

  1. Set Default Property
    If you set an action type of Set Default Property it will set pre-selected properties in the action in the Print Dialog. However when the Report Format request is made the Report Formatter will also check for the default properties in the action and will apply these settings which would not override any changed settings from the Print Dialog. These settings may come in use when print jobs are directly sent from application without going through the Print Dialog.
  2. Set Property
    If you set an action type to Set Property it will set properties in the Print Dialog with a lock. This way you cannot change the pre-selected values. Further, this means that the Report Formatter will override all the settings if pre-selected.
  3. Route To Connect
    If you want to route any type of application message to IFS Connect, you can use Route To Connect rule action. In order to do this, you will need to define the Connector, Connector Instance and some other IFS Connect properties. There are some concerns when using this action type.

    - The Connector and the Connector Instance should be corresponding to each other, if not, the priority will be given to the Connector and the default Connector Instance will be selected.
    (Ex : If the Transport Connector is 'File', the Connector Instance should be 'FILE_SENDER1'.)

    - Select the preferred output queue as the Queue.

    - AddressData represents the real destination. If the Connecter type is File, the AddressData is the output folder. If the Connector type is Mail, the AddressData is the TO field, i.e. the receiver. AddressData2 represents the CC receivers.

    - Subject matters only when the type is Mail. This represents the subject of the particular output mail.

    - OutputFileName is the resultant document's name. If this is not configured, an automatically generated name will be used.

    - OutputType can be either Binary (supports PDF, Xlsx etc), Xml (Only the data xml) or FullXml (Full data xml with header and footer). If this is not selected, it will be defaulted to Binary.

    - When sending an email through this action, the Type property should be set to REPORTING.

    The following two action property settings indicate two distinct usages of the RouteToConnect action type.
     
  4. Send Email
    This Action Type provides the capability to send the resulting PDF over Email. The functionality is built on top of the Route Reports based on Content mechanism, this generates the routing xml snippet required for sending an Email. This will not override existing routing e-mail destinations unless you specifically skip the standard job email.
  5. Print To Logical Printer
    This Action Type provides the capability to control the Logical Printer or the Print Agent. Eg: change the Logical printer of print job and redirect the print job to a different Print Agent.
    - Change Original Printer : this action property is used to change the current Logial printer of a print job
    - Also Print To : if this action property is set, current print job will be cloned with Logical printer set to selected Logical printer value
  6. Set Print Agent Property
    This Action type provides the capability to control the the Print Agent. Eg: change the printer trays, simplex duplex printing.
  7. Insert PDF
    This Action type provides the capability insert static PDF files to the generated output PDF.
  8. Change System Settings
    This action type can temporarily overrule some System Parameter Properties. Namely these are the "Report Designer Graphics Path", "Make Report Designer PDF/A Compliant", "Spooling From Report Formatter" and the "Breakpoint for XML size for when to format Report Designer reports in memory or using disk storage".
  9. Sign PDF
    With this action it is possible to add a digital signature to the generated PDF. First, a private key has to be installed using the "Keystores" form in Solution Manager >>. The signature can either be applied using the key of the current user or by using a defined keystore id. Set UserSignature to YES if you intend to sign as the current user. In this scenario the KeystoreId is not required.
    Make sure to include a SignatureReason. Without this the signature will not work.
    Optionally,set CertifyDocument to prevent any further changes to the document after it has been generated.

    Some action properties can be used to control the visual signature.
    X(cm) and Y(cm) is the location measured from the top left corner of the page. (in centimeters)
    Zoom(%) sets the size of the signature. By default, this is pretty large. A value of 30% is typically used.
    Page is the page to place the signature on. Unfourtunatly, we can only place ONE signature per document.
    PreferredSize is a PDF Container property of the Visual Signature and should typically be left blank (default 0).
    Style controls what the signature should look like You can show a combination of the below:
        Signature is an image containing a pen written signature (wet signature) of the user. If the file is missing a font-based represetation will be generated instead.
        Details is a list of signature information found in the certificate used.

    If you wish to show a wet signature on the PDF, you can save a png image in the signatures folder under report_images on the application server. The file name should be <user>.png or <keystore_id>.png. See the examples that is delivered in a fresh installation.
    To add a watermark in the signature, make sure to have a png named watermark.png in the same folder as above.

    Sign PDF
  10. Set Archive Property
    This action type can be used to change the attributes of an archive item. You can use this property to distribute the executed report among specific users and/or distribution groups, change the default report life span, set a default layout and a preferred language code, add archive notes and to add new archive variables. Please note that the available report parameters for this action type are ReportTitle, ReportId, ResultKey, CurrentUser and CurrentLanguage.

          Archive Properties

          Distributing to users and/or groups

          Distribution Groups

You will see a dialog as show above when you choose to "Distribute To Users" or "Distribute To Groups". You can individually select the users or groups or you can do a multiple select and add then to the list by selecting the ">>" button.

          Setting Life Span, Layout, Language Code and Notes

You can simply type the value or choose a xpath or Report Context Variables which contain the value. You can also choose values from the combo box where available.

Setting Archive Variables

You can add new archive variable with this action property. The format to add a variable is ArchiveVariableName:ArchiveVariableValue:ArchiveVariableType. You can add multipule Archive Variables by seperating them by a ',' character. (e.g.  ArchiveVariableName01:ArchiveVariableValue01:ArchiveVariableType01,ArchiveVariableName02:ArchiveVariableValue02:ArchiveVariableType02)

The Archive Variable Type can be string, number or date denoted by S,N or D respectively. When specifying a date value the date format should be in the format of YYYY-MM-DD. You can use xpath or Report Context Variables values to construct your Archive Variable value.

Example : archVar01:Hello World:S,archVar02:1234567890:N,archVar03:2014-05-30:D

Report Rule Log


Report Rule Log will help you trace rule execution. This will be useful when designing rules. Report Rule Log will give information on.

You need to set the "Report Rule Advance Logging" System Parameter to "ON' to enable Report Rule Logging.

Note: Double click the message field in the log to see multiple text rows. Some information might be hidden from view.

Import/Export Report Rule

You can import/export a rule by selecting "Import Report Rules" and "Export Report Rules" context menu option shown in the Report Rule header section. You can select one or many Report Rules from the Report Rules Overview and import/export them from the "Import Report Rules" and "Export Report Rules" options in the context menu.

Substitution variables

In addition to IFS standard Context Substitution Variables (CSV), the Report Rule Engine include a few special ones that represents the different properties and states found in the reporting process. You write them with a leading "[#" followed by the variable name and a trailing "]". Here is a full list of available variables.

Note: Many of these variables only have a value in the formatting context. i.e. when the report run just before formatting the report or in the plug-ins. Those variables will be empty when running the Archive action and when retrieving defaults for the Print Dialog.

Variable Notes
[#Copies] Formatting context only
[#CurrentUser]  
[#CurrentLanguage]  
[#FromPage] Formatting context only
[#ToPage] Formatting context only
[#Email] Formatting context only
[#LangCode] Formatting context only
[#LayoutFile] Formatting context only
[#LocaleCountry] Formatting context only
[#LocaleLanguage] Formatting context only
[#LocaleVariant] Formatting context only
[#PrinterId] Formatting context only. Can be either the logical printer or the physical printer
[#LogicalPrinterId] Only when printing to a logical printer
[#RoutingPrinter] Only when using the action "Print to Logical Printer"
[#PrintJobId] Only when printing to a logical printer
[#ReportId]  
[#ResultKey]  
[#ReportTitle]