You can set a text lookup to a dynamic date, and it will function like a dynamic date in that a WHERE clause will not be automatically generated..
Added new Dynamic Filtertype for Lookup with Text. This allows you to tell IR, not to generate a WHERE clause, but to allow you have the variable to substitute directly into the sql dynamically
Determine the variable name - Look at the html source in the analyze dropdown and look for the internal name used.
If the name in the template of the lookup was item and its description part is called description then it should be something like
item$description The variables that are available are
@item$description_value - Numeric separation e.g. 1,2,3 -> 1,2,3 in sql
@item$description_value$ - String separtion e.g. a,b,c -> 'a','b','c' in sql ( Recommended form )
Using Job Budget Analysis as the example |
In the template find the lookup name "budget type" and set it's Filter Type to Dynamic Date.
and the SQL - the "@budget$description_Value$" is determined by looking at the page source for the field "budgettype" on the Advanced panel filter page.
These are the steps
Select the mapping
2. Open the Filter panel to show the fields
3. View Source
4. And search for ‘BudgetType’ to get the name
Using this you can determine the user selection in the MAIN table SQL in the WHERE Clause.
/* Holy hack - use dynamic date feature for lookup: see the template for budgettype lookup */ AND (IIF( LedgerType = 'B','Job Budget', IIF ( LedgerType = 'MB','Period Budget','Others' ))) /* DBG IN ('MB' ) */ /* PROD */ IN (@budgettype$description_value$ ) AND JJT.LedgerType IN ('B','MB') AND JJT.BudgetAmount <> 0 |