#1 2019-07-16 10:32:13

Patryx
Member
Registered: 2019-03-25
Posts: 199

Date Parameter with date and time mode - time is never set

Hi,
I noticed a quite serious problem with Date parameter with date and time mode for Dynamic Reports when I compared results of report execution with my query called on pgadmin. It's a bit connected with:
https://forum.reportserver.net/viewtopic.php?id=1453

I add such a parameter to my report, in Report Execution View I set a value of date and time. Unfortunately this parameter still has only date (no time - always 00:00:00 no matter what I set in parameters tab). It's easy to check it puting this parameter in:

SELECT $P{P_DATETIME_FROM}::timestamp as my_datetime 

I don't attach screens etc because there is nothing complicated and it's a general problem with such a parameter.

Could you tell me is a bug or I have to do it in different way to get date and time as a parameter in my query?

Offline

#2 2019-08-01 08:47:52

Patryx
Member
Registered: 2019-03-25
Posts: 199

Re: Date Parameter with date and time mode - time is never set

Unfortunately in version 3.0.8 it still doesn't work. I cannot use date and time mode because time it is always 00:00:00 as value of parameter, no matter what I set in parameter's tab.

Offline

#3 2019-08-01 09:16:43

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

we will look into this in RS-3569.

Regards,
Eduardo

Offline

#4 2019-08-09 13:30:35

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

we see the problem and will update here when we have more information.

Regards,
Eduardo

Offline

#5 2019-08-12 08:31:23

Patryx
Member
Registered: 2019-03-25
Posts: 199

Re: Date Parameter with date and time mode - time is never set

Hi Eduardo,
The same problem is with parameter in time mode!
It only works for initialized value. If I change time in parameter's tab, no time is visible as parameter.
This is a huge and crucial problem because we have no possibility to filter time at all. Meanwhile I thought I would resolve the problem with date and time mode adding another parameter with time but now I can't because you have a bug also there.
In this way I cannot achieve so basic requirements of our client...
Any other idea how I can filter data by time chosen by user?

P.S. Is it possible to get very soon a preview version of next version with corrected behaviour of datetime parameter?

Last edited by Patryx (2019-08-12 08:32:24)

Offline

#6 2019-08-12 15:25:20

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

as I mentioned, we are currently looking into this and making progress. We are now testing a bugfix approach.

Of course, we can also create a preview version of the next reportserver version.

Regards,
Eduardo

Offline

#7 2019-08-13 09:52:29

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

we corrected this issue and will create a preview version including this fix for you to test. Thanks for sending this bug report.

Regards,
Eduardo

Offline

#8 2019-08-13 11:57:23

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

I sent you the preview release link per Email, please confirm you received it.

Regards,
Eduardo

Offline

#9 2019-08-14 09:00:44

Patryx
Member
Registered: 2019-03-25
Posts: 199

Re: Date Parameter with date and time mode - time is never set

Yes, thank you!
I got it but I have not installed it yet.

Offline

#10 2019-08-21 07:41:51

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

for completeness: can you please confirm here if the time / date parameters are now working fine ?

Regards,
Eduardo

Offline

#11 2019-08-26 06:19:09

Patryx
Member
Registered: 2019-03-25
Posts: 199

Re: Date Parameter with date and time mode - time is never set

Hi,
After researching it's not working correctly when it comes to default value sad
Beside the fact I wrote you in email (when I clear time from date and time mode parameter, it shows warning next to button but in query the parameter has previous value), I have just noticed a problem with initial value from formula.
When I write as formula:
${today.setHours(23).setMinutes(59).setSeconds(59)} , I expect to have at the begninng current date with hour: 23:59. Unfortunately only date is set, time is empty in Parameter tab. What's more if I use formula, even if I choose different time (time button or date) I get NULL value...
Could you fix it and send me version?

Regards,
Patryk

Last edited by Patryx (2019-08-26 06:44:28)

Offline

#12 2019-08-28 06:47:08

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

the original issue with time in date parameters not being sent to the report you mentioned:

Patryx wrote:

Unfortunately this parameter still has only date (no time - always 00:00:00 no matter what I set in parameters tab). It's easy to check it puting this parameter in:

SELECT $P{P_DATETIME_FROM}::timestamp as my_datetime 

Could you tell me is a bug or I have to do it in different way to get date and time as a parameter in my query?

is fixed. The issues you mention now are different, not directly related issues.

I raised ticket RS-3651 for the formula issue.

I don't quite understand this: "What's more if I use formula, even if I choose different time (time button or date) I get NULL value..."
Can you post screenshots / more details ?

Regards,
Eduardo

Offline

#13 2019-08-29 17:27:51

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

I see the problem with the formula. I will let you know when we have more information on this.

Regarding this:
"What's more if I use formula, even if I choose different time (time button or date) I get NULL value..."
Can you post screenshots / more details ?

Regards,
Eduardo

Offline

#14 2019-09-03 09:58:49

Patryx
Member
Registered: 2019-03-25
Posts: 199

Re: Date Parameter with date and time mode - time is never set

Hi,
When it comes to 3.1.0 beta version, setting formula still doesn't work properly. Just changing time influence in more cases on the value od parameter but it still has a lot of problems...
If I set formula for parameters date and time, only date is visible (no time displayed) but nowadays I have correct time mapped to the parameter when I have not changed it. BUT when I change time using parameter's tab I get an error.
I just want to have two fields: "DateTime From" and "DateTime To", where at the beginning time should be set: for "DateTime From" as 00:00, for "DateTime To" as 23:59 - I think typical use for filtering.
What's more if I change just date, time is set 00:00 and no error thrown.
To sum up, nowadays still there is impossible to use forumla on date and time mode (time mode too), because there is an error if I change only time of this param, if I change date the behaviour is really strange. This component should always show values as there are set in parameter value (the same as in column in below example).

I attach screenshots (query from your AuditLogs)

1-main.jpg
2-param.jpg
3-Report-Execution-View-after-Open.jpg
4-Report-Execution-View-after-Open-prev.jpg
5-Report-Execution-View-change-Only-Time.jpg
6-Report-Execution-View-change-Only-Time-error.jpg
7-Report-Execution-View-change-Date.jpg
8-Report-Execution-View-change-Date-prev.jpg
9-Report-Execution-View-change-Time-Diff-Date.jpg
10-Report-Execution-View-change-Time-Diff-Date-prev.jpg

Offline

#15 2019-09-25 09:32:08

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

thanks for your screenshots.
As I mentioned, the formula issues are different issues, for which we have ticket RS-3651. Ticket RS-3651 is not fixed in the beta version (you can see this in the release notes: https://reportserver.net/releasenotes/RS3.1.0.html)

Regards,
Eduardo

Offline

#16 2019-10-01 11:16:26

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

RS-3651 will be fixed in the next version *for datetime parameters* (with formulas).
Please note that the time in time parameters is not being set when using formulas. So the fix only works for datetime parameters. For time parameters we have RS-3674.

I also noticed that the seconds are being trimmed out as when you don't use formulas. Seconds are always 0, ignoring the seconds part in the formula. We have RS-3675 for this.

Regards,
Eduardo

Offline

#17 2019-10-02 15:49:32

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,465
Website

Re: Date Parameter with date and time mode - time is never set

Hi Patryx,

RS-3651 was released with ReportServer 3.1.0 as I mentioned.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB