Adding to Group Header

J

Jim

Is it possible to add detail to a Group Header for a report when the group
extends to more than one page?

I am printing 1300 records grouped by Competition number. Some competitions
have so much data that it runs to more than one page. The Group Header is on
Comp Number and forces a new page at each change in Comp Number but where
the data goes to more than one page I would like to 'continued' after the
header detail.

So the header is "Competition 1" - but where it extends to a second page I
would like the header to show "Competition 1 continued"

Any ideas? Many thanks in anticipation.

Jim
 
M

Marshall Barton

Jim said:
Is it possible to add detail to a Group Header for a report when the group
extends to more than one page?

I am printing 1300 records grouped by Competition number. Some competitions
have so much data that it runs to more than one page. The Group Header is on
Comp Number and forces a new page at each change in Comp Number but where
the data goes to more than one page I would like to 'continued' after the
header detail.

So the header is "Competition 1" - but where it extends to a second page I
would like the header to show "Competition 1 continued"


Add a text box named txtLineCount to the Detail section.
Set it expression to =1 and RunningSum property to Over
Group.

Next, add a lable control named lblContinue to the header
section. Set its Caption to "(Continued)" and position it
next to the competition number text box.

Then use a line of code in the header section's Format event
procedure to make the label visible as needed:

Me.lblContinue.Visible = (Me.txtLineCount > 1)
 
G

Guest

Dear Marshall,

I have a report of "Task" records. Each record has a Task number and Task
details, and task date. There may be more than one detail per Task, so there
may be multiple records with the same Task number. The report is grouped
first on Task number, then grouped on date. The task details are printed
in the detail section of the report; the Task number is printed in the Task
group header; and the date is printed in the Date group header. A new page
is forced after each Date group footer. The Tasks for a given date may
extend to a second page. In this case, I would like to print "Continued on
the next page" in the page footer (or Date group header) of the first page of
the Date group. I tried the text box solution you recommended, but the value
increments for each record in the detailed section. I have the text box
RunningSum set to Over Group.

What am I doing wrong. Is the nested grouping the problem. If so, is there
another solution.

Thank You,
Joseph

What
 
M

Marshall Barton

Joseph said:
I have a report of "Task" records. Each record has a Task number and Task
details, and task date. There may be more than one detail per Task, so there
may be multiple records with the same Task number. The report is grouped
first on Task number, then grouped on date. The task details are printed
in the detail section of the report; the Task number is printed in the Task
group header; and the date is printed in the Date group header. A new page
is forced after each Date group footer. The Tasks for a given date may
extend to a second page. In this case, I would like to print "Continued on
the next page" in the page footer (or Date group header) of the first page of
the Date group. I tried the text box solution you recommended, but the value
increments for each record in the detailed section. I have the text box
RunningSum set to Over Group.

What am I doing wrong. Is the nested grouping the problem. If so, is there
another solution.


The nested grouping is getting in the way. An Over Group
running sum text box counts the number of items in the group
containing the section with the text box. In your case, it
is reset for each task group so the date group never gets to
see the total for all the details in a date group.

This is easily overcome by adding another Over Group running
sum text box named txtDateCount to the task group footer
section using the expression =txtLineCount.

Then the code in the page footer can test the value of
txtDateCount against the date group header section's
=Count(*) text box to determine if there is more date group
data to come.
 

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