Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

RDLC Power BI report export using Power BI API - export with filter fails

SSRS RDLC report is uploaded to Pwoer BI. I am trying to export the report using Power BI API. Without any paginatedreportconfiguration, it works fine, successfully exports in XLSX format whole report.

If I specify any filters like below then Polling method shows status as failed. Unable to get exact exception.

var exportId = await PostExportRequest(reportId, groupId, format, pageNames, urlFilter);
if (exportId != "-1")
{
do
{
var httpMessage = await PollExportRequest(reportId, groupId, exportId, pollingtimeOutInMinutes, token);
export = httpMessage.Body;

------------------------------------

//Filter configuration

using var PaginatedReportConfiguration = new PaginatedReportExportConfiguration()
{
FormatSettings = formatsettings,
ParameterValues = new ParameterValue[] {
 new ParameterValue { Name = "SAPCompanyCode", Value = "1001"}
}
};

 

RDLC report DataSet properties -> Parameters shows ParameterName and ParameterValue with exact name -

SAPCompanySAPCompanyCode

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Problem resolved after passing correct values. In RDLC report data source is Tabular cube s the values should be in exact format of cube columns not just string.

For example - 

new ParameterValue { Name = "SAPCompanySAPCompanyCode", Value = "[SAP Company].[SAP Company Code].&[1010]"},

new ParameterValue { Name = "StandardAccountClass", Value = "[Account].[Sub Class].&[Total stockholders' equity]"},

 

Trick was to open the Power BI report in browser and checked the network traces after applying filter. Traces will show /render POST call and body will have all parameters values. thanks to PowerBI API team who helped me in troubleshooting the issue. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Problem resolved after passing correct values. In RDLC report data source is Tabular cube s the values should be in exact format of cube columns not just string.

For example - 

new ParameterValue { Name = "SAPCompanySAPCompanyCode", Value = "[SAP Company].[SAP Company Code].&[1010]"},

new ParameterValue { Name = "StandardAccountClass", Value = "[Account].[Sub Class].&[Total stockholders' equity]"},

 

Trick was to open the Power BI report in browser and checked the network traces after applying filter. Traces will show /render POST call and body will have all parameters values. thanks to PowerBI API team who helped me in troubleshooting the issue. 

Anonymous
Not applicable

Hi @Anonymous,

Did this parameter defined in your paginated report correctly? I'd like to suggest you double check these part settings to confirm if they can be invoked in the rest API:

Create parameters for paginated reports in the Power BI service - Power BI | Microsoft Docs

BTW, can you please share some more detail about your scenario? (e.g. report data source, connection, parameters settings...) They will help us clarify your scenario and test to troubleshoot:

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

simplyamitshah_0-1658122263864.png

Below are the parameters. I checked all the parameters and passed parameters which are not having any default values means it will expect value from parameter query. Below is the latest code. Not passing FormatSettings and Identities. 

var PaginatedReportConfiguration = new PaginatedReportExportConfiguration()
{
//FormatSettings = formatsettings,
//ParameterValues = parameterValues
ParameterValues = new ParameterValue[] {
new ParameterValue { Name = "SAPCompanySAPCompanyCode", Value = "1001"},
new ParameterValue { Name = "Month", Value = "March, 2022"},
new ParameterValue { Name = "CurrencyTypeCurrencyType", Value = "Statutory"},
new ParameterValue { Name = "QOQMonth", Value = "March, 2022"},
new ParameterValue { Name = "YOYMonth", Value = "March, 2022"},
new ParameterValue { Name = "SelectedMonth", Value = "March, 2022"},
new ParameterValue { Name = "StandardAccountClass", Value = "Expenses"},
new ParameterValue { Name = "StandardAccountSubClass", Value = "Billed Revenue"},
new ParameterValue { Name = "StandardAccountLineItem", Value = "Accounts payable"},
new ParameterValue { Name = "StandardAccountLineItemDetail", Value = "Accounts payable"}

}

 

var exportRequest = new ExportReportRequest
{
Format = FileFormat.XLSX,
//PowerBIReportConfiguration = powerBIReportExportConfiguration//,
PaginatedReportConfiguration = PaginatedReportConfiguration
};
//,
//Identities = new List<EffectiveIdentity> {
// new EffectiveIdentity { Username = "" },
//}
};

simplyamitshah_1-1658122307112.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.