473,883 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot hide empty subreport

11 New Member
I've reviewed the posts on www.bytes.com.
My problem is the same as that reported by others:
a report with an empty subreport cannot suppress the display of the empty subreport. I've set the "can shrink" and "can grow" properties to "yes" on both the footer and the subreport's control object. I've also minimized the physical size of the subreport in the footer. These all seem to make no difference. So, I added code to the "format footer" event of the report, attempting to hide the subreport if the .HasData property is false. I've also tried to add code (suggested in other related threads on this web site), which seems to compile without problem, but is unable to make the subreport non-visible. Please see attached JPG for example of empty "Additions (Subtractions)" subreports. I'm desperate! If you help me I will be your friend for life. Seriously.

Feb 13 '12
33 9190
759 Contributor
Oh, sorry, NeoPa.
I forget that you can't see, in 2003, what I see in 2007.

In 2007, if the report is opened in Report View mode (a long report with no delimited sheets - hope you understand what I mean) the On Format event is not triggered (fired). So the code inside that routine is not applied (running). I simple verify by placing a STOP statement in that routine. And nothing happen.

But, if the report is open in Print Preview mode the code is running and it do the job as you see in the attached pic (PrintPreview).

The second pic show you the available events for report section.
I try to move the code under On Paint but appear a error that say that the visible property can't be modified under this event.
I don't try under On Print and I don't know what is On Retreat event even after I read the associated help file.

Hope you understand me now even if my English is not much better than in preview post :) .

Attached Images
File Type: jpg PrintPreview.jpg (49.5 KB, 2781 views)
File Type: jpg SectionEvents.jpg (28.0 KB, 2753 views)
Feb 27 '12 #31
32,584 Recognized Expert Moderator MVP
It might be worth playing with the Print event then. See if that yields the expected results.
Feb 28 '12 #32
759 Contributor
I can't try that: I have not access to a printer.
If I use a virtual printer I can't be sure about results.
So maybe Rice can try that for us.
Feb 28 '12 #33
32,584 Recognized Expert Moderator MVP
I meant that for RicelandIT. I should have made that clearer.
Feb 28 '12 #34

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

Similar topics

by: bobh | last post by:
Hi All, I have a report which has several sub-reports on it, Each sub-report has its own record source and child/parent link. Sometimes a sub-report may not have data for an entered policy nbr and on the report thier is just an empty space where that sub-report would be when that happens. How do I get the sub-report to still display on the report when it has no data????
by: Chus Chuscazo via .NET 247 | last post by:
Hi there! I am building fdf files and i need to print them out. The problem is that in order to print them i have to executeacrobat reader. I am fine with it, but the problem is that i cannot hide thereader application, it always stays in the bottom bar. The code i'm doing is the following: string f_fdf = @"C:\PROJECTSdotNET\PDF_XML_PDF\PDFtoXML\chus.fdf"; Process p = new Process(); p.StartInfo.Arguments = " /h "; p.StartInfo.FileName...
by: Dgates | last post by:
This request might belong in a "SQL"-related newsgroup, but it's such a pain using Agent to subscribe to a new group (and download its 50,000 messages!) just to ask one question. So, since it deals with an ASP.NET app, I thought I'd ask here. ============================================== I am using Web Data Adminstrator, which I downloaded recently from the Microsoft site. I get an error when I create tables or columns:
by: Greg Burns | last post by:
I cannot hide the first column of my DataGridView. (VS.NET 2005 RC1) If you take a look at the sample from here http://lab.msdn.microsoft.com/vs2005/downloads/101samples/default.aspx Windows Forms->UsingDataGridView example They are hiding the employee ID by setting that column visibility to false, seems simple enough. But I can hide every other column in my own project, just not the first one!
by: BB | last post by:
Hi, I am using repeater control.in my aspx page. one of the column of control displays images. Filenames of images are stored in table. Now when I run it and if display Image is blank. I see place holder and red cross in it in Internet Explorer. But it works fine in FireFox. Is there any way to fix this so that in both browers I can see same ie hide placeholder and red cross? I have tried to use alternatetext property for image control. ...
by: naboumerhi | last post by:
Hi, I have a a custom report trying to hide empty fields and shift the next field up. It still shows and empty space. Example: company1 company2 company3
by: Michael S | last post by:
Hi. I am working on a class library where I have a namespace called MyProject.Implementation. This namespace only have internal and private classes. However, when I use my .dll assembly in a WinForm application, that application can still see the namespace via Intellisense. For the consumer it appears to be an empty namespace.
by: DanielM | last post by:
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
by: Academia | last post by:
I ran Dim Strs As String() = Nothing ....fill Strs with file paths DataO.SetData(DataFormats.FileDrop, True, Strs) Clipboard.SetDataObject(DataO) When I tried to paste into Wordpad I got Packager cannot package empty files, error
by: Tarantulus | last post by:
Hi Guys, I'll keep this short and sweet: class connection{ public $database; public $username; public $password;
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.