Forum Discussion
Programmatically Create new Report, New Dataset, change Data Source from a template report
Hi, how are u?
You should use GATEWAY:
It serves as a pathway between your on-premises data and your cloud-based apps. A gateway is secure and encrypted, so you know your data is safe as it travels. It requires correct authentication in order to access the data, so it will only open for registered users.
A gateway does not actually transfer data, which means it stays on your server even as clients access it. It simply provides a connection point to the cloud. A gateway allows users to access the data for the purposes of making reports or dashboards.
The gateway also allows you to refresh your reports with current data regularly. It’s free to install and relatively simple to configure.
And here's about to install it in your computer:
You’ll want to ensure you are physically connected to the internet because many analysts have noticed lagging from their gateway when using a wireless connection.
It can be tricky to convert from personal mode to standard mode on a device, so think carefully about which one you will need for the long term. Standard mode comes highly recommended and can generally suit your needs the best.
To install:
- From your Power BI Workspace, click the download arrow in the top right and choose “Download Gateway”
- A download page will open: click “Download Gateway” again
- Click “next” to enter the installer
- Choose the mode you prefer
- Confirm terms and conditions
- Sign in to your Power BI account
- Register the Gateway with your computer
- Choose a name and a recovery key for your gateway
Once your gateway is installed and registered, you are ready to put it to use. You’ll need to connect the data sources you want to the gateway.
To add a data source to your gateway, you’ll first need to get the file path for an on-premises file.
- Open a .pbix in Power BI Desktop
- Click edit queries
- Click data source settings
- Choose the data source you want front the list and click change source
- Copy the file path from the box that opens
Once you have the file path copied, open Power Bi Service online and go to Settings.
- Click manage gateways and choose the gateway you want to connect
- Click add data source
- Copy your file path into the box and enter the other information
- Click add: you should get a confirmation that the connection was successful
Regards from Brazil!
- asadhkhan4 years agoFrequent Visitor
Thank you Henrique. But my source us not from on-prem, my source comes from Azure SQL.
Each user has a copy of their own table so when a user makes a copy of the report we want to be able to change the source and create a new dataset based on the original model but want to do this via API.
We want to avoid touching the pbix. File.