Forum Discussion
RDLC Power BI report export using Power BI API - export with filter fails
- Anonymous4 years ago
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.
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
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 = "" },
//}
};