Forum Discussion

WhyComplex's avatar
WhyComplex
Frequent Visitor
2 years ago

Help: Custom Visual - Download API working in powerbi services but not working in the embedded link

Hi,

 

After developping a cutom visual, I can make the download API call works successfully:

the URL is https://app.powerbi.com/groups/me/dashboards/XXXXXXXX

See below:

 

When, I want to use the embedded link:

https://app.powerbi.com/reportEmbed?reportId=XXXXXXXXX

 

The download API is not triggered. Is there any way to make it work or in a near future any update is planned?

I guess this may be coming from a "sandbox" of the "sandbox" (especially iframe)...

 

Thanks,

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi WhyComplex ,

    I think firstly if you can capture the URL of the download report request, you could create a button via script that initiates the download. You can read this topic: Solved: Need to download the Embedded Power BI report from... - Microsoft Fabric Community

    Another alternative is to upload the report file to cloud storage and save the download link in the report as a URL. Then, create a button in your Power BI report that links to this download address.

     

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • WhyComplex's avatar
      WhyComplex
      Frequent Visitor

      Hi @v-yilong-msft ,

       

      I saw that suggestion.

       

      However, I am pulling data from SQL and there is no existing excel file, I want to avoid having files sitting in sharepoint or onedrive.

       

      This is the reason why I am using the download API. It allows me to get my my data through the variable options.dataViews[0] (Custom visual capability) and send it straight into the API for download.

       

      In addition, the API allows me to take advantage of filters and push only the selected data whereas in your solution it is the whole backend that is being downloaded.

       

      So is microsoft planning to open the API in the embedded link of the report (URL structure https://app.powerbi.com/reportEmbed?reportId=XXXXXXXXX) ? 

       

      Best regards,

       

      Marc