Configuring a Custom SQL Query Data Provider - Reporting Dashboards - Foundation 23.1 - Foundation 23.1 - Ready - OnBase - external

Reporting Dashboards

Platform
OnBase
Product
Reporting Dashboards
Release
Foundation 23.1
License

A custom SQL query data provider allows you to write and execute custom SQL data access statements and stored procedures.

CAUTION:

SQL statements should only be edited or written by a certified database administrator. Poorly constructed SQL statements may return unexpected results or could cause the client to close unexpectedly, and queries that are not written with the index schemas and data distributions in mind can become long-running queries that consume substantial database server resources and adversely affect the performance of the entire system. In extreme cases, data could also be removed from the database or otherwise corrupted.

To configure a custom SQL query data provider:

  1. Select Data Providers in the left pane under Configuration Items. The data providers configured are listed in the right pane.
  2. Select the data provider to configure in the right pane and click Configuration in the Data Provider ribbon group.

    The Edit SQL query dialog box is displayed.

  3. Type or paste the SQL query into the data-entry field provided. For SQL syntax, parameterizations, and macros specific to Reporting Dashboards, see About the Custom SQL Query Data Provider.
    CAUTION:

    SQL statements should only be edited or written by a certified database administrator. Poorly constructed SQL statements may return unexpected results or could cause the client to close unexpectedly. Queries that are not written with the index schemas and data distributions in mind can become long-running queries that consume substantial database server resources and adversely affect the performance of the entire system. In extreme cases, data could also be removed from the database or otherwise corrupted.

    Tip:

    As a best practice, all SQL queries created for use with Reporting Dashboards should be first run in a profiler by a certified database administrator, to review the database optimizer access plan. This analysis needs to be performed against the live database or a database of similar size, with similar data distribution, for all tables involved in the query. The DBA should verify that the query is well formed and not I/O intensive. The data access plans should also be documented to provide a baseline in case database performance degrades at a later time.

    To display debugging information for the replacement of macros and parameters in the SQL query entered, right-click the information icon and select Show debug output:

    The debugging information is displayed below the data-entry field in the Debug Output pane:

    To show/hide line numbers in the SQL editor pane, right-click the information icon and select Enable editor line numbers.

  4. Select Display all date/time columns in local time to convert all date-time values returned to the local time of the user accessing a dashboard.
  5. From the Database drop-down menu, select the database you would like to use. If any external databases have been configured, they are available for selection here. For more information, see Configuring an External Database for use with Reporting Dashboards.
  6. Click Next after ensuring that the SQL entered is valid. The Configure Runtime Parameters dialog box is displayed if parameters need to be configured.
    Tip:

    To reduce the processing requirements of Reporting Dashboards, it is a best practice to configure required runtime parameters for every Data Provider, or configure parameters with default values to be used if a value is not entered.

    Note:

    If there are any errors with the runtime parameters, these are displayed in the yellow warning pane above the parameters list. The Next button is not enabled until all errors are corrected.

  7. Select Allow the consolidation of parameters on a dashboard to treat the same parameters from different data providers as one parameter in the Input Parameters dialog box.
    Note:

    In order to be consolidated, parameters must share the same data provider type, parameter ID, and have the same reverse-fill sources.

  8. Select Allow using default values at runtime to allow the parameters to be filled with a default value if the user does not explicitly select or enter a value.
  9. Select Always prompt for parameter values at runtime to prompt for parameters even if default values have been configured.
  10. To configure a runtime parameter, select it in the parameters list and click Configure. The Edit SQL Parameter dialog box is displayed.
  11. Type a user-friendly name for the parameter in the Caption field. This is how the user will know what the parameter is for. The caption is limited to 60 characters.
  12. Select the data type of the parameter from the Data Type drop-down list. The data type must be valid for the SQL parameter being configured (for example, do not use Numeric9 as the data type when the SQL parameter being configured contains letters).
    Note:

    The Date Time Range data type is only valid after a SQL BETWEEN clause.

  13. Select Allow dynamic logical operator in order to allow the logical operator (for example <, >, =) used to evaluate this parameter to be changed. Dynamic logical operators allow for the comparison of values in a method chosen by the user. By default, the selected logical operator is used when the data provider is accessed.
    Note:

    If Allow dynamic logical operator and Allow multiple selection are both selected, the only logical operators available are IN and NOT IN, which allow the user to search for values within (when using IN) or not within (when using NOT IN) the parameter.

  14. Select Allow wildcard operators to allow Contains, Begins with, and Ends with operators to be used to evaluate this parameter. This option can only be selected if Allow dynamic logical operator is also selected.
    Note:

    Queries that search for terms using the Ends with operator need to ensure that trailing spaces are taken into account. Use the RTRIM function in the SQL query to remove trailing spaces.

  15. Type a brief description of the data the parameter represents in the Help Text field. This text is displayed when a user hovers the cursor over the parameter name in the output display. The help text is limited to 255 characters.
  16. To configure the runtime parameter to use a drop-down list, select the list type from the Value select list drop-down list. This list includes configured global select lists.
    Note:

    The data type of the Value select list must match the data type of the runtime parameter.

    To create a new select list to add to the Value select list drop-down list, or to edit an existing select list already available in the Value select list drop-down list, follow these additional steps:

    1. Click the add/edit button at the right of the Value select list drop-down list.

      Select New to add a new select list.

      If you are editing an existing select list, make sure the select list you want to edit is selected in the Value select list drop down, then click the add/edit button and select Edit.

      The Manage Select Lists dialog box is displayed.

    2. If this is a new select list, the Select List Name dialog box is displayed over the Manage Select Lists dialog box.
    3. Type a name for the select list in the field provided. This is the name that is displayed in the Value select list drop-down list on the Edit SQL Parameter dialog box.
    4. Click OK. The new select list is added and selected, but requires list values before it can be used.
    5. In the right pane, select a source of the values from the Select list source drop-down list.

      The list source options available include the following:

      List Source

      Description

      Manually enter values

      Type the values for the select list in the grid that is displayed. The Label is how the item is displayed in the drop-down list and the Value is the value that is included in the data query. To add a new value, press the Enter key. A new blank row is added to the grid. To change an existing Label or Value, select it in the grid and type the new value.

      Note:

      Manually entered values are limited to 255 characters.

      Get values from a SQL query

      Enter the SQL used to build the label/value pairs for the drop-down list from the data that is returned. To validate the SQL entered, click Validate SQL at the bottom of the data-entry field. The SQL statement entered must return exactly two columns, one for the Label and the other for the Value(the Label is how the item is displayed in the drop-down list and the Value is the value that is included in the data query).

      CAUTION:

      SQL statements should only be edited or written by a certified database administrator. Poorly constructed SQL statements may cause reports to return unexpected results or could cause Reporting Dashboards to close unexpectedly, and queries that are not written with the index schemas and data distributions in mind can become long-running queries that consume substantial database server resources and adversely affect the performance of the entire system. In extreme cases, data could also be removed from the database or otherwise corrupted.

    6. Click Close. You are returned to the Edit SQL Parameter dialog box.
    7. Select the list from the Value select list drop-down list.
      Note:

      The data type of the select list must match the data type of the runtime parameter.

  17. Select Restrict user input to select list values to restrict user input for the parameter to only the options in the drop-down list. If this option is deselected, users can type a value for the parameter or select it from the drop-down list.
  18. Select Allow multiple selection to allow users to select more than one value from the drop-down list. If this option is deselected, users can only select one value from the select list. This option is only available if Restrict user input to select list values is also selected.
  19. Select Collapse multiple selection to allow users to collapse the multiple selection list for this parameter. This option is only available if Allow multiple selection is also selected.
    Note:

    Without Allow dynamic logical operator enabled, the Allow multiple selection option is only valid in an IN SQL clause.

  20. Select Input required to require users to enter a value for that parameter. This option is selected by default, but can be deselected if a parameter is optional.
  21. Click OK on the Edit SQL Parameter dialog box to save the configuration and return to the Configure Runtime Parameters dialog box.
  22. Configure any other runtime parameters.
  23. Click Next. The Choose the display columns for the data provider dialog box is displayed.
    Note:

    If the Restrict user input to select list values option was selected in the Edit SQL Parameter dialog box, you are required to select a default value for the select list prior to selecting display columns for the data provider. Select a value from the drop-down select menu and click Next. The Choose the display columns for the data provider dialog box is displayed.

    The display columns available depend on the data provider type being configured. If the data provider being configured allowed you to pre-select the display columns available, only the display columns selected earlier in the configuration process are available.

  24. Select a display column to include it in the results, or deselect it to hide it.
    Note:

    In order for users to be able to open a document directly from a dashboard, the system Keyword Type Document ID must be included as a display column.

    Click None to deselect all display columns or click All to select all display columns.

    Tip:

    A preview of the type of data that is returned with the display columns selected is displayed in the preview pane at the right of the list of display columns. If the data returned is not acceptable, select different display columns or click Previous to reconfigure previous aspects of the data provider.

  25. To reorder the display columns, drag-and-drop the column headings in the preview pane to put them in the desired order.
  26. To rename a display column, double-click the name in the list, and type the new name in the field provided. Click anywhere outside the field to save the changes.
    Note:

    Display column names must not be blank or end with a space.

  27. Click Save to save your changes.

    If any display columns were deselected or renamed, a prompt is displayed to confirm that you wish to make these changes, even though these changes may cause existing dashboards and reports to not function correctly.

  28. Click Yes to accept these changes. Click No to return to the Choose the display columns for the data provider dialog box.