Hi,
i´m trying to switch from SSRS 2008 (i know, old :-) ) to SSRS 2017 (PowerBI Report Server). I took some of my old reports and simply deployed them to the new server, which - in general - worked fine.
But i have a report that has two parameters defined as Date/Time, and a query to Oracle (using Oracle DataProvider, not OLE DB) and in this query calculating the difference between the two parameters:
SELECT
:DateTo as DATE_TO,
:DateFrom as DATE_FROM,
:DateTo - :DateFrom as secs
FROM DUAL
This report works fine in SSRS 2008, but fails when trying to convert the "secs"-field to a number in SSRS 2017. Cause: The "secs" get returned as "1.00:00:00" for example in SSRS 2017 but simply as "1" in SSRS 2008.
I tracked this down to find that the bind variables (:DateTo/:DateFrom) get passed to Oracle as DATE in SSRS 2008 but as TIMESTAMP in SSRS 2017. I can successfully resolve the issue by doing either
TRUNC(:DateTo) - TRUNC(:DateFrom) as secs or
CAST(:DateTo AS DATE) - CAST(:DateFrom AS DATE) as secs
but i would prefer a solution that removes the necessity to change every report with this problem and do some kind of "server-wide switch to old behaviour".
My issue seems to be the same as discussed here:
https://developercommunity.visualstudio.com/content/problem/106170/vs2017-and-ssrs-problem-with-date-parameter-and-or.html
and here
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/96265d57-09a6-42fa-b41a-a406aee9068d/ssrs2016-datetime-parameter-problem?forum=sqlreportingservices
but there are no real answers there, so i would like to ask again:
Is there some kind of switch (config-file, startup parameter, whatever) that can be used to set that Date-Parameters get passed to Oracle as DATE and not TIMESTAMP in SSRS 2016?
Thank you
Markus