Forum Discussion

alexandersid's avatar
alexandersid
New Member
6 years ago

Export paginated report with multiple parameters

Hi all! 

Currently I'm trying to export reports via REST API. Due to current limitations in API and need to export reports in multiple various states (after applying filters) it was decided to opt for Paginated reports as they allow using parameters in request body. It worked fine with single parameter like this:

{

format: 'PDF',

paginatedReportConfiguration: {

parameterValues: [

{ name: 'status', value: 'Completed'}

]

}

}

However, this didn;t work with several parameters like the following:
{

format: 'PDF',

paginatedReportConfiguration: {

parameterValues: [

{ name: 'status', value: 'Completed'},

{ name: 'month', value: '2'},

{ name: 'year', value: '2020'}

]

}

}

Could someone with more experience in Power Bi API to clarify the reason I'm getting an error and point to possible solution?

(note that each request body from above was sent to its own report, first to report with single parameter, second to report with multiple parameters)

The error shown in console:

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, 

    The parameter Name in the body should be the exact parameter name and not the prompt name.

     

    This body worked out for me:

     

    {
    "format" : "csv",paginatedReportConfiguration :
    {
    "parameterValues":
    [
    {"name": "ScenarioName","Value": "2020 (5+7)"},
    {"name": "DimEntityEntityCode","Value": "210"}

    ]
    }
    }

     

    Could you let me know if it worked out for you..