Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DJBadinN
Regular Visitor

How do I pass Paginated Report Parameters using PowerBI-JavaScript powerbi-client?

1. How do I pass Paginated Report Parameters using PowerBI-JavaScript powerbi-client?

I have Paginated Reports from SSRS. I opened the .rdl in Power BI Report Builder and Published to the Power BI Service. The reports use Direct Queries and have Parameters.

In the Power Bi Playground, I can use the URL Parameter rp, "&rp:Company=ABC", to pass parameter values to the Report.

Using PowerBI-JavaScript, if add the URL Parameter in the config embedURL, "&rp:Company=ABC", it does not work.

 

I have looked at Filters but I understand this is different from Parameters where Parameters limit the data returned from the Data Source where Filters work on the Data returned from the Data Source which can be inefficient with a large amount of data.


2. Where can I find documentation on the life cycle flow I should expect to see?

Using Fiddler, I see a bunch off calls to wabi-us-east-a-primary-redirect.analysis.windows.net with an origin of https://app.powerbi.com/.

 

Upgrading did not help:
- Microsoft.PowerBI.API 3.21.0 to 3.23.0
- PowerBI-JavaScript 2.16.5 to 2.18.0

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Hi @DJBadinN ,

Sorry I didn’t find a official document or blog for your question. Please check the link below, hope they can help you and give you some clues or ideas.

Passing the configured parameter using the embed token

Filters (Parameters) for RDL (Paginated) report in PowerBI-JavaScript API

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I am using dataset parameters, not dataset filters so the second link, Filters (Parameters) for RDL (Paginated) report in PowerBI-JavaScript API, will not work.  In my scope, Filters are not acceptable due to performance issues as discussed Data retrieval guidance for paginated reports - Power BI | Microsoft Docs

 

The first link, Passing the configured parameter using the embed token, is a horribly convoluted and limited in scope hack.  I did get it to work however:

  • Testing does not work with
    • Power BI Report Builder
    • Power BI App Service
  • Since it is not baked in, the workaround is not self documenting
  • There is a Built-in Field for the Report, UserID (User!UserID)
    • The Token Identity username maps to this Built-in Field
  • If you need the actual Report UserID you cannot use this hack
  • Does Not work if there are Multiple dataset Parameters
    • Could pass a mult-value string in Identity username
      • Parse UserID on Report side
    • Doubtfully use other Identity Properties but are they mapped to Report Built-in Fields?
      • datasets
      • roles
      • customData
      • identityBlob
      • reports
  • This is not an acceptable solution

Hi, I am also having this issue, have you came up with a solution? 

Thanks!

Anonymous
Not applicable

Hi DJBadinN,

 

I managed to embed a simple paginated report using embedded dataset, but for POC I would need to pass some filters as well as I need to explore the capabilities of applying RLS. I defined a Built-In-Field UserID as filter (at this point I am not concerned about performance, and eventually can rework this as parameter).

 

Can you please help with hacking the call to GenerateTokenRequest API? Per MS documents, this is how the body is supposed to look like:

 

danilche_0-1624008437118.png

 

I came up with this using C# sample:

 

danilche_1-1624008861348.png

 

However, EffectiveIdentity method does not have a parameter 'reports' so I am guessing it shouldn't be used at all?

 

I am picking up C# on the spot hence struggling with coming up with a custom solution, and any suggestion/hint would be greatly appreciated!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.