I’ve embedded a Crystal Reports 2022 analytics report in our web application using an iframe, but drilldown links don’t work when users click on chart elements or data points. The drilldown functionality works perfectly when accessing the report directly through the BI Launchpad, but in the embedded iframe context, clicking drilldown elements does nothing - no navigation, no errors in console. I’ve checked the iframe sandbox attributes and they include ‘allow-scripts’ and ‘allow-same-origin’. The cross-origin settings appear correct with CORS headers properly configured. I suspect it’s related to drilldown event handling being blocked by the iframe, but I’m not sure how to fix it. Here’s my current iframe setup:
<iframe src="https://bi-server/report"
sandbox="allow-scripts allow-same-origin allow-popups"
width="100%" height="800px"></iframe>
Has anyone successfully implemented drilldown in embedded Crystal Reports?
Another thing to check is whether the drilldown target is set to open in a new window or in the same frame. Crystal Reports has a setting for drilldown navigation target. If it’s set to ‘_blank’, it might be blocked by popup blockers in the iframe context.
Yes, it’s likely an event propagation issue. Crystal Reports 2022 uses a JavaScript SDK for interactive features like drilldown. When embedded in an iframe, the SDK might not initialize properly due to cross-origin restrictions. You need to include the Crystal Reports JavaScript SDK in your parent page and configure it to communicate with the iframe using postMessage API.
The issue is that drilldown in Crystal Reports uses navigation events that are blocked by default in iframes. You need to add ‘allow-top-navigation’ to your sandbox attributes. However, be careful with this as it allows the iframe to navigate the parent page, which might be a security concern depending on your setup.