0

私たちのクライアントには、SQL Reportng Server で作成された多数のレポートがあり、それらを MVC アプリケーションで表示する必要があります。

ただし、HTML5 が iFrame の使用をサポートしなくなったことを認識しているため、別の方法を見つける必要があります。

次のことを試しましたが、成功しませんでした。

<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);
        }
    });
});

編集

また、機能しません。

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

1 に答える 1

1

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

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

于 2012-07-10T02:29:18.293 に答える