如果行不在第一页则隐藏该行

发布于 2024-12-01 10:14:08 字数 242 浏览 1 评论 0原文

如果表格的一行未呈现在报表的第一页上,我想隐藏该行。表格 (tablix) 位于页眉或页脚区域。

我尝试为 RowVisibility 属性设置一个表达式,例如:

(hidden) =Globals!PageNumber<>1

但是,这会导致异常,表明 PageNumber 只能在页眉或页脚区域内使用。

是否可以(在表达式中)检查元素是否位于报告的第一页?

I want to hide a row of a table if it is not rendered on the first page of a report. The table (tablix) is in the header nor in the footer area.

I have tried to set an expression for the RowVisibility-property, something like:

(hidden) =Globals!PageNumber<>1

however, this leads to an exception saying that the PageNumber can only be used from within the header or the footer area.

Is there a possibility to check (in an expression) if an element is located on the first page of a report?

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

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

发布评论

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

评论(3

亢潮 2024-12-08 10:14:08

不是我问题的精确答案,但也许它可以帮助遇到类似问题的人:

  • 对于 tablix,激活重复行标题选项
  • 在高级行组选项中,激活选项 RepeatOnNewPage
  • 对于不应在下一页上显示的行,禁用选项 KeepWithGroup

我不明白为什么我不能仅对某些行而不是所有行设置 RepeatOnNewPage,但使用 KeepWithGroup 选项,它似乎可以按我的预期工作。

如果有人对我原来的问题有更准确的答案,请发布。我将更改接受您的答案!

Not a precise answer to my question, but maybe it helps someone with a similar issue:

  • For the tablix activate the repeat row header option
  • In the advance row group options, activate the option RepeatOnNewPage
  • For the rows that should not be shown on the next page, disable the option KeepWithGroup

I don't understand why I can not set RepeatOnNewPage only for some but not for all rows, but with the KeepWithGroup option, it seems to work like I desired.

If someone has a more precise answer to my original question, please post it. I will the change the accept to your answer!

晨敛清荷 2024-12-08 10:14:08

在可见性属性中设置此项,行将呈现或不呈现,具体取决于 YourDatasetField 值。

=IIF(True = Fields!YourDatasetField.Value, False, True)

Set this in the visibility property and the row will rendered or not depeding of the YourDatasetField value.

=IIF(True = Fields!YourDatasetField.Value, False, True)
迷途知返 2024-12-08 10:14:08

我试图隐藏第一页标题中的一个字段。可能不准确,但对我有用。

=IIF(Globals!PageNumber = 1, True, False)

I was trying to hide just one field in the header on the first page. May not be exact but worked for me.

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