Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
I have a paginated report that uses a SQL query to ensure that there aren't any issues. On this report, there is an image with an action to navigate to the actual informational report. I have to set a date parameter in the Check report and I'd like to use this to pass to the informational report.
I can get the URL to work without issue. I can hardcode the date, but I can't seem to pass the Parameter from the check report to the informational report.
Solved! Go to Solution.
So in your first link you are explicitly getting Value(0) which will only get you the first ContractType. The syntax for passing multi-valued parameters is documented in the links I posted last time, but it is a bit strange. If you wanted to pass a value of 1 and 2 for the Contract type you have to repeat the parameter name each time.
eg. &rp:ContractType=1&rp:ContractType=2
Luckily the join() function takes a string as the second parameter so you should be able to do this with an expression like the following.
"&rp:ContractType=" & Join(Parameters!ContractType.Value, "&rp:ContractType=")
I'm running the latest version of Power BI Report Builder and I cannot reproduce this error.
What is the expression you are trying to put in for the URL?
It happens with the first one that I had working:
="https://app.powerbi.com/groups/7140ff44-3b3d-4dec-b4b7-97da17e3eade/rdlreports/3cd2ddb3-4f5a-42d3-ad..." Parameters!DepartureDate.Value
and this one:
="https://app.powerbi.com/groups/7140ff44-3b3d-4dec-b4b7-97da17e3eade/rdlreports/da567ec9-1cd5-4d7e-bc..." &Parameters!StartDate.Value & "&EndDate=" & Parameters!EndDate.Value & "&ContractType=" & Parameters!ContractType.Value(0)
oh so those are urls for the Power BI Service. This forum is dedicated to Power BI Report Server which is the on-premise product and the url syntax is slightly different between the two reports
This is the documentation for the service url parameter syntax
https://docs.microsoft.com/en-us/power-bi/paginated-reports/report-builder-url-pass-parameters
And you could possibly even use the generate link feature mentioned here and then just replace parts of the url with the parameters from your parent report.
https://powerbi.microsoft.com/en-us/blog/url-parameters-for-paginated-reports-are-now-available/
Morning,
I'm hoping you may be able to help once more. I've employed your suggested method for passing several parameters from one paginated report to another and everything seems to be working quite well except for the ContractType parameters.
Essentially, the ContractType parameter can have three different contract types:
This is the current config on the hyperlink:
="https://app.powerbi.com/groups/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/rdlreports/xxxxxxxx-xxxx-xxxx-xx..." & Parameters!StartDate.Value & "&rp:EndDate=" & Parameters!EndDate.Value & "&rp:ContractType=" & Parameters!ContractType.Value(0) & "&rp:ContractType=" & Parameters!ContractType.Value(0) & "&rp:ContractType=" & Parameters!ContractType.Value(0)
The current issue is that the report that opens only gets one of the ContractType IDs passed regardless of how many I have selected in the Parameter from the screenshot above. I've played with this as well:
"&rp:ContractType=" & Join(Parameters!ContractType.Value, "|") which passes all three IDs, but not as one parameter instead of separate.
Any idea or is what I'm trying to accomplish not possible?
So in your first link you are explicitly getting Value(0) which will only get you the first ContractType. The syntax for passing multi-valued parameters is documented in the links I posted last time, but it is a bit strange. If you wanted to pass a value of 1 and 2 for the Contract type you have to repeat the parameter name each time.
eg. &rp:ContractType=1&rp:ContractType=2
Luckily the join() function takes a string as the second parameter so you should be able to do this with an expression like the following.
"&rp:ContractType=" & Join(Parameters!ContractType.Value, "&rp:ContractType=")
I realized that it was ReportServer after I'd submitted. There is no forum specific to Report Builder as far as I could tell?
Yes, those links are semi-useless when trying to pass multiple parameters via URL.
Thanks for your help.
@Anonymous wrote:
Yes, those links are semi-useless when trying to pass multiple parameters via URL.
The second example on the first link shows how to pass multiple parameters
Sorry, you're correct, but the parameters are hardcoded in that example as opposed to using the report parameters of the first report to pass to the second report.
Following June's Power BI Report Builder update, I can't even get an existing URL link to work in my actions.
Hi @Anonymous ,
I haven't studied this before. Let me have a try and I'll get back once I get some results.😊
And here are some reference about pass data from Power BI reports to Paginated reports you can research firstly:
Passing Date Range slicer to Paginated report - Microsoft Power BI Community;
Paginated Report and power bi desktop reports inte... - Microsoft Power BI Community.
Best Regards,
Icey
Okay, so my colleague figured a single date parameter out:
following the link, ?rp:DepartureDate=" & Parameters!DepartureDate.Value
But I now need to pass three parameters, StartDate, EndDate, and ContractType. One of the links you provided had someone respond that they're able to pass the start and end dates but didn't provide any context around it. The others are bi to paginated or only one variable, not paginated to paginated with more than one.
@Anonymous wrote:
But I now need to pass three parameters, StartDate, EndDate, and ContractType.
Typically to pass parameters to another report I use the technique outlined here https://docs.microsoft.com/en-us/sql/reporting-services/pass-a-report-parameter-within-a-url?view=sql-server-ver15
So the expression for the link would be something like:
"http://<your server>/reportserver?<path to report>&StartDate=" & Parameters!StartDate.Value & "&EndDate=" & Parameters!.EndDate.Value & "&ContractType=" &Parameters!ContractType.Value
Which would generate a url something like the following
Where I am running a report called "test report" in a folder called "test folder" (so the spaces are replaced with + characters) and I'm passing 2021-05-01 to StartDate and 2021-05-31 to EndDate and 1 to ContractType (note: personally I always use ISO8601 format for dates yyyy-mm-dd as it's unambiguous)
Thank you for providing that solution, unfortunately, it seems there may be a bug with the latest release of report builder. No matter what I enter for the Action expression, I receive the following:
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.