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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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 Specialist
Solution Specialist

@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

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?

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

 

Regards.

Pavel

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.

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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