griegs
griegs

Reputation: 22770

HTML5 and iFrame replacement for ReportServer

Our client has a bunch of reports written in SQL Reportng Server and we need to display them in our MVC application.

However, we're aware that HTML5 no longer supports the use of iFrames so we need to find another way.

I have tried the following with no success.

<div id="rptViewer" style="width: 800px; height: 800px;"></div>

$(function () {
    $("#rptViewer").load("URL/ReportViewer.aspx?/NewDailyReport/DailyReport&date=2012-05-30&rs:Format=HTML4.0", function (response, status, xhr) {
        if (status == "error") {
            var msg = "Sorry but there was an error: ";
            alert(msg + xhr.status + " " + xhr.statusText);
        }
    });
});

edit

Also does not work;

    $.get("URL/ReportViewer.aspx?/NewDailyReport/DailyReport&date=2012-05-30&rs:Format=HTML4.0", function (response) {
        alert(8);
        $('#rptViewer').html(response);
    });

Upvotes: 0

Views: 1450

Answers (1)

Dmitry S.
Dmitry S.

Reputation: 8513

HTML 5 does support iframes. There were a few interesting attributes added like "sandbox" and "srcdoc".

http://www.w3schools.com/tags/tag_iframe.asp

Upvotes: 1

Related Questions