1
我必須在aspx頁面顯示報告。所以我發現如何在asp頁面中顯示來自報表服務器的報表。他們大多數都使用reportViewer控件,但是,我發現iframe可以很好地查看報告。從iframe中查看使用reportViewer控件的報告的缺點是什麼?
有誰知道他們爲什麼不使用iframe來查看報告?
的iframe:
<iframe src="http://{server}/ReportServer/Pages/ReportViewer.aspx?{mypath}" id="frame" runat="server" width="1500" height="800">input URL is invalid </iframe>
ReportViewer控件:
<rsweb:ReportViewer runat="server" ID="MyReportViewer" Width="100%" Height="700px"></rsweb:ReportViewer>
//C#
MyReportViewer.ProcessingMode = ProcessingMode.Remote;
ServerReport serverReport = MyReportViewer.ServerReport;
// Set the report server URL and report path
serverReport.ReportServerUrl = new Uri("http://{server}/ReportServer");
serverReport.ReportPath = "/{myPath}";
用戶可以查看報告路徑,難以添加CSS。 – Snowlockk
@Slocklockk,但他們無法編輯,更新任何東西到我的數據庫,對不對?如果是這樣,他們在查看報告路徑時遇到了什麼問題(他們無法看到他們沒有權利),更難或添加css? – MRWonderFuXker
取決於您的系統設置。如果報告路徑字符串中存在變量,則可以編輯它們以查看其他人的數據。 – Snowlockk