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
You might need to deploy and overwrite the report instead of refresh on Report Server. My test:
1. Create table column with value 1, deploy or save report to Report Server
2. Deleted all records in the source table, enter value 5
3. Save and overwrite the report on Report Server.
4. Download and export shows value 5.
Paul
- Anonymous5 years agoNot applicable
Anonymous
Thank you for you response but I'm not sure I understand what you are doing. I assume that between step 2 and 3 you refreshed the report in Desktop? If it's the case, I can confirm that this indeed work but it is not what I'm looking for. The only other thing I can think of is if this was an "Enter Data" table but having the data embedded in the report would not be an appropriate example, I see that I wasn't clear in my initial post but I was talking about an actual database table (anything external would work, SQL Server, Oracle, Excel, csv, etc.), I will edit it so that it's clearer.
Keep in mind that my end goal is to automate the process and as far as I know I cannot automate a refresh in Desktop. Actually it seems like the only thing I cannot automate, everything else (Refreshing on server, downloading a report, uploading a report, overwriting a report) can be done with powershell and/or the REST API.
Thanks!