Multiple Detail sections?

J

Joel Wiseheart

I need to be able to group four sections of a report in
the following fashion:

Header

Group 1 Header
Group 1 Detail
Group 1 Footer

Group 2 Header
Group 2 Detail
Group 2 Footer

Group 3 Header
Group 3 Detail
Group 3 Footer

Group 4 Header
Group 4 Detail
Group 4 Footer


Access seems to only want to group the information this
way:

Header

Group 1 Header
Group 2 Header
Group 3 Header
Group 4 Header
Detail
Group 4 Footer
Group 3 Footer
Group 2 Footer
Group 1 Footer

Is there any way to get multiple "Detail" sections like
the first example?

Thanks!
 
M

MGFoster

Joel said:
I need to be able to group four sections of a report in
the following fashion:

Header

Group 1 Header
Group 1 Detail
Group 1 Footer

Group 2 Header
Group 2 Detail
Group 2 Footer

Group 3 Header
Group 3 Detail
Group 3 Footer

Group 4 Header
Group 4 Detail
Group 4 Footer


Access seems to only want to group the information this
way:

Header

Group 1 Header
Group 2 Header
Group 3 Header
Group 4 Header
Detail
Group 4 Footer
Group 3 Footer
Group 2 Footer
Group 1 Footer

Is there any way to get multiple "Detail" sections like
the first example?

Thanks!

Subreports.

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
 
J

Joel Wiseheart

-----Original Message-----


Subreports.

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

.
I've tried that. I get an error pertaining to the bottom
section: Error number 2100: The control or subform control
is too large for this location.

Somehow, I need to get this subreport to continue onto the
next page, if it hits the bottom.

Since the number of records in the detail sections can
vary, the size of the subreport grows or shrinks with it.
 
L

Larry Linson

I've tried that. I get an error pertaining to the bottom
section: Error number 2100: The control or subform control
is too large for this location.

Somehow, I need to get this subreport to continue onto the
next page, if it hits the bottom.

Since the number of records in the detail sections can
vary, the size of the subreport grows or shrinks with it.

Have you set all the Subreport Controls' CanGrow and CanShrink property to
Yes? Have you set the main Report's Detail Section's CanGrow and CanShrink
property to Yes? Have you then squeezed the Subreport Controls in Design
View so they all fit on the Page?

When is it that you are getting Error 2100? In Design View or at Runtime?

Larry Linson
Microsoft Access MVP
 
J

Joel Wiseheart

-----Original Message----- it.

Have you set all the Subreport Controls' CanGrow and CanShrink property to
Yes? Have you set the main Report's Detail Section's CanGrow and CanShrink
property to Yes? Have you then squeezed the Subreport Controls in Design
View so they all fit on the Page?

When is it that you are getting Error 2100? In Design View or at Runtime?

Larry Linson
Microsoft Access MVP
Larry,
It happens at run-time. In my initial attempt using
subreports, I would align the sections like:

With Me
!sr_MRRDisposition.Top = !sr_MRRDefects.Top + !
sr_MRRDefects.Height
!sr_MRRCA.Top = !sr_MRRDisposition.Top +
sr_MRRDisposition.Height
End With

The forms need to align with sr_MRRDefects on the top,
sr_MRRDispositions in the middle and sr_MRRCA on the
bottom. This code works fine for aligning the
sr_MRRDisposition subreport, but gives an Error 2100 run-
time error for the sr_MRRCA report. I found this out for
two reasons:

- The second section aligns properly, but the third
doesn't.
- The run-time error does not occur if I leave the first
statement in, and 'remark out' the second.

I checked all the CanGrow & CanShrink propreties. They're
okay.

The only other contributing factor is that under this
scenario, the bottom section also runs into the bottom of
the page. I need it to continue on to the next sheet in
this case. I don't know if that has to do with it or not.

The ponderous thing is that it draws the last subreport
control okay, with no errors, if I remark out the second
statement. It's not until I try to change the Top
property that it gives an error.

Thanks for your help,
Joel Wiseheart
 
G

Guest

-----Original Message----- it.

Have you set all the Subreport Controls' CanGrow and CanShrink property to
Yes? Have you set the main Report's Detail Section's CanGrow and CanShrink
property to Yes? Have you then squeezed the Subreport Controls in Design
View so they all fit on the Page?

When is it that you are getting Error 2100? In Design View or at Runtime?

Larry Linson
Microsoft Access MVP
One other thing I forgot to mention...Each time the
report is run, the height of each section may vary.
 
J

Joel Wiseheart

-----Original Message-----
onto
the
Larry,
It happens at run-time. In my initial attempt using
subreports, I would align the sections like:

With Me
!sr_MRRDisposition.Top = !sr_MRRDefects.Top + !
sr_MRRDefects.Height
!sr_MRRCA.Top = !sr_MRRDisposition.Top +
sr_MRRDisposition.Height
End With

The forms need to align with sr_MRRDefects on the top,
sr_MRRDispositions in the middle and sr_MRRCA on the
bottom. This code works fine for aligning the
sr_MRRDisposition subreport, but gives an Error 2100 run-
time error for the sr_MRRCA report. I found this out for
two reasons:

- The second section aligns properly, but the third
doesn't.
- The run-time error does not occur if I leave the first
statement in, and 'remark out' the second.

I checked all the CanGrow & CanShrink propreties. They're
okay.

The only other contributing factor is that under this
scenario, the bottom section also runs into the bottom of
the page. I need it to continue on to the next sheet in
this case. I don't know if that has to do with it or not.

The ponderous thing is that it draws the last subreport
control okay, with no errors, if I remark out the second
statement. It's not until I try to change the Top
property that it gives an error.

Thanks for your help,
Joel Wiseheart
Okay, I found the answer to my problem, if anyone else is
watching this thread. From the VB help:

"When you open a form based on an underlying query,
Microsoft Access runs the underlying query for the form
before it runs the Open macro or event procedure.
However, when you open a report based on an underlying
query, Microsoft Access runs the Open macro or event
procedure before it runs the underlying query for the
report."

....and...

"When you first open a form, the following events occur
in this order:

Open Þ Load Þ Resize Þ Activate Þ Current"

The problem was that I was trying to relocate the form
sections during the Open event, at which point the
underlying query had not run yet. By moving the code to
the Activate event, it now works as expected.

Whew! 3 days before my deadline...glad I figured that one
out!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top