cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
garethwhite
New Member

No option to choose a new database if DB not found when opening poweerbi file on different PC

I emailed my power bi file to my boss and he opened it up.

 

On my PC my DB connection to SQL server is localhost withj no instance with a DB name of clientname_v2

On my bosses PC his database connection is localhost\instance with a DB name of clientname

 

When he opens the file he can choose a username and password but has no way of changing the server and/or database name until he can connect to the datasource I use.

 

I can fix it by using my pcname and then he can open it.

 

But.. this wont work when I send the file to a customer unless I have the sam SQL Server and instance name.

 

 

 

5 REPLIES 5
PavelR Solution Supplier
Solution Supplier

Re: No option to choose a new database if DB not found when opening poweerbi file on different PC

@garethwhite

use parameters to connect to you SQL. Then everyone could type his server or DB. Or you could define list of possible values for connection, and user only choose.

 

Regards.

Pavel

garethwhite
New Member

Re: No option to choose a new database if DB not found when opening poweerbi file on different PC

What is happenign is that power bi gets stuck. The only option it gives me on the screen is to enter a username and password but its to an instalnce and database that dont exist on a different location. If you press excape or close the window the same window comes up in a modal fashion. You cant even exit power bi without using task manager.

 

We have been using the File > Options> Data source settings to switch between databases which is working well. But when you first open up a power bi file it tries to connect to the last used sqlserver\instance and DB name with no option to cancel or change it.

 

We are using direct sql connections and wont be using the cloud for any of our power bi stuff for reasons including local data protection laws, commercial reasons and the need for this practice to be accepted by each and every client who has been using our apps.

 

How would we go about using parameters in this manor, what would be the benefit of doing so and how would it resolve this bug in power bi?

PavelR Solution Supplier
Solution Supplier

Re: No option to choose a new database if DB not found when opening poweerbi file on different PC

@garethwhite If I get it right, then this should help you.

 

Regards.

Pavel

Highlighted
garethwhite
New Member

Re: No option to choose a new database if DB not found when opening poweerbi file on different PC

After that was written they came up with this which is the method we are using to change databases without using the parameters work around:

https://workingondata.wordpress.com/2016/07/05/power-bi-change-of-data-source-settings-got-easier/

ButI think there is a big design flaw, unless I am missing somethign obvious. When it pops up with the enter username and password for the database box there shoudl be options to specify server\instance & database but there is not.

Moderator v-yuezhe-msft
Moderator

Re: No option to choose a new database if DB not found when opening poweerbi file on different PC

Hi @garethwhite,

Create servername parameter and database parameter in your current Power BI Desktop file, then create a Power BI Report template. This way, users can use it to instantiate new Power BI Reports on their machine by choosing their server and database. For more details about Power BI template, please review the following blog and similar thread.

https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/
https://community.powerbi.com/t5/Desktop/How-to-create-a-template-with-a-different-data-source-every...

Thanks,
Lydia Zhang

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

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors