如何隐藏子报告? [英] How To hide a subreport?
本文介绍了如何隐藏子报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何隐藏子报告?
我发现如何知道子报告是否没有数据
(Me.subreportname.Report.HasData)
我没有找到的是如果没有数据,如何使子报告不可见。
我试过:
如果不是Me.subreportname.Report .HasData然后
Me.subreportname.Report.Visible = False
结束如果
但它给了我一个错误
解决方案
你好,你可以使用这个
展开 | 选择 | Wrap | 行号
你第一次引用子报告时你指的是报告本身,所以你需要.Report
但是,你第二次提到子报告对象所以你不要不要使用.Report
你还必须允许真正的事件。
展开 | 选择 | Wrap | 行号
感谢您的关注,代码没问题,
但我仍有问题,因为我的目标是节省balnk子报告占用的空间''和虽然分报告是不公正的仍然页面有很大的空白,在子报告应该坐的地方。
你知道如何节省空白吗?
谢谢。
How To hide a subreport?
I found how to know if the subreport has no data
(Me.subreportname.Report.HasData)
what I didn''t find is how to make the sub report unvisibile if it has no data.
I tried:
If Not Me.subreportname.Report.HasData then
Me.subreportname.Report.Visible = False
End If
but it gave me an error解决方案hi there you could use this
Expand|Select|Wrap|Line Numbers
The first time you refer to the subreport you are referring to the report itself so you need the .Report
However, the second time you are referring to the subreport object so you don''t use .Report
You also have to allow for the true event.
Expand|Select|Wrap|Line Numbers
Thanks for your attention, the code was OK,
but still I have a problem, since my target was to save the space that the balnk subreport takes'' and although the sub report was unvisible'' still the page was with large blank space, in the palce that the subreports was supposed to sit.
Do you have any idea how to save the blank space?
Thanks.
这篇关于如何隐藏子报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆