Tôi đang sử dụng ReportViewer for MVC để hiển thị báo cáo trong chế độ xem trong ứng dụng MVC của mình.
Làm cách nào để đặt chiều rộng cho điều khiển này?Cách đặt chiều rộng cho ReportViewer cho MVC
Tôi đã đặt chiều rộng thành 100% nhưng không hoạt động, như có thể thấy trong ảnh chụp màn hình này.
Theo quan điểm của tôi, tôi sử dụng:
<div>
@Html.ReportViewer(ViewBag.ReportViewer as Microsoft.Reporting.WebForms.ReportViewer, new { scrolling = "yes", width = "100%" })
</div>
Và trang aspx là:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body style="margin: 0px; padding: 0px;width:100%;">
<form id="form1" runat="server">
<div style="width:100%">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="ReportViewerForMvc" Name="ReportViewerForMvc.Scripts.PostMessage.js" />
</Scripts>
</asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Width="100%" Height="600px"></rsweb:ReportViewer>
</div>
</form>
</body>
bài viết một số html. – Johan
@johan đã cập nhật câu hỏi bằng mã. –