#1 2023-08-24 14:09:45

nsarlija
Member
Registered: 2023-08-24

Saved date parameter issue

Hi,

I am using two date parameters for a dynamic list report (parameters are used to retrieve results from date range from-to).
Parameter Mode: Date, no default values used.

Using the parameters in sql like this:

((${StartDate} IS NULL) OR (CAST(${StartDate} AS DATE) <= CAST(Ata AS DATE)))
AND
((${EndDate} IS NULL) OR (CAST(${EndDate} AS DATE) >= CAST(Ata AS DATE))) 

Steps:

1. Run variant, enter start and end dates, e.g. 01/01/2022 - 31/12/2022 - returned record count: 11897 (correct)

2. Save variant (dates get saved with the variant) - run the report again - returned record count: 11890 (not correct)

3. Delete saved dates and enter same dates again - run the report again - returned record count: 11890 (not correct)

4. Enter some other random dates, run the report

5. Enter again the required dates 01/01/2022 - 31/12/2022 - returned record count: 11897 (correct)

Any idea what causes the changed results here?
Tried it several times, always the same (difference in) results.
Is it possible that parameter value that gets sent to db is different when parameter is saved with variant compared to entering it manually each time?
If that is the case, what is the solution?
Is there a setting that would prevent users from saving parameter value when saving the variant?

Last edited by nsarlija (2023-08-24 14:11:08)

Offline

#2 2023-08-30 16:41:42

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Saved date parameter issue

Hi nsarlija,

what DB exactly are you using on this report? And what RS version exactly are you using ?

Regards,
Eduardo

Offline

#3 2023-08-31 05:34:47

nsarlija
Member
Registered: 2023-08-24

Re: Saved date parameter issue

Hi Eduardo,

DB is SQL Server  (Microsoft SQL Server 2019 (RTM-GDR) (KB4583458) - 15.0.2080.9 (X64)
    Nov  6 2020 16:50:01
    Standard Edition (64-bit))

and RS is RS4.2.0-6072 (2022-08-22-10-22-31) Community edition

Offline

#4 2023-08-31 15:19:13

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Saved date parameter issue

Hi nsarlija,

can you pls try with the latest RS 4.6.1 ? You can install it (test installation) quickly by the Installer https://reportserver.net/de/download/ , just with some "next", "next" buttons in a Windows machine.

Regards,
Eduardo

Offline

#5 2023-09-20 06:09:56

nsarlija
Member
Registered: 2023-08-24

Re: Saved date parameter issue

Hi Eduardo,

I tried what you suggested, and the issue is not occurring on the latest version.

I tried to further troubleshoot the issue, and still not sure what exactly is the cause.
The issue persists when recreating variants.
It seems to be related with date handling, e.g., in one case record from 31-12-2021 is taken into consideration when it should be excluded.

Apart from upgrading, do you have any other suggestion how to work around this issue on the current version?

Offline

#6 2023-09-20 16:31:50

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Saved date parameter issue

Hi nsarlija,

if this does not happen in the newest version, this was a bug and was corrected in newer versions.

Pls upgrade to the newest version.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB