Does your [Facilty - Created Timestamp] field have a time element to it? If it does then you probably need to cast it first, e.g.
(?p_ReportDate? = 'Today'
and cast([Receipt].[Facility - Created Timestamp],date) = current_date )
OR
(?p_ReportDate? = 'Previous Day'
and cast([Receipt].[Facility - Created Timestamp],date) = _add_days(current_date,-1))
------------------------------
Chris Turner
------------------------------
Original Message:
Sent: Tue June 27, 2023 10:28 AM
From: Avishek Pal
Subject: Dynamic Date Filters
Hi,
New user here and was hoping that someone could help me with a date prompt. I would like set up a date prompt ?p_ReportDate? for static choices 'Today' or 'Yesterday' based on the facility date time. What details filter do i need to add to my query in order to do that.
This is what i have but i do not get any data when try and run the report. If i choose a start and end date via a different prompt i get data
(?p_ReportDate? = 'Today'
and [Receipt].[Facility - Created Timestamp] = current_date )
OR
(?p_ReportDate? = 'Previous Day'
and [Receipt].[Facility - Created Timestamp] = _add_days(current_date,-1))
Any help would be greatly appreciated
------------------------------
Avishek Pal
------------------------------