RDLC-Report 中的空页 [英] Empty pages in RDLC-Report

查看:31
本文介绍了RDLC-Report 中的空页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一份包含 tablix 的 rdlc 报告,仅此而已.Tablix 水平方向展开显示天,垂直方向展开显示组.

I have a rdlc report that conains a tablix, nothing other. The Tablix expands in horizontal direction to show days and in the vertical direction to show groups.

tablix 按预期工作,只要我将内容区域的宽度设置为等于 tablix 的宽度.

The tablix works as expected, as long as I set the width of the content area equal to the width of the tablix.

如果我将内容大小扩展到其固定大小(大约为 PageWidth-PageBorders)并运行报告,则每隔一页是一个空页.
然而,tablix 只使用一页.每个奇数页都绝对是空的.似乎 tablix 将其水平扩展添加到当前定义的内容宽度,然后计算溢出.

If I expand the content size to its fixed size (approximately PageWidth-PageBorders) and run the report, every second page is an empty page.
However the tablix only uses one page. Every odd page is absolutely empty. It seems that the tablix adds its horizontal expansion to the currently definied content width and calculates then the overflow.

reportviewer 版本为 3(2010 可再发行版)

The reportviewer Version is 3 (2010 Redistributable)

有人对这种奇怪的行为有解决方案吗?

Does someone have a solution for this odd behaviour?

更新

如果我将报告导出到 excel,我会看到 tablix 的右侧站点上有一列与当天生成的项目一样长.这似乎真的是一个错误或功能,我不知道如何停用.
我也尝试从表中创建相同的结构,但导致了同样的问题,这并不令人惊讶,因为该表在内部也是一个 tablix.

If I export the report to excel, I see that there is on the right site of the tablix a column that is exactly as long as the generated items for the days. It seems realy to be a bug or a feature I don't see how to deactivate.
I also have tried to create the same construction from a table, and it resulted in the same problem, what not is astonishing, because the table is internally also a tablix.

更新 1

如果我将报告的ConsumeContainerWhitespace"属性设置为true,则上述测试版本有效.但是如果我将其他元素放在白色"区域,效果会再次出现.

If I set the property "ConsumeContainerWhitespace" of the report to true, the above test version works. But if I place then other elements in the "white" area, the effect reocurrs.

推荐答案

设置页面属性 ConsumeContainerWhitespace=true(在属性对话框中,F4)有帮助.然而,正确地构建报告无论如何都很棘手.一开始它只有在我将所有额外的内容添加到页眉和页脚时才有效.但这是不可接受的.经过多次尝试,我成功地按要求制作了报告.但是我真的不明白背后的逻辑.

Setting the page-property ConsumeContainerWhitespace=true (in the properties dialog, F4) has helped. However it was anyhow tricky to build the report correct. At the begining it worked only if I added all extra content to the page-header and footer. But this was not acceptable. After a lot of trying, I succeed in making the report as desired. However I don't really understand the logic behind.

我记得我已经做过这样的报告(在两个方向上,横向和纵向一起增长)没有任何问题,我不知道这里的这份报告有什么不同.对于此报告,ConsumeContainerWhitespace 属性的作用是绝对可重现的.但我不知道为什么我所做的类似报告从来没有发生在我身上.我也不知道为什么在布局引擎接受我的设计之前我必须先绕一圈.

I have in mind that I already have done such reports (growing in both directions, horizontally and vertically together) without any problems and I don't know what is difference to this report here. For this report, it's definitively reproducable that the ConsumeContainerWhitespace-property makes the difference. But why this never happens to me for similar reports I have done, I don't know. Also I don't know why I had first to circle around before the layout-engine accepted my design.

这篇关于RDLC-Report 中的空页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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