none
Enable Reports view in frame RRS feed

  • Question

  • Hello,

    I have found few topics about my problem, but i didnt get solution. I try to make SSRS2017 view in Sharepoint 2013 web part. I using web part "page preview" and i added ?&rs:embed=true to URL. I can see home page/folder of Reporting Services, but when i try open simple report i got error "This content cannot be displayed in frame". When i replace URL in web part from my home page to report url with ?&rs:embed=tru i can see report.

    Can someone help me? 

    Best Regards,
    Patrick

    Tuesday, January 15, 2019 9:27 AM

All replies

  • Hi Patrick7936

    According to your description ,seems that you want to embed all the report web portal in your web page (could access the report in the embed report web portal),right?

    Based on my research , if you use the home folder url like :

    http://<servername>/Reports or http://<servername>/Reports?rs:embed=true

    when you request either of them , both the url have the properties X-Frame-Options=sameorigin  in response header

    the value sameorigin means you could only access the report via the url have the same domain .

    for the detailed report url like : http://<servername>/Reports/report/<reportname>  it also have X-Frame-Options=sameorigin  in response header

    while for report url like : http://<servername>/Reports/report/<reportname>?rs:embed=true , there is no X-Frame-Options in response header.

     

    In my test , if you embed the home folder in the web page (if you could see the embedded home page), then you could access the report in the home page ,and get the detailed report in the iframe.


    In your scenario ,sorry for not clear what your url and the iframe information , if possible you could offer more detailed information about your issue like screenshoot or code project to us for more further research.

    Best Regards,

    Eric Liu


    Best Regards, Eric Liu MSDN Community Support Please remember to click Mark as Answer if the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread.


    Wednesday, January 16, 2019 5:52 AM
  • Dear Eric,

    Many Thanks for Your reply. My answer is below:

    Original URL in Reporting Services is: http: //server-name/reports/
    I found solution, which i had change URL to: http: //server-name/Reports/ReportViewer.aspx?&Rs:embed=true
    When I set URL from solution to my Sharepoint 2013 web part and now i can see home page:

    But when i try open any reports i have error(sorry, but in polish):

    This error mean "This content cannot be display in frame"

    And here is problem:
    I can see home page, but when i try open report i have error what can you see on screenshoot. How can i solve it, to see all content in frame?


    If you need more information tell me, i will try answer. 

    Wednesday, January 16, 2019 8:56 AM
  • Hi Patrick7936

    Sorry for one mistake in my previous reply.

    Seems if you add the iframe tag in the report server , whatever the url is (if the url is wrong) ,it would also display the report server web portal itself.

    So also, the adjust for the url http://<servername>/Reports or http://<servername>/Reports?rs:embed=true would not useful to test the home folder .

    According to this article : Integrate report from Reporting server 2016 via iframe in SharePoint 2013

    If right ,in your scenario ,

    Check the url  http: //server-name/Reports/ReportViewer.aspx?&Rs:embed=true  do not have the X-Frame-Options properties in response header,

    While http: //server-name/reports/ have the X-Frame-Options properties in response header .

    While the report url like : http: //server-name/Reports/reportname/  also have the X-Frame-Options properties limit.

    So , if you click the report in http: //server-name/Reports/ReportViewer.aspx?&Rs:embed=true   frame , it still call the url like : http: //server-name/Reports/reportname/  

    (you could see it in the browser developer tools ->console)

    Not the url like http: //server-name/Reports/reportname?rs:embed=true.

    The url http: //server-name/Reports/reportname/   still not allowed to add in frame.

    So ,seems you need to add rs:embed=true behind each url you request?(seems not possible)

    While it was by design , and seems not possible to have a good solution .

    You could also post your feedback at https://feedback.azure.com/forums/908035-sql-server.

    If the requirement mentioned by customers for many times, the product team may consider to add this feature in the next SQL Server version. Your feedback is valuable for us to improve our products and increase the level of service provided.

    Thanks for your support and understanding .

    Best Regards,

    Eric Liu


    Best Regards, Eric Liu MSDN Community Support Please remember to click Mark as Answer if the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread.


    Wednesday, January 16, 2019 9:57 AM
  • Hi Eric,

    is it possible to make this in frame by another way? You did it what i can see on your movie. Can you explain me how do you put web portal in frame?
    Wednesday, January 16, 2019 12:53 PM
  • Hi Patrick7936

    Sorry for not familiar with the web front-end , seems the web page was by design. The rs:embed=true could only remove current page’s X-Frame-Options properties ,could not remove all the X-Frame-Options properties of pages of this site.

    you could try to build a javascript function , when click the correspond report ,and then change the url in the iframe src attribute.

    for not familiar with the web front-end, I do not know if it works or not .(also no ability to create a sample)

    Generally, the issue is by design . you could post your issue at feedback forum for more information .

    Thanks for your support and understanding.

    Best Regards,

    Eric Liu


    Best Regards, Eric Liu MSDN Community Support Please remember to click Mark as Answer if the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread.

    Thursday, January 17, 2019 9:11 AM