隐藏/取消隐藏子报表中主报表上的组标题 [英] Hide/Unhide group header on main report within subreport

查看:112
本文介绍了隐藏/取消隐藏子报表中主报表上的组标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我有一个包含子报表的报表,该报表有一个子报表作为子报表,依此类推。到目前为止,我有6个级别,每个级别都与他的父级相关联。我想要做的是当一个新页面开始时,我想显示他父母的名字。


现在,我想要做的就是创建5主报表上的组,并根据启动新页面的级别隐藏/取消隐藏它们。当然,每当出现一个新级别时,名称将保存在一个文本框中,该文本框将显示在相应的组中。


示例:

(页面1)

等级1

等级1

等级2

等级2

等级1

等级2

等级3

等级3


(第2页) - 这个页面以4级开始

等级1< - 等级4的父母

等级2< - 等级4的父母

等级3 < - 4级家长

等级4< -Starts here

等级3

等级1

...


我遇到的问题是我无法在detail_print事件的子报表中隐藏/取消隐藏主报表上的组标题。任何线索?

解决方案

你需要将事件附加到groupHeader_Format而不是detail_Format。


我不确定是不是最好的办法,但我再也不是100%确定我明白你想做什么:)


欢迎来到字节。


< blockquote>很难解释,你可以看到:)有没有办法隐藏/取消隐藏子报告中的主报告的组部分,如MyMainForm.GroupHeader.Visible(我用我的子表单的print_detail事件做了但它不起作用)。我知道你可以从报告到子表单... MySubReport.GroupHeader.Visible


正如我所说的......把它放在groupheader的格式化事件中。

展开 | 选择 | Wrap | 行号


Hello,

I have a report with a subreport that has a subreport that as a subreport and so on. I have so far 6 levels and each of them is linked to his parent. What I''m trying to do is when a new page starts, I want to show the names of his parents.

Now, what I was thinking to do that is to create 5 groups on the main report and hide/unhide them depending on the level that is starting the new page. Of course, everytime a new level appears, the name would be save in a textbox that would be shown in the appropriate groups.

Example:
(Page 1)
Level 1
Level 1
Level 2
Level 2
Level 1
Level 2
Level 3
Level 3

(Page 2) - This page starts with a level 4
Level 1 <- Parent of level 4
Level 2 <- Parent of level 4
Level 3 <- Parent of level 4
Level 4 <-Starts here
Level 3
Level 1
...


The problem I have is that I can''t hide/unhide a group header on the main report within a subreport in a detail_print event. Any clue?

解决方案

You need to attach the event to the groupHeader_Format not the detail_Format.

Im not sure if thats the best way to go about it, but then again im not 100% sure I understand what you want to do :)

Welcome To Bytes.


It''s hard to explain like you can see :) Is there a way to hide/unhide a group section of a main report within a subreport like MyMainForm.GroupHeader.Visible (I did that with the print_detail event of my subform but it doesn''t work). I know you can do it from a report to a subform... MySubReport.GroupHeader.Visible


As I said...put it in the format event of the groupheader.

Expand|Select|Wrap|Line Numbers


这篇关于隐藏/取消隐藏子报表中主报表上的组标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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