为什么.rdlc报告在不同环境中的呈现方式不同? [英] Why .rdlc report renders differently in different environments?

查看:176
本文介绍了为什么.rdlc报告在不同环境中的呈现方式不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio中有一个使用.rdlc报告的项目。处理完所有数据后,它会将输出显示为网页上的报告。但是,我在渲染/格式化方面遇到了问题。



问题



当我在localhost中运行时环境(主浏览器是IE11),报告按预期呈现并产生如下报告样本的输出:





如图所示,在开发环境中,报表的副标题在到达换行符时位于表格标题的顶部。



什么有到目前为止我做了什么?



1)我比较了在localhost和dev环境下运行的IE版本。它们都运行在相同的IE11浏览器上。这消除了我在IE浏览器版本差异中的理论。



2)我在不同的浏览器(Chrome,Firefox)中运行了localhost和dev环境。 localhost和dev环境报告都在这些浏览器中正确呈现,这消除了不同的浏览器理论。



3)根据我在下面做出的结论,我进行了一些研究,


I have a project in Visual Studio, which uses .rdlc reports. After it processes all data, it will display the output as a report on the webpage. However, I getting a problem in terms of rendering/formatting.

Problem

When I run within the localhost environment (main browser is IE11), report is rendered as intended and produces the output like following report sample:

However, when I am running the program within the dev environment web server (also in IE11), I am receiving the following bug:

Like shown on the picture, in dev environment the subtitle of the report is going on the top of table header when it reaches newline.

What have I done thus far?

1) I compared IE versions, which were run on localhost and dev environment. They both were run on the same IE11 browsers. Which eliminated my theory in IE browser version differences.

2) I ran both localhost and dev environments in different browsers (Chrome, Firefox). Both localhost and dev environment reports rendered properly in these browsers, which eliminated a different browser theory.

3) Based on the conclusion I made below, I performed some research, and the following post was the closest thing I was able to reach.

Overall

After performing steps above, I noticed that only dev environment in IE11 was producing the header bug (second picture). That led me to the conclusion that it has to do with IE11 rendering. Which makes me even more confused, since localhost environment ran in IE11 browser rendered properly (first picture).

Question

What causes this bug? Why IE on the dev environment behaves differently than localhost environment?

Ultimately, is there a way to fix this bug? If yes, what do I do(add/remove files to the dev environment, write compatibility code lines somewhere)?

EDIT

After some additional research, I found this question, however, this question was never answered. I tried looking into suggestions in comments, but to no avail.

EDIT 2

I have tried adding meta tag to the parent view file, it did not solve the problem.

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

It also does not help when I add the following lines into web.config

<httpProtocol>
    <customHeaders>
        <add name="X-UA-Compatible" value="IE=edge" />
    </customHeaders>
</httpProtocol>

解决方案

The main reason it was causing a problem for me is that it was running in compatibility mode. Ticking off the first flag in Compatibility view settings has solved the issue for me.

这篇关于为什么.rdlc报告在不同环境中的呈现方式不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆