我有一个我建立的网站,适用于IE8/IE9,Chrome和FireFox中的每个人.但是,现在我的客户端要求在IE7中工作,因为机器仍然有IE7.我无法弄清楚ReportViewer控件有什么问题.任何帮助,将不胜感激.
问题是我的报告超出了设定的高度和宽度; 它不会留在我使用jQuery包裹它的DIV中
jQuery代码
$(document).ready(function () {
var htmlwidth = $('.main').width() - 20;
var htmlheight = $(document).height() - $('.header').height() - 45;
$('#<%= ReportViewer1.ClientID %>').wrap('<div style="overflow:auto;" />');
$('#<%= ReportViewer1.ClientID %>').parent().css(height, htmlheight);
$('#<%= ReportViewer1.ClientID %>').parent().css('width', htmlwidth);
$('#<%= ReportViewer1.ClientID %>').css('width', htmlwidth);
$('#<%= ReportViewer1.ClientID %>').css(height, htmlheight);
$('#<%= ReportViewer1.ClientID %>').parent().css('border', 'solid 1px Black');
});
Run Code Online (Sandbox Code Playgroud)
内容
<asp:ScriptManager ID="scManager" runat="server"></asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Height="100%" Width="100%"
SizeToReportContent="true" ZoomMode="Percent" AsyncRendering="false" >
</rsweb:ReportViewer>
Run Code Online (Sandbox Code Playgroud)
示例生成块{content + jQuery Code}
<div style="width:500px; overflow:auto; border:solid 1px Black;height:400px;">
<asp:ScriptManager ID="scManager" runat="server"></asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Height="400px" …Run Code Online (Sandbox Code Playgroud)