#1 2019-03-29 09:23:02

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

Datasource parameter - how to set all values as default values?

Hi,
I want to embed Report Execution View again.
I created datasource parameter for report. The query for values should read column "id" from my table after filtering by other parameter given in URL.
The problem is that I need to have all data from the query as default values. How can I automatically set that all rows returned from query will be values of filter used in report?
Unfortunately, I cannot find such possibility while defining datasource parameter.
I know that I could put array of values as filter in URL but I want to avoid it because I have my values for filter in datasource. What's more there could be a lot of values in filter so I cannot control the URL length and in addition to this all identifiers will be easy to see in HTML by user (URL of the embedded report)
How can I do it?

As example (Postgresql database):
My query for report:
SELECT u.*
FROM public.user u
WHERE $X{IN, u.id, PARAM_USER_IDS}

My query for datasource parameter PARAM_USER_IDS (it depends on text parameter PARAM_GUID):
SELECT id
FROM public.user_filters
WHERE guid=$P{PARAM_GUID}

URL for embeding report:
http://127.0.0.1:81/reportserver/Report … nyGuidHere


My reportserver version: #
version=RS3.0.6-6006
schemaversion=RS3.0-12

Offline

#2 2019-03-31 11:08:45

palacio
Member
Registered: 2018-06-27
Posts: 43

Re: Datasource parameter - how to set all values as default values?

Hi Patryx,

After this...

...

As example (Postgresql database):
My query for report:
SELECT u.*
FROM public.user u
WHERE $X{IN, u.id, PARAM_USER_IDS}
...


This configuration in defaut select all

selection mode: Multiseclect
selection style: Popup


Regards,
El Palacio

Offline

#3 2019-04-01 07:23:54

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

Re: Datasource parameter - how to set all values as default values?

No, I tried it before and now again and it doesn't work.
"This configuration in defaut select all" - it's not true here unfortunately.
When I use URL for Report Execution View with PARAM_GUID, the right report is opened, GUID is filled but PARAM_USER_IDS is null, so I get all values in report (as without WHERE $X{IN, u.id, PARAM_USER_IDS}.
Of course I can open "Parameters" tab, double click on PARAM_USER_IDS and then I can choose all right values for that GUID but the idea is how to get all values as selected automatically (as default)...

Offline

#4 2019-04-08 07:41:50

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

Re: Datasource parameter - how to set all values as default values?

Hi Patryx,

we are looking into this.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB