Forum Discussion
Exporting a report with latest data with powershell
- 5 years ago
As I know, this way is not possible. Because after upload pbix to server, is saved to DB as CatalogItem, and splited to DataModel and ReportDefinition. For Reporting is used only DataModel (whis is loaded to SSAS) and ReportDefinition for client layout.
When refreshing data, only DataModel is updated.
CatalogItem never to be updated on server side, and therefore, when you downloading pbix back from server, is still same as you uploaded.
To meet your requirements I do not know tested solution, but probably there are more ways (but no any simple). E.g. two options in my think
-you can rebuild model to dedicated model in SSAS (which bring additional benefits as incremental update), but you can replicate SSAS DB to another site (there more way how replicate), but transfered will be only compressed model.
-or can replicate SQL DB with ReportServerDB to secondary replica in another site, only compressed model will be transfered
-and additional one, but barbarian, you can try move only selected rows from CatalogItemExtendedContent table using SSIS, but I never tested it ..
Anonymous
I am not sure is that only happens when using power shell, did you try just download the pbix or edit in Desktop.
Paul Zheng _ Community Support Team
- Anonymous5 years agoNot applicable
Hello Anonymous,
Yes this also happens using the UI.
1) Created and deployed the report with values 1,2 in the tables
2) Deleted all records in the table, added value 5
3) Refresh report on Report Server (value 5 is now displayed in report server)
4) Both downloading or editing the report display value 1,2.
I've now tried the following methods to access the report, all of them got me the initial uploaded report and not the one with the latest data.
1) Downloading the report from Report Server
2) Edit in Power BI from Report Server
3) Open from Report server in PBI Desktop
4) Out-RsRestCatalogItem from powershell
5) /PowerBIReports({Id})/Content/$value from REST API
If there was a way to programmatically call a refresh from a pbix file I could still work with this limitation, but as far a know it's not possible (without resorting to mouse macros and such).
Thanks!