web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / passing Connection str...
Power Apps
Suggested Answer

passing Connection string as a parameter to Paginated Report (build in Power BI Report Builder )

(3) ShareShare
ReportReport
Posted on by 9
We have been using Paginated Reports in our Power APP model driven app.  We are rending them as Power BI Embedded and add menu items to show different reports from the Power BI Workspace. 
 
Any one that has a method of passing the connection string to the reports so the same report can run on data from different environment?
 
 
I have the same question (0)
  • Suggested answer
    sannavajjala87 Profile Picture
    728 Super User 2026 Season 1 on at
    Hi,
     
    For Paginated Reports, I would not try to pass the full connection string from the model-driven app at runtime. In most cases that is not supported/recommended, and it can create security and ALM issues.
    The cleaner pattern is to make the report use parameters, not dynamic connection strings.
    Recommended options:
    1. Use a report parameter for Environment / Org URL
    Pass something like EnvironmentName, OrgUrl, or Company/LegalEntity from the model-driven app to the paginated report, then use that parameter inside the report query or stored procedure to return the right data.
    1. Use separate data sources per environment
    Keep the same .rdl report, but bind it to the correct data source in each Power BI workspace/environment: Dev report workspace → Dev data source, Test workspace → Test data source, Prod workspace → Prod data source.
    1. Use Power BI deployment pipelines / parameter rules
    If you are moving reports across Dev/Test/Prod workspaces, use deployment pipeline rules or dataset/data source parameterization to change the connection details per stage.
    1. For Dataverse, use environment-specific workspace/report copies
     
    If the paginated report is querying Dataverse, I’d usually keep the same report definition but deploy it to environment-specific workspaces and configure the data source/credentials per workspace.
     
    From the model-driven app, you can pass report parameters in the embed URL, but I would avoid passing secrets or raw connection strings. The connection should be managed by Power BI service/data source credentials, not by the app menu item.
     
    So my preferred design would be:
    Dev model-driven app → Dev Power BI workspace/report → Dev data source
    Test model-driven app → Test Power BI workspace/report → Test data source
    Prod model-driven app → Prod Power BI workspace/report → Prod data source

     
    That keeps the report reusable while avoiding runtime connection-string handling.
  • Jon Magnusson Profile Picture
    9 on at

    Thanks, that makes sense.

    In our case, we are an ISV developing a product that must be deployed across multiple customer tenants and environments. Would you therefore recommend Option 1, using parameters such as the environment or organization URL, as the most suitable approach?

    Each customer will have their own Dataverse environment and Power BI workspace, so we need a deployment model that can be reused without manually redesigning the report for every customer.

    Do you know about a step-by-step guide or example showing how this could be implemented?

    We would particularly like to understand which parts can be automated as part of our ISV deployment package and which parts must be configured manually in each customer tenant.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard