0

I need to export a pbi report into pdf with slicer filters. 

I have created an ExportReportRequest object and passed to await Client.Reports.ExportToFileInGroupAsync(GroupId,ReportId, exportRequest);


var exportRequest = new ExportReportRequest

                {
                    Format = Format.PDF,
                    PowerBIReportConfiguration = new PowerBIReportExportConfiguration(){
                        Pages = new List<ExportReportPage>()
                            {  new ExportReportPage(){
                                PageName = "_pageName_" ,
                            }},
                        ReportLevelFilters = "Key/Owner eq 'Pantheon'"
                    }
                };

I don't getting any errors or exceptions on further steps. What I getting is only the page without applied slicers. what i want is the page with applied slicers. (Table, Field and Values are valid).  Did I miss anything to add ? please let me know.

1 Answers1

0

Exported the Report to pdf in a React application with filters applied. Filters are applied to my exported report. Here is my JSON body passed during request

{
        format: 'PDF',
        powerBIReportConfiguration: {
            pages: [{pageName: 'ReportSection3'}],
            reportLevelFilters: [{
                filter: "Store/Territory eq 'NC'"
            }]
        }
    }

Not sure why filters are not applied if it's not throwing error. Recheck once. If not able to figure out, A workaround is to Apply the filters and capture it in a bookmark state and pass the bookmarkstate in powerBIReportConfiguration

Kotana Sai
  • 1,207
  • 3
  • 9
  • 20