Re: Excluding Report Sections
- From: "George Nicholson" <JunkGeorgeN@xxxxxxx>
- Date: Thu, 15 Dec 2005 19:25:48 -0600
This is just a general idea and is fairly short on specifics, but maybe it
will give you some conceptual ideas that you can execute:
If you have anything like a "Table of Contents" table that lists your
Section/Attachment options, you could add a T/F field called "Print?" to
that (and if you don't have such a table, maybe you should?).
Then, you'll need some sort of interface that would:
- Set Print? to True for all sections, etc. upon opening (I assume this
would be the default)
- Allow the user to de-select items as they wish, which would set Print?
- (Open the report?)
In the query that your report is based on, add the Print? field.
You'd then need to add code to your report that would react appropriately to
the value of Print? for each section/attachment, etc. Hard to say exactly
where this code would go without more specifics, but it'll probably be the
Format event of Header section(s) and/or the Detail section. Ex:
If Me.[Print?] = False Then
Me.txtTitleTextBox = "RESERVED"
Me.txtTitleTextBox = rs!Title
Alternatively (and much easier if it works for your report setup), you may
be able to do most of what you need in the report query, without adding code
to the report. For instance, If you have a field in your query called Title
that you want to change if Print? = False:
Title: IIf([Print?], SourceTable.Title,"RESERVED")
That way the proper value would, for each record, automatically go into any
text box on your report that already uses Title as the ControlSource.
Remove 'Junk' from return address.
"Zachry1" <Zachry1@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> Working on a contract generating program. I have a table of contents
> many articles (1-20) and attachments (A-M).
> On some contracts all articles apply, on others i need to select which
> I use Text boxes in the report so I can have the article text and include
> another field, such as effective _date, for example.
> The problem i want to solve is:
> 1. How do i allow the user to select in the report which sections to
> 2. If a section is excluded, I need to replace its title in the table of
> contents to RESERVED
> 3. Then the article section within the contract replace the standard
> with the word RESERVED.
- Prev by Date: Report problem with converting standard calendar to 4-5-4 calendar.
- Next by Date: Re: Trouble with Sum on Report
- Previous by thread: Report problem with converting standard calendar to 4-5-4 calendar.
- Next by thread: Re: Excluding Report Sections