SQL Server Reports in an IFrame

Has anyone successfully displayed a SQL Server Report Services report within a Perspective IFrame? I’m using Perspective in 8.0.16. I can call the URL http://localhost/ReportServer/Pages/ReportViewer.aspx?/CasesRunPerHour%20BarChart&rs:Command=Render
in Chrome on the same server as the Gateway, and get a nice graph. When I call it within an IFrame, I get a nice “localhost refused to connect”.

I followed the instructions from PGriffith’s post to turn off the x_frame options in Ignition.conf. Without any change.

(Yes, I’m aware that Ignition can also create reports, I’m looking into this option for my manager :slight_smile: )

Wondering if anyone successfully accomplished this before.

Thanks!

You’ll probably have to update the content security policy(ies) in Report Services. (No, I don’t know how to do that…)

Thank Phil for the quick response. I spent a fair amount of time learning about CSP and HTTP headers. Very informative, but unfortunately didn’t resolve the problem.

Turns out the solution was rather simple, for anyone who comes across this use case. All I had to do was append “&rs:Embed=true” to the end of the URL, and the IFrame rendered the page.

2 Likes