It is possible to specify a constant default value for a prompt. But what if the default value need to be calculated.
For example, there should be an optional prompt for the statement date in the report. If the date is not specified by the user, the current date should be used.
It is possible to implement the logic with the following query filter:
If the date is not specified in the prompt, the optional prompts are ignored and the condition will be reduced to:
Statement Date Equal to Today
If the date is specified, the condition will be equivalent to:
Statement Date Equal to Prompt "Enter Statement Date"
because
A or (A and B) <=> (A and True) or (A and B) <=> A and (True or B) <=> A
Hello, which objects i should choose as OPTIONAL prompt? The one in first line or in third line? or both
LikeLike
Both should be optional
In general, if there are two prompts with the same name, you should set identical properties to them.
LikeLike
Thanks…it works.
LikeLike
What if I am using Between ‘Start_Date’ And ‘End_Date’
LikeLike
just change the “equal to” operator to “larger than” and “less than”
LikeLike
Thanks for the post. It works great.
LikeLike
How do you include TODAY in second query filter??
LikeLike
You have to create the corresponding object in the universe.
For SQL Server, the select statement for the object will be: CAST(GETDATE() AS DATE)
LikeLike
Thanks Pal,Its working
LikeLike