gbrueckl / PowerBI-VSCode

A VSCode extension to manage your PowerBI tenant using the Power BI REST API
MIT License
58 stars 12 forks source link

rebind report #39

Open TarekSalha opened 6 days ago

TarekSalha commented 6 days ago

Hi Gerhardt, I have been testing the possibility to copy reports from one workspace to another (e.g. from DEV to PROD). The correct way to accomplish this would imho be to update the content of the report in the target workspace (PROD) with the report in the source eworkspace (DEV) and afterwards rebind the target report to the PROD dataset.

I am not sure about the actual error, but when performing these actions, I am being presented just with a subset of all possible datasets and reports.

Here are two examples: I wanted to update the content of a report and it did not find the correct source report, though, I have access to it. Instead, it found a selection of others. Also, after selecting a report, the tool is aking me about the source workspace, but this should be already clear from the first selection. What is this input form about?

Also, I wanted to rebind the target report. Typically, Datasets have same names in DEV and PROD, but when starting the process, I have been presented only one of the datasets, namely the prod one. Is there a problem, if more than one dataset has the same name?

Regards, Tarek

gbrueckl commented 3 days ago

to copy a report from one workspace to another I would recommend to use the Clone Report API

after selecting [Clone] form the source reports context menu, you can choose a new name, a new target dataset [optional] (the PROD dataset in your scenario) and a new target workspace (the PROD workspace in your scenario)

this will copy/clone the report to the PROD workspace and rebind it to the PROD dataset

if your report already exists in PROD, you can simply use the Update Content API to get visual changes from DEV to PROD there is no need to REBIND the report anymore

There are some known issues with the way how you can select e.g. target workspace or target dataset in the VSCode UI which is quite limited - e.g. only displays the last 10 visited/rendered items in the dropdown, etc. To work around those limitations i have also implemented a drag & drop functionality. So to accomplish the above you can simply drag your DEV report to your

let me know if that works for you