SSRS 2005 ReportViewer 正在“缩小”我的报告

发布于 2024-09-25 17:09:57 字数 272 浏览 6 评论 0原文

我已经将几个报告放在一起,它们在 Visual Studio 中的预览中完全按照我希望的方式呈现,但是当我在 Web 浏览器中查看它们时,它们最初会按要求呈现,但很快就会被压缩到浏览器的左半部分观察者的窗口。缩放级别设置为 100% - 将其设置为页面宽度会缩小报表以填满页面,但它不会更正初始“挤压”发生时所产生的换行符。

有谁知道如何阻止查看者进行此调整大小?

另外,ReportViewer 是否会自动禁用其父浏览器窗口上的最大化按钮?我对这一切都很陌生......

谢谢,丹

I've put together several reports which render exactly as I'd like them to in the preview in Visual Studio, but when I view them in a web browser, they render as required initially but are quickly squished into the left half of the browser window by the viewer. The zoom level is set to 100% - setting it to Page Width zooms the report out to fill the page but it doesn't correct the line breaks it has made when the initial 'squish' happens.

Does anyone know how to prevent the viewer from doing this resize?

Also, does the ReportViewer automatically disable the maximize button on its parent browser window? I'm quite new to all this....

Thanks, Dan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦里°也失望 2024-10-02 17:09:57

使用SSRS 2005时CHROME中的报告缩小问题可以通过以下解决方案解决。即使您有多个页面并且导出报告,它也始终有效。

步骤如下:

  1. 打开页脚
  2. 在其上拖动一个矩形
  3. 将矩​​形位置设置为:
    • 左=0
    • 顶部 = 0
  4. 将矩形大小设置为:
    • Width =“报告的宽度”
    • 高度 = 0.1

通过以上设置,矩形将不会显示。

The report shrinking problem in CHROME when using SSRS 2005 can be solved by the following solution. It works ALWAYS, even if you have more than one page and if you export your report.

Steps to follow:

  1. Open Page Footer
  2. Drag a rectangle on it
  3. Set rectangle Location as:
    • Left = 0
    • Top = 0
  4. Set rectangle size as:
    • Width = "the Width of your report"
    • Height = 0.1

By the above settings, the rectangle will not show.

奢望 2024-10-02 17:09:57

我们公司的做法是插入一个页面标题,在其上放置一个线条组件,使其与报表具有相同的宽度,并且采用在运行时(打印)时不会显示的中性颜色。

上述接受的解决方案并不适用于所有情况,尤其是当您设置订阅以通过电子邮件将报告发送给客户时。

The way we do it in my company is to insert a Page header, drop a line component on it, make it the same width as the report, and of a neutral colour that won't be displayed on run time (printing).

The accepted solution above won't work in all the cases, especially when you set up a subscription to send the report by email to the client.

只是偏爱你 2024-10-02 17:09:57

我们的修复方法是通过 Javascript 增加 HeightWidth

var t1;
function manageWidthReportViewer(behID) {
    t1 = window.setInterval("SetWidthForCrome()", 1);
}
function SetWidthForCrome() {

     var mainReportViewer = document.getElementById('iFrameMainReportViewerContainer'); 
    var reportFrame = mainReportViewer.contentWindow.document.getElementById('ReportFramereportViewer');
    var report = reportFrame.contentWindow.document.getElementById("report");
    if(mainReportViewer.contentDocument.getElementById("reportViewer") != null)
        mainReportViewer.contentDocument.getElementById("reportViewer").childNodes[2].childNodes[1].childNodes[1].style.float = "left";
    if (report!=null && report.contentDocument.getElementById("oReportCell") != null) {
        report.contentDocument.getElementById("oReportCell").style.width="100%";

        window.clearInterval(t1);
    }
}

function SetReportViewerDim() {
    var controlPanelHeight = screen.availHeight - 210;

    var mainReportViewer = document.getElementById('iFrameMainReportViewerContainer'); //set
    mainReportViewer.removeAttribute('height');
    mainReportViewer.style.height = (controlPanelHeight-37) + "px";

    var reportViewer = mainReportViewer.contentWindow.document.getElementById('reportViewer'); //set
    reportViewer.style.height = (controlPanelHeight) + "px";

    var reportFrame = mainReportViewer.contentWindow.document.getElementById('ReportFramereportViewer');

     if (Sys.Browser.name == "Safari") {
    manageWidthReportViewer(reportFrame);
    }

}

Our fix was to increase the Height and Width by Javascript:

var t1;
function manageWidthReportViewer(behID) {
    t1 = window.setInterval("SetWidthForCrome()", 1);
}
function SetWidthForCrome() {

     var mainReportViewer = document.getElementById('iFrameMainReportViewerContainer'); 
    var reportFrame = mainReportViewer.contentWindow.document.getElementById('ReportFramereportViewer');
    var report = reportFrame.contentWindow.document.getElementById("report");
    if(mainReportViewer.contentDocument.getElementById("reportViewer") != null)
        mainReportViewer.contentDocument.getElementById("reportViewer").childNodes[2].childNodes[1].childNodes[1].style.float = "left";
    if (report!=null && report.contentDocument.getElementById("oReportCell") != null) {
        report.contentDocument.getElementById("oReportCell").style.width="100%";

        window.clearInterval(t1);
    }
}

function SetReportViewerDim() {
    var controlPanelHeight = screen.availHeight - 210;

    var mainReportViewer = document.getElementById('iFrameMainReportViewerContainer'); //set
    mainReportViewer.removeAttribute('height');
    mainReportViewer.style.height = (controlPanelHeight-37) + "px";

    var reportViewer = mainReportViewer.contentWindow.document.getElementById('reportViewer'); //set
    reportViewer.style.height = (controlPanelHeight) + "px";

    var reportFrame = mainReportViewer.contentWindow.document.getElementById('ReportFramereportViewer');

     if (Sys.Browser.name == "Safari") {
    manageWidthReportViewer(reportFrame);
    }

}
听风吹 2024-10-02 17:09:57

经过大量挖掘后,我找到了 SSRS 缩小报告的解决方案。
作为参考,您必须执行三件事:

  1. 从我的托管 aspx 页面中删除声明
  2. 将 ReportViewer 的 AsyncRendering 属性设置为 false。
  3. 将 ReportViewer 的 Width 属性设置为 100%

显然 SSRS 2005 中的 XHTML 渲染引擎存在一个错误,现已通过 SSRS 2008 中的引擎重建修复。

After a lot more digging, I've found the solution to SSRS shrinking my reports.
For reference, you have to do three things

  1. Delete the declaration from my hosting aspx page
  2. Set the ReportViewer's AsyncRendering property to false.
  3. Set the ReportViewer's Width property to 100%

Apparently there is a bug in SSRS 2005 with its XHTML rendering engine which is now fixed with the engine rebuild in SSRS 2008.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文