You are not logged in.
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
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
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
Hi Patryx,
you are right, I see the error too. I raised RS-3506 for this.
Regards,
Eduardo
Offline
Hi Eduardo,
Thanks, I look forward to new version 3.0.8 of ReportServer
Offline
Hi Patryx,
RS-3506 is fixed
Regards,
Eduardo
Offline
Hi Patryx,
the "execute" buttons are working now when you include report metadata in their query.
Regards,
Eduardo
Offline
Hi,
To continue this topic, we noticed that ${_RS_METADATA_SUPER_myMetadataKey} didn't work at all.
I created report and added metadata 'myMetadataKey' with value 'test report'). Then I created variant of this report and added there metadata 'myMetadataKey' with value 'test variant'.
Unfortunately I see only 'test report' in both case: when I execute report and variant...Could you check it? It seems that it can't see the overwritten metadata in variant.
What's interesting if I delete from report metadata key 'myMetadataKey' and I have in variant metadata 'myMetadataKey' with value 'test report' and use parameter as ${_RS_METADATA_myMetadataKey}, it works for executing variant report (error for execute base report).
Please tell me how to resolve it
Last edited by Patryx (2019-07-17 07:45:57)
Offline
Hi Patryx,
if you use ${_RS_METADATA_SUPER_myMetadataKey}, you will see in both cases the "SUPER"-value. In the variant case, you will see the report value. In the report case, the same (there is no parent of a report). So this is the correct behavior. If you want to see different values use the normal ${_RS_METADATA_myMetadataKey}. In the variant case you will see the variant value, in the report case you will see the report value.
Regards,
Eduardo
Offline
Hi Patryx,
ReportServer 3.0.8 is now available for download. RS-3506 is fixed in this version.
Regards,
Eduardo
Offline
Hi Eduardo,
This still doesn't work ${_RS_METADATA_SUPER_myMetadataKey} if I name a key in variant as "myMetadataKey" and try to execute query from administration.
Last edited by Patryx (2019-08-01 06:42:24)
Offline
Hi Patryx,
did you read this? https://forum.reportserver.net/viewtopi … 6107#p6107
If this does not apply, please elaborate with screenshots, etc.
Regards,
Eduardo
Offline
Sorry, you're right. It seems to be OK.
Offline