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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Lakshmanan1
Frequent Visitor

Passing parameters through asp.net form framework to paginated report not working

1. I am attempting to integrate a Power BI Paginated report into an ASP.NET webForms application (using the .NET Framework).

2. I am working on sending values as input parameters to load the paginated report.

The main problem is that the parameters are not being passed to the report, and it is not loading.

Issues:

1. Uncaught Error: There was an attempt to embed a component of type: paginated, but no corresponding component was found. Please confirm that the specified type is correct.

2. The parameters are either not being passed to the paginated report or the report is not loading with the selected filter values.

 

Below are the  code snippet used. 

<script src="https://cdn.jsdelivr.net/npm/powerbi-client@2.19.0/dist/powerbi.js"></script>

<script>


var embedUrl = '<%= EmbedUrl %>';
var embedToken = '<%= EmbedToken %>';
var reportId = '<%= ReportId %>';

// Your selected parameters
var empId = '<%= EMP_ID %>';
var empchildId = '<%= EMP_CHILD_ID %>';
var leadId = '<%= LEAD_ID %>';
var startDate = '<%= START_DATE %>';
var endDate = '<%= END_DATE %>';

function embedPaginatedReport() {
if (!embedUrl || !embedToken || !reportId) return;

var models = window['powerbi-client'].models;
var config = {
type: 'paginated', // <-- This is critical for paginated reports
tokenType: models.TokenType.Embed,
accessToken: embedToken,
embedUrl: embedUrl,
id: reportId,
permissions: models.Permissions.All,
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: true
},
parameters: [
{ name: "EMP_ID", value: empId },
{ name: "EMP_CHILD_ID ", value: null },
{ name: "LEAD_ID ", value: leadId },
{ name: "START_DATE", value: startDate },
{ name: "END_DATE", value: endDate }
]
};

var reportContainer = document.getElementById('powerBIReportContainer');
powerbi.reset(reportContainer);
powerbi.embed(reportContainer, config);
}

document.addEventListener("DOMContentLoaded", embedPaginatedReport);
window.onload = embedPaginatedReport;

//window.onload = function () {
// embedPowerBIReport();
//};
</script>

1 ACCEPTED SOLUTION
Lakshmanan1
Frequent Visitor

Hi, I achieved it by passing the paramters through embed URL 

Eg: 

 // Base embed URL for paginated report
    const baseEmbedUrl = `https://app.powerbi.com/reportEmbed?reportId=${reportId}&groupId=${groupId}`;
    
    // Add parameters (rp: prefix for paginated report params)
    const parameters = '&rp:fromsk=20&rp:area=A';

    this.embedConfig = {
      type: 'report', //  Still use 'report' for paginated reports in older SDKs
      isPaginatedReport: true, //  Tell SDK it's a paginated report
      embedUrl: baseEmbedUrl + parameters,

View solution in original post

5 REPLIES 5
Lakshmanan1
Frequent Visitor

Hi, I achieved it by passing the paramters through embed URL 

Eg: 

 // Base embed URL for paginated report
    const baseEmbedUrl = `https://app.powerbi.com/reportEmbed?reportId=${reportId}&groupId=${groupId}`;
    
    // Add parameters (rp: prefix for paginated report params)
    const parameters = '&rp:fromsk=20&rp:area=A';

    this.embedConfig = {
      type: 'report', //  Still use 'report' for paginated reports in older SDKs
      isPaginatedReport: true, //  Tell SDK it's a paginated report
      embedUrl: baseEmbedUrl + parameters,

Hi @Lakshmanan1,
Thanks for sharing this! You're absolutely right using the rp: prefix in the embed URL is the correct way to pass parameters to a paginated report. This works well, especially when embedding through SDKs or custom apps.

 

Best Regards,
Sreeteja.
Community Support Team 

v-sshirivolu
Community Support
Community Support

Hi @Lakshmanan1  ,
Thanks for reaching out to the Microsoft fabric community forum.

It looks like you're embedding a paginated report using the Power BI JavaScript API, but you're facing two key issues:

1. There was an attempt to embed a component of type: paginated, but no corresponding component was found"

This usually occurs when:

  • The correct report type (paginated) is not supported by your Power BI capacity.

  • You're using an older or incorrect version of the Power BI JavaScript client.

  • Paginated reports aren’t enabled in your Power BI Premium or Embedded capacity.

Fix: 

Ensure you're using the correct JavaScript client library (v2.19.0+ is fine):

<script src="https://cdn.jsdelivr.net/npm/powerbi-client@2.19.0/dist/powerbi.js"></script>

Confirm your Power BI workspace is backed by Premium or PPU capacity, and paginated reports are enabled in that capacity (Admin portal > Capacity settings).

2. Parameters not being passed to the paginated report

  • You’re passing parameters in the wrong place in the config object.

  • Parameter names have trailing spaces (e.g. EMP_CHILD_ID instead of EMP_CHILD_ID ).

  • Parameters should go inside settings.parameter, not the root config.

Update your embedding code like this:

<script>
var models = window['powerbi-client'].models;

var config = {
type: 'paginated',
tokenType: models.TokenType.Embed,
accessToken: '<%= EmbedToken %>',
embedUrl: '<%= EmbedUrl %>',
id: '<%= ReportId %>',
permissions: models.Permissions.All,
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: true,
parameters: {
EMP_ID: '<%= EMP_ID %>',
EMP_CHILD_ID: '<%= EMP_CHILD_ID %>',
LEAD_ID: '<%= LEAD_ID %>',
START_DATE: '<%= START_DATE %>',
END_DATE: '<%= END_DATE %>'
}
}
};

var reportContainer = document.getElementById('powerBIReportContainer');
powerbi.reset(reportContainer);
powerbi.embed(reportContainer, config);
</script>

Make sure those parameters are actually defined in your paginated report (.rdl file). Date values should be passed in a consistent format (e.g., yyyy-MM-dd). If any parameter is null , explicitly set it as null or remove it if optional.

If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it

Best Regards,
Sreeteja.
Community Support Team 

I appreciate your response. However, I'm still having trouble retrieving the parameter value in the paginated report for rendering. Could this issue be related to the Power BI workspace being not supported by Premium or PPU capacity?

 

Additionally, aside from using the Power BI JavaScript API to embed a paginated report, could you recommend any alternative methods for embedding the paginated report with parameter passing in an ASP.NET Web Forms application? Specifically for the ASP.NET Web Forms framework application.

Hi @Lakshmanan1  ,
It looks like you're embedding a Power BI paginated report into an ASP.NET Web Forms application, but facing two primary issues:

Issue 1: Error – "Component of type: paginated not found"

This typically happens when:

  1. You're not using a workspace backed by Power BI Premium or Premium per User (PPU) capacity.

Your JavaScript client is outdated or doesn't support paginated reports.

You're using an incorrect type in your embed config.

 

1.Use the correct Power BI JavaScript client:
<script src="https://cdn.jsdelivr.net/npm/powerbi-client@2.19.0/dist/powerbi.js"></script>

 

2.Confirm your workspace is Premium-backed:
Go to Power BI Service - Workspace list

 

var models = window['powerbi-client'].models;

Make sure there’s a diamond icon next to the workspace

Otherwise, embedding paginated reports will fail.

Issue 2: Parameters not reaching paginated report

Your original code sends parameters at the root level, which is incorrect for paginated reports. Also, there are trailing spaces in some parameter names.


Update your embedding code like this:
<script>
var config = {
type: 'paginated',
tokenType: models.TokenType.Embed,
accessToken: '<%= EmbedToken %>',
embedUrl: '<%= EmbedUrl %>',
id: '<%= ReportId %>',
permissions: models.Permissions.All,
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: true,
parameters: {
EMP_ID: '<%= EMP_ID %>',
EMP_CHILD_ID: '<%= EMP_CHILD_ID %>',
LEAD_ID: '<%= LEAD_ID %>',
START_DATE: '<%= START_DATE %>',
END_DATE: '<%= END_DATE %>'
}
}
};
var reportContainer = document.getElementById('powerBIReportContainer');
powerbi.reset(reportContainer);
powerbi.embed(reportContainer, config);
</script>

Remove any trailing spaces in parameter names like "EMP_CHILD_ID  " - "EMP_CHILD_ID"
Ensure your RDL file has these parameters defined exactly as named 

 

To confirm the report is receiving parameters:

  1. Open the .rdl report in Power BI Report Builder.

  2. Add default values or expression logic to display the parameter values in the report.

  3. Check if the report fails when loaded without parameters — this can help you verify if the values are being passed properly.

 

If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.

Best Regards,
Sreeteja.
Community Support Team 

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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