Reporting → Report Search Criteria → Using Advanced SQL Conditions in SBM Reports → Using Query at Runtime in Advanced SQL
You can optionally include Query At Runtime parameters in your advanced SQL statement. The Query At Runtime definition is composed of the following:
%QAR{{ Table.Column, User text }}%
Note the Query At Runtime definition starts with the string %QAR{{ and ends with }}%. The internal definition consists of the following two parts:
The following table lists User text phrases that are automatically replaced with localized text when shown to the user who runs the report:
User text | Localized text shown to the user |
---|---|
all |
contains all |
any in |
contains any |
not all |
does not contain all |
not any not in |
does not contain any |
like |
like |
not like |
not like |
likez |
like (zero-filled) |
contains |
contains |
not contains |
not contains |
In addition, note the following:
Example of using Query At Runtime with the Last Modified Date field:
@WHERE UIM_INCIDENTS.TS_LASTMODIFIEDDATE > %QAR{{ UIM_INCIDENTS.TS_LASTMODIFIEDDATE, is after }}%
Example of using current user with the Owner field in pass-through SQL:
@WHERE TS_OWNER in (%{{Current User}}%)
Examples of using Query At Runtime with a Text field:
@WHERE TS_ISSUEID like '%%QAR{{TS_ISSUEID, contains}}%%'
@WHERE TS_ISSUEID like '%%QAR{{TS_ISSUEID, contains}}%%' OR TS_ISSUEID like '%%QAR{{TS_ISSUEID, contains}}%%' OR TS_ISSUEID like '%%QAR{{TS_ISSUEID, contains}}%%'
Examples of using Query At Runtime with a Date/Time field:
@WHERE TS_EST_DATE_TO_FIX >= %QAR{{UBG_ISSUES.EST_DATE_TO_FIX, >=}}%
@WHERE TS_EST_DATE_TO_FIX > %QAR{{UBG_ISSUES.TS_EST_DATE_TO_FIX, >}}% and TS_EST_DATE_TO_FIX < %QAR{{UBG_ISSUES.TS_EST_DATE_TO_FIX, <}}%
Example of using Query At Runtime with a Binary field:
@WHERE TS_P4STATUS = %QAR{{UBG_ISSUES.P4STATUS, =}}%
Example of using Query At Runtime with a User field:
@WHERE TS_DEVELOPER in (%QAR{{UBG_ISSUES.TS_DEVELOPER, in}}%) and TS_OWNER in (%QAR{{UBG_ISSUES.TS_OWNER, in}}%)
Example of using Query At Runtime with a Numeric floating point field:
@WHERE TS_FLD_NUM_2_FP > %QAR{{UBG_ISSUES.TS_FLD_NUM_2_FP, >}}%
Example of using Query At Runtime with a Numeric integer field:
@WHERE TS_FLD_NUM_1_INT > %QAR{{UBG_ISSUES.TS_FLD_NUM_1_INT, >}}%
Example of using Query At Runtime with a Single-Relational field:
@WHERE TS_FLD_SINGLE_RELATIONAL in (%QAR{{TS_FLD_SINGLE_RELATIONAL, in}}%)
Copyright © 2013–2019 Micro Focus or one of its affiliates. All rights reserved.