Quantcast
Channel: Service topics
Viewing all articles
Browse latest Browse all 61866

PowerBI Rest API unable to export PDF with Correct Bookmark

$
0
0

I'm unable to export a report with correct bookmarks when using the Rest API. I am able to get the report, but the correct filters are not set. I have been able to test my parameters using the "Power Automate" service, and I am able to obtain the report with the correct filters/bookmarks from that service. 

 

 

 

 

private async Task<string> PostExportRequest( Guid reportId, Guid workspaceId, FileFormat format, IList<string> pageNames, PageBookmark bookmark) { string pageName = pageNames[0]; try { var pbiReport = await pbiClient.Reports.GetReportInGroupAsync(workspaceId, reportId); var powerBIReportExportConfiguration = new PowerBIReportExportConfiguration { Settings = new ExportReportSettings { Locale = "en-us", }, DefaultBookmark = new PageBookmark(bookmark.State), Pages = new List<ExportReportPage>() { new ExportReportPage(pageName)}, Identities = new List<EffectiveIdentity> { new EffectiveIdentity(username: SPN_ObjectId, datasets: new List<string> { pbiReport.DatasetId }) }, }; var exportRequest = new ExportReportRequest { Format = format, PowerBIReportConfiguration = powerBIReportExportConfiguration }; var export = await pbiClient.Reports.ExportToFileInGroupAsync(workspaceId, reportId, exportRequest); return export.Id; } catch (HttpOperationException ex) { _telemetryClient.TrackException(ex); throw ex; }

 

 

 

 


Viewing all articles
Browse latest Browse all 61866

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>