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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
simplyamitshah
New Member

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
simplyamitshah
New Member

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
simplyamitshah
New Member

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 @simplyamitshah,

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

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.