Run report based on query with direct run sql

Suppose an “EMP” table which contains a “Name” field (varchar) and a “Startdate” field (date) type. I want to select the employees which are here within the last year.
So in “Run SQL” I can write
Select “Name” from “EMP” where “Startdate” > CURRENT_DATE - 365
and that works OK.
Making this a query throws an syntax error, but when I select “Run SQL directly” that works OK.
Now making a report on this query gives again the syntax error problem.
I made a view based on the query, that opens OK in base, making a report also seems to go OK, but when I finally run the report, error again.
Is there a way out to get a report like that, without taking the selection out and fiddling in the report.


On the Data tab of the report properties, set Analyze SQL command to No:

image description

Please note this was not chosen to be an SQL command. The Wizard set it this way. If you change the Content type to Query and select your working query, you do not need to set Analyze SQL command to No because it is already set in the query.

That did it, I choose to refer to the query.


With all questions, if you have been helped, please help others to know the question has been answered by clicking on the :heavy_check_mark: in upper left area of answer which satisfied the question.