Forum Discussion
Power BI Export to file Error
Good news:
If you don't specify the pages there, it'll print the full report every time.
It also seems to default to "en-us" as the locale if you don't specify.
It actually needs very minimal configuration
Just giving it a format in the export request is enough for the configto be done and complete.
can you provide a code snippet of this part so that I can see?
var powerBIReportExportConfiguration = new PowerBIReportExportConfiguration
{
Settings = new ExportReportSettings
{
Locale = "en-us",
},
Pages = pageNames?.Select(pn => new ExportReportPage(pageName = pn.ToString())).ToList(),
};
var exportRequest = new ExportReportRequest
{
Format = fileFormat,
PowerBIReportConfiguration = powerBIReportExportConfiguration,
};
- Anonymous6 years agoNot applicable
var fileFormat = FileFormat.PDF
var exportRequest = new ExportReportRequest
{
Format = fileFormat
};here you go. this should work
- Anonymous6 years agoNot applicable
So I figure out my issue. I was trying to export as .PNG. When I did .PDF it works just fine. Apparently there is a setting that need to be set in the admin portal for .PNG but I can't find it. Does anyone have any luck enabling .PNG?
- Anonymous4 years agoNot applicable
Thanks, changing the export file format to .PDF resolved this issue for me as well!