Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Solved! Go to Solution.
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.
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 @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
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 = "" },
//}
};
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
23 | |
3 | |
2 | |
2 | |
2 |