#1 2019-06-10 08:49:28

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

Report Metadata - Using Metadata as Parameters

Hi,
Could you tell me how I should use report metadata as parameters?
I tried all possible combinations and it didn't work - metadata entries were unknown for query.
The documentation it is not clear in point https://reportserver.net/en/guides/admi … -Metadata/ (6.3.11)

What should I write in Report Metadata?
_RS_METADATA_MYPARAM - where MYPARAM is name, so I understand I have to save in Report Metadata tab: _RS_METADATA_guid with my value. Or maybe just _guid or guid?
Then how to use it in a query? ${_RS_METADATA_guid} or ${guid} or &{_guid} ?

Could you give me a simple example which should work?

P.S. I want to have a parameter to use in query which value I can set in each report variant so I wanted to use Report Metadata for that...Any other idea?

Last edited by Patryx (2019-06-12 10:09:24)

Offline

#2 2019-06-12 14:07:55

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

Re: Report Metadata - Using Metadata as Parameters

Hi Patryx,

this should work:
select ${_RS_METADATA_myMetadataKey} as abc, *  from mytable

You should see the myMetadataKey values if you previously define a metadata with name: "myMetadataKey".
The "execute" button in the query is not working in this case, I raised ticket RS-3505 for this. But other than this, this seems to work.

What exactly doesn't work in your case? Please post some screenshots.

Regards,
Eduardo

Offline

#3 2019-06-12 14:29:39

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

Re: Report Metadata - Using Metadata as Parameters

Hi Eduardo,
I tested your example and you are right, button Execute of query doesn't work, but when I execute report in Report Execution View it works and read the variable.

BUT the problem is with Metadata Datsource when I test it in Metadata Datasource Query and there unfortunately it doesn't work at all.
I mean even in Report Execution View nor by button Execute for query.

When I try to execute a report I get "Cannot find property _RS_METADATA_test" in window.
Could you check it if you have the same error?

Offline

#4 2019-06-13 08:50:30

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

Re: Report Metadata - Using Metadata as Parameters

Hi Patryx,

you are right, I see the error too. I raised RS-3506 for this.

Regards,
Eduardo

Offline

#5 2019-06-13 09:03:53

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

Re: Report Metadata - Using Metadata as Parameters

Hi Eduardo,
Thanks, I look forward to new version 3.0.8 of ReportServer smile

Offline

#6 2019-06-13 10:34:21

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

Re: Report Metadata - Using Metadata as Parameters

Hi Patryx,

RS-3506 is fixed smile

Regards,
Eduardo

Offline

#7 2019-06-13 12:20:59

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

Re: Report Metadata - Using Metadata as Parameters

Hi Patryx,

the "execute" buttons are working now when you include report metadata in their query.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB