Lorraines33
Programmer
I want this report to have an optional date prompt so I can schedule it to email monthly using the “current date”. I also want the flexibility for users to be able to select a date when run from the Reports Menu so they can see previous months’ KPI’s on demand. I’ve tried everything I know but the report still says the date prompt is “Required” when run. How do I make that date prompt “Not Required”?
Date Prompt property says it is Not Required.
Query1 Filter is marked as Optional.
Query1 Filter:
CASE
WHEN (?KPIRunDate? is null) THEN ([Incident Opened Date]between(_first_of_month (_add_days(current_date,-60)))and (_last_of_month (_add_days(current_date,-60))))
ELSE ([Incident Opened Date]between(_first_of_month (_add_days(?KPIRunDate?,-60)))and (_last_of_month (_add_days(?KPIRunDate?,-60))))
END
Query2 (Singleton for display in report title - Incidents Created From xx To xx)
Query Calculation Data Item [From] Expression:
CASE
WHEN (?KPIRunDate? is null) THEN (_first_of_month (_add_days(current_date,-60)))
ELSE (_first_of_month (_add_days(?KPIRunDate?,-60)))
END
Query3 (Singleton for display in report title)
Query Calculation Data Item [To] Expression:
CASE
WHEN (?KPIRunDate? is null) THEN (_last_of_month (_add_days(current_date,-60)))
ELSE (_last_of_month (_add_days(?KPIRunDate?,-60)))
END
Query4(Singleton for display in report title - [KPIMonth])
Query Calculation Data Item [KPIMonth] Expression:
CASE
WHEN (?KPIRunDate? is null) THEN (_add_months (current_date,-1))
ELSE (_add_months (?KPIRunDate?,-1))
END
Date Prompt property says it is Not Required.
Query1 Filter is marked as Optional.
Query1 Filter:
CASE
WHEN (?KPIRunDate? is null) THEN ([Incident Opened Date]between(_first_of_month (_add_days(current_date,-60)))and (_last_of_month (_add_days(current_date,-60))))
ELSE ([Incident Opened Date]between(_first_of_month (_add_days(?KPIRunDate?,-60)))and (_last_of_month (_add_days(?KPIRunDate?,-60))))
END
Query2 (Singleton for display in report title - Incidents Created From xx To xx)
Query Calculation Data Item [From] Expression:
CASE
WHEN (?KPIRunDate? is null) THEN (_first_of_month (_add_days(current_date,-60)))
ELSE (_first_of_month (_add_days(?KPIRunDate?,-60)))
END
Query3 (Singleton for display in report title)
Query Calculation Data Item [To] Expression:
CASE
WHEN (?KPIRunDate? is null) THEN (_last_of_month (_add_days(current_date,-60)))
ELSE (_last_of_month (_add_days(?KPIRunDate?,-60)))
END
Query4(Singleton for display in report title - [KPIMonth])
Query Calculation Data Item [KPIMonth] Expression:
CASE
WHEN (?KPIRunDate? is null) THEN (_add_months (current_date,-1))
ELSE (_add_months (?KPIRunDate?,-1))
END