473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Hide sub report if empty

Hi All,

I have a subreport that is going to be empty for some lines, so I want it to be hidden it on those lines.

I have set the the report and page header to not visibel, set the can grow and can shrink to yes, and set the height to 0, and that works.

But I want to show the lables for the data in the report header. As soon as I do this the report show's on each line.

I have even tried in the Detail_Format is
Expand|Select|Wrap|Line Numbers
  1.     If Me.rpt_FishCaught.Report.HasData Then
  2.         Me.rpt_FishCaught.Visible = True
  3.     Else
  4.         Me.rpt_FishCaught.Visible = False
  5.     End If
But it does not work. Any suggestions?

Thanx
Nov 29 '10 #1
3 3218
NeoPa
32,556 Expert Mod 16PB
I would put the code in the Report_Open() procedure :
Expand|Select|Wrap|Line Numbers
  1. Private Sub Report_Open(Cancel As Integer)
  2.     Me.Parent.rpt_FishCaught.Visible = (Not Me.HasData)
  3. End Sub
Nov 29 '10 #2
Hi NeoPa,

I put it in the Report_Open proc of the rpt_FishCaught and everthing is visibel, if I remove teh Not, then evey thing is hidden.
Nov 29 '10 #3
NeoPa
32,556 Expert Mod 16PB
"every thing" means what in this case? Are we talking about rpt_FishCaught (As that is the single item we are attempting to affect)?
Dec 3 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Benny Eckert | last post by:
Hi everyone, There's probably an easy solution to this little problem, but I can't find it: in the properties of my field, i selected hide duplicates 'yes'. As a (logical) result, i have a...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
2
by: Den | last post by:
I have a report where at the report footer, I have a field that sums up the total of a field in the report. My problem is, when the report is empty the field shows #error. Would someone tell me a...
7
by: Mark | last post by:
Hi All, I have a report which is based on a query which is used to produce QC check sheets. I have quite a few text boxes which are used to display questions depending on the value of one...
1
by: Shapper | last post by:
Hello, I have this code line inside an ASP.Net Repeater: <a href='<%# DataBinder.Eval(Container.DataItem, "link") %>'><%= readMore %></a> What I need to do is: 1. Show readMore value if <%#...
1
by: desmoduck | last post by:
Hey Group, I may just be suffering brain fade but I have searched around and not been able to find a solution. My difficulty: I have a datagrid that shows name, address, tel, fax and toll free...
2
by: Bryan | last post by:
I have a Windows Application that uses a DataGridView for displaying read-only data. Everything work fine, except when my datasource has no data. Ideally, when there is no data I would like to...
6
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate...
10
by: sara | last post by:
Hi - Is it possible to hide the detail section of a report at run time? I have a report that prints all details, with summary lines. The user would like the report ALSO with just summary lines....
4
by: lupo666 | last post by:
Hi everybody, this time I have three problems driving me nuts :-((( (1) I have a report with 20 or so Yes/No "squares". Is there a way to either hide/show the "square" or change the yes/no...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.