How can I include the second date in a report generating querry? #773

I would like a report to have two optional dates (ex. ${param1} >= startDate and ${param2} <= startDate)
The problem with this query is that it doesn’t include the second date, so I have tried "dateadd(D, 1, ${param2}). This causes problems when the second parameter isn’t provided. To fix this, I have been trying to find a way to default the second parameter to today’s date, but haven’t found any success.

See attached file.

default date problem

Hi Ned,
It’s a problem for SQL queries in the reporting module. Reporting incorrectly handles “${param2} is null” condition. We will try to fix it in release 6.3.

Workaround: when running the report programmatically, you can fill null parameter by default value (i.e. as described here)

Hi, the described issue is fixed in the platform version 6.3.0.

Awesome. Thanks :slight_smile: