Forum Discussion
Paginated report not embedding inside update panel ASP.net
Hi Poojara, i tried this, still not working.
FYI. the Power BI pagninated report should work inside update panel on a button Onclick eg: OnClick="btnGenerateReport_Click" this method fills ReportId,
EmbedUrl = embedInfo.embedUrl;
EmbedToken = embedInfo.embedToken;
Once the variable filled then should hit the Javascript SDK . Below are the code snippet i am trying inside update panel but not working.
<asp:Button ID="btnGenerateReport" runat="server" Text="Generate Report" CssClass="genric_btn green" OnClick="btnGenerateReport_Click" />
<div id="powerBIReportContainer" style="height:600px;width:100%;"></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/powerbi.js"></script>
<script type="text/javascript">
Sys.Application.add_load(function () {
embedPowerBIReport();
});
var embedUrl = '<%= EmbedUrl %>';
var embedToken = '<%= EmbedToken %>';
var reportId = '<%= ReportId %>';
function embedPowerBIReport() {
if (!embedUrl || !embedToken || !reportId) return;
var models = window['powerbi-client'].models;
var embedConfig = {
type: 'report',
isPaginatedReport: true,
id: reportId,
embedUrl: embedUrl,
accessToken: embedToken,
tokenType: models.TokenType.Embed,
settings: {
panes: {
filters: { expanded: false, visible: false },
pageNavigation: { visible: true },
parameters: { expanded: false, visible: false }
},
navContentPaneEnabled: false,
parameterPaneEnabled: false
}
};
var reportContainer = document.getElementById('powerBIReportContainer');
powerbi.reset(reportContainer);
var report = powerbi.embed(reportContainer, embedConfig);
// Show page navigation after report is loaded
report.on("loaded", function () {
report.updateSettings({
panes: {
pageNavigation: { expanded: false, visible: true },
filters: { visible: false },
parameters: { expanded: false, visible: false }
},
parameterPaneEnabled: false
});
});
}
</script>
Hello Anonymous,
We regret the inconvenience caused. Please consider raising a Microsoft support ticket for further investigation. You can explain all the troubleshooting steps you have taken to help them better understand the issue.
You can create a Microsoft support ticket with the help of the link below:
https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket
If this helps, please accept it as a solution and drop a "Kudos" so other members can find it more easily.
Thank you.
- v-ssriganesh1 year ago
Community Support
Hello Anonymous,
Could you please confirm if the issue has been resolved after raising a support case? If a solution has been found, it would be greatly appreciated if you could share your insights with the community. This would be helpful for other members who may encounter similar issues.
Thank you for your understanding and assistance.