2

I have created a power bi report in Power BI Desktop using a stored procedure having parameters From Date, To Date, CategoryId, DepartmentId. I have uploaded the report to Power BI Report Server. Now I am trying to embed the report in my MVC application using "iframe", but I don't know how to pass parameters to report at run time from the application.

Can anyone help me?

And Is there any other option other than using "iframe" for embedding the report to my MVC Application and passing parameters. ?

Thanks & Regards

1 Answers1

-1

You must pass the filters in the URL, like this:

https://yourserver/Reports/xxx?rs:Embed=true&filter=MyBaseTable/CategoryId eq 2 and MyBaseTable/DepartmentId eq 3 and MyBaseTable/DateField ge 2019-01-01 and MyBaseTable/DateField le 2019-01-31

For more information, you can see Filter a report using query string parameters in the URL.

Andrey Nikolov
  • 12,967
  • 3
  • 20
  • 32
  • Thanks for your response. But I already know this concern. Currently, I don't know the table name and field name. I just try to get the report details from reporting server using rest API, but I didn't get the parameters from it. Is there any way to set parameter value as we set in SSRS report (UI to enter parameter values) or get parameters from API? – Mohammed Fazil Jan 18 '19 at 04:39
  • I'm not sure for Power BI Report Server. For Power BI Service you can use [Get Parameters](https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/getparameters) and [Get Parameters In Group](https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/getparametersingroup) to get information about parameters, and [Update Parameters](https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/updateparameters) and [Update Parameters In Group](https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/updateparametersingroup) to update their values. – Andrey Nikolov Jan 18 '19 at 06:44