Sample Example

Sample Report in PLT:

<Report public="true">
<Name>CurrencyConversionReport</Name>
<SqlDef Name="CurrencyConversionReport" GroupName="SampleSqls"><![CDATA[
SELECT FROM_CURRENCY,TO_CURRENCY,EFFECTIVE_START_INCLUSIVE,EFFECTIVE_END_EXCLUSIVE,FACTOR,NAME ${ReportInjection:SELECT,SELECT_CLAUSE}
FROM CURRENCY_CONVERSION
WHERE ${ReportInjection:WHERE,WHERE_CLAUSE} ]]>
]]></SqlDef>
<ActionDef>
<PrimaryModelLevelType>CurrencyConversionFactor</PrimaryModelLevelType>
</ActionDef>
<Filters bindSqlNulls="true">
.....

Sample Report Injection in ZBKS:

File Name: PLT.CurrencyConversionReport.rptInject

<ReportInjection xmlns="http://www.onenetwork.com/Platform">
<ReportName>PLT.CurrencyConversionReport</ReportName>
<SQLInjections>
<SQLInjection name="SELECT_CLAUSE">CONVERSION_FACTOR_NAME</SQLInjection>
<SQLInjection name="WHERE_CLAUSE"> <![CDATA[${filterIfNotNull:CONVERSION_FACTOR_NAME, UPPER(CONVERSION_FACTOR_NAME) like UPPER($CONVERSION_FACTOR_NAME$)}]]></SQLInjection>
</SQLInjections>
<FilterAdditions>
<CustomFilterField>
<FieldRef category="PDF" levelType="CurrencyConversionFactor">
<FieldName>ConverterName</FieldName>
</FieldRef>
<Type>STRING</Type>
<Optional>true</Optional>
<SimpleMapping sqlName="CONVERSION_FACTOR_NAME"/>
</CustomFilterField>
</FilterAdditions>
<RetrievalAdditions>
<CustomRetrievalField>
<FieldRef category="PDF" levelType="CurrencyConversionFactor">
<FieldName>ConverterName</FieldName>
</FieldRef>
<Type>STRING</Type>
<SimpleMapping sqlName="CONVERTER_NAME"/>
</CustomRetrievalField>
</RetrievalAdditions>
</ReportInjection>

The final query after the injection(s) applied will be:

SELECT FROM_CURRENCY,TO_CURRENCY,EFFECTIVE_START_INCLUSIVE,EFFECTIVE_END_EXCLUSIVE,FACTOR,NAME, CONVERSION_FACTOR_NAME
FROM CURRENCY_CONVERSION
WHERE ${filterIfNotNull:CONVERSION_FACTOR_NAME, UPPER(CONVERSION_FACTOR_NAME) like UPPER($CONVERSION_FACTOR_NAME$)}


When merging SELECT clauses, Platform will automatically add a comma between each injection.

When merging JOIN clauses, Platform will automatically insert space betwen each injection.

When merging WHERE clauses, Platform will automatically add "AND " before each injection, and surround the injection with parens.