473,796 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.ForceNewPage affects all group footers, .Visible does not.

Hi there,

I've got a code sample below from a report from a computer database
that I have built with a printer subtable, which in turn generates a
printer subreport that I'm trying to put on its own page (one page has
hardware, one has software, one if necessary has the printers...not
every machine has a printer).

The subreport is contained within a group footer, which by default has
ForceNewPage set to "None" and Visible set to "Yes".

The code sample follows:

Current_ID = Me.Computer_ID
SQL_Query = "Select Count (Printer_ID) as Printer_Count from
Printers where Attached_To = " & Current_ID
Set recTmp = dbTmp.OpenRecor dset(SQL_Query)
Printer_Count = CLng(recTmp!Pri nter_Count)
Bool_Check = Abs(Printer_Cou nt 0)
Me.Printer_Subr eport_Footer.Vi sible = Bool_Check
Me.Printer_Subr eport_Footer.Fo rceNewPage = Bool_Check

The problem is that the .Visible property works exactly as I intended
it to (i.e. displaying the individual subreport footer if there are
printers for the Computer_ID, and not displaying the subreport footer
if there are no printers for Computer_ID); however, .the .ForceNewPage
property affects ALL of the subreport footers as a whole, rather than
each individual one that I want.

If I remove this line of code, I get a blank page at the end of my
report.

HELP!

Thanks.

Adam
http://www.searchenginefriendlylayouts.com/

Oct 4 '06 #1
2 3422


On Oct 3, 8:54 pm, "SEFL" <a...@searcheng inefriendlylayo uts.comwrote:
Hi there,

I've got a code sample below from a report from a computer database
that I have built with a printer subtable, which in turn generates a
printer subreport that I'm trying to put on its own page (one page has
hardware, one has software, one if necessary has the printers...not
every machine has a printer).

The subreport is contained within a group footer, which by default has
ForceNewPage set to "None" and Visible set to "Yes".

The code sample follows:

Current_ID = Me.Computer_ID
SQL_Query = "Select Count (Printer_ID) as Printer_Count from
Printers where Attached_To = " & Current_ID
Set recTmp = dbTmp.OpenRecor dset(SQL_Query)
Printer_Count = CLng(recTmp!Pri nter_Count)
Bool_Check = Abs(Printer_Cou nt 0)
Me.Printer_Subr eport_Footer.Vi sible = Bool_Check
Me.Printer_Subr eport_Footer.Fo rceNewPage = Bool_Check

The problem is that the .Visible property works exactly as I intended
it to (i.e. displaying the individual subreport footer if there are
printers for the Computer_ID, and not displaying the subreport footer
if there are no printers for Computer_ID); however, .the .ForceNewPage
property affects ALL of the subreport footers as a whole, rather than
each individual one that I want.

If I remove this line of code, I get a blank page at the end of my
report.
I'm not quite sure I follow what you're trying to do here but you may
want to try adding a page break control to your report (or subreport)
and setting its visible property to bool_check rather than setting the
forcenewpage property of your group footer.

HTH,
Bruce

Oct 5 '06 #2
Thanks, dude. That's sort of what I did (although I solved it on
Tuesday).

For those who want to try this themselves, the answer is a little
different than what MS suggests:

1) Put a Page break control at Top 0, Left 0 in the footer itself.
2) Put the subreport overtop of the Page break control.
3) Replace the line in the code sample I posted pertaining to
..ForceNewPage with something like Me.Group_Footer .Page_Break.Vis ible =
Bool_Check (substitute Group_Footer and Page_Break with the names of
your group footer and page break.)

Hope this helps someone at some point.
The page break will be visible and triggered if and only if the footer
itself is visible.

So the code I used below will work, if you use the PageBreak on the
footer itself.

de************* **@gmail.com wrote:
On Oct 3, 8:54 pm, "SEFL" <a...@searcheng inefriendlylayo uts.comwrote:
Hi there,

I've got a code sample below from a report from a computer database
that I have built with a printer subtable, which in turn generates a
printer subreport that I'm trying to put on its own page (one page has
hardware, one has software, one if necessary has the printers...not
every machine has a printer).

The subreport is contained within a group footer, which by default has
ForceNewPage set to "None" and Visible set to "Yes".

The code sample follows:

Current_ID = Me.Computer_ID
SQL_Query = "Select Count (Printer_ID) as Printer_Count from
Printers where Attached_To = " & Current_ID
Set recTmp = dbTmp.OpenRecor dset(SQL_Query)
Printer_Count = CLng(recTmp!Pri nter_Count)
Bool_Check = Abs(Printer_Cou nt 0)
Me.Printer_Subr eport_Footer.Vi sible = Bool_Check
Me.Printer_Subr eport_Footer.Fo rceNewPage = Bool_Check

The problem is that the .Visible property works exactly as I intended
it to (i.e. displaying the individual subreport footer if there are
printers for the Computer_ID, and not displaying the subreport footer
if there are no printers for Computer_ID); however, .the .ForceNewPage
property affects ALL of the subreport footers as a whole, rather than
each individual one that I want.

If I remove this line of code, I get a blank page at the end of my
report.

I'm not quite sure I follow what you're trying to do here but you may
want to try adding a page break control to your report (or subreport)
and setting its visible property to bool_check rather than setting the
forcenewpage property of your group footer.

HTH,
Bruce
Oct 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2174
by: David Pautler | last post by:
I'm creating a web-based authoring tool where one form encompasses several sections for editing. I'd like each section to have its own reset button, so that use of that button affects only that section. I can't find anything in the 4.0 spec about how to do this, and the only mention in this group I found is from 1998 below (CERN blocked my email to Alan). I've tried wrapping each section in its own fieldset, but that had no effect.
2
7158
by: Galina | last post by:
Hello I have a report, which lists records. Each record has money paid field. Money paid can be 0 or not 0. I calculate and print summary of money for a group in the group footer, as well as summary of money for all groups the report footer. When there is at least one record with money >0, group and report footers are appropriate and look OK. When all records are with 0 money, footers look silly. I’d like not to print them. I have placed...
3
1312
by: damjanu | last post by:
Hi all ------------------------------------- This would seem like a problem many people would have, but I couldnt find any posts that suggested a solution to it. ------------------------------------- I've managed to create this amazing report that depending on number of values (if > 1) prints or doesnt print the footer. I use the Me.PrintSection = False, and nothing is printed. Still space that
1
7322
by: David Horowitz | last post by:
Hi folks. I need to create a report that has a Group Header that pulls certain data from the Detail section. It's something like this: +--Report---------------------------------------- | +--Group Header---------------------------------- | | Codes: XYZ, XXX, YYY
1
2574
by: Kenneth | last post by:
Hi, In IE6 you can configure output to the printer getting a clean printout only with content, but without headers and footers. You remove the Header and Footer content from the Page Setup. But when you've done that, you have to know how to get those values back unless you've saved them somewhere for later retrieval. What I need is a way to programmatically print out a page on a printer with only the content and that the next time the user...
1
5950
by: Joao_H | last post by:
I am trying to save and print reports of calculations of a program that make adjustments. Doing that for a Word Document is fine because we can format the text from VB .NET. I have already all the results in a word document, but I would like to put a Header and a Footer and page numbers on the document. However I don’t have the finest idea how to make that!! From VBA I can do that, but the instructions that put Header and Footer...
0
2388
by: Tim Marshall | last post by:
I'm trying to provide my users with a choice to have a page break after the report header of a report. A dialog form, which opens with acDialog in the on open event of the report, has the following line: If Me.chkForwardBreak = -1 Then Reports(strReport).ReportHeader.ForceNewPage = 2 The report is saved without the forcenewpage property set, so it's only whe the user indicates chkForwardBreak as -1 that this fires. Stepping through...
1
13779
by: ramaswamynanda | last post by:
Hello, I am working on an application in MS Access. I have an employee form with an employee charges subform. the subform is supposed to be displayed in the datasheet view. I have put the labels for column headers in the form header, and the charges total in the form footer. What happens is , the header and footer are visible both on the subform and the parent form in design view, but neither appears in run mode. I have gone through every...
5
7743
by: zacks | last post by:
I am having a strange issue with an application written in .NET 2.0. Actually it is in VB.NET but I think my problem is not language specific, but a .NET Framework issue. On a form I have a Combo Box populated with two items. There are two Group Boxes on the form with different sets of controls in each. They both are the same size and are located at the same place. Which Group Box is visible depends on the item selected in the combo box....
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9535
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,...
0
10467
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10244
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 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...
0
10021
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 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...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.