Keep to One Page

  • Thread starter Thread starter Bryan Hughes
  • Start date Start date
B

Bryan Hughes

Hello,

I have a report that has several subreports. the final subreport is in the
detail section of the main report. I need to keep the report to one page.
How can I format the report, that If it is more then one page, it will trim
the records down in the subreport, so It can fit on one page?

-Bryan
 
Without knowing more details about how dynamic the number of records are in
all reports, you may need to check the recordsource queries prior to opening
and then calculate the number of records you will allow on each report. If
only one report might have a dynamic number of records, you can base the
report on a query using the TOP predicate.
 
Duane,

The main report is set to only one CaseFileID
The first subreport Selects the top 1 related to casefileID
The second subreport Selects top 1 related to casefileId
The third subreport selects all Clients related to CaseFileID (Can be one
and up)
The fourth and final subreport selects all Change in Status related to
CaseFileID. It is set desc by date, so the most current date is always on
top.

The fourth subreport is the one I would like to trim to always keep report
to One page.

The third subreport will determine how many records can fit in the fourth
subreport. Is this possible, or should I just set the Query for the fourth
subreport to select top 10 or something like that?

-Bryan
 
Bryan said:
The main report is set to only one CaseFileID
The first subreport Selects the top 1 related to casefileID
The second subreport Selects top 1 related to casefileId
The third subreport selects all Clients related to CaseFileID (Can be one
and up)
The fourth and final subreport selects all Change in Status related to
CaseFileID. It is set desc by date, so the most current date is always on
top.

The fourth subreport is the one I would like to trim to always keep report
to One page.

The third subreport will determine how many records can fit in the fourth
subreport. Is this possible, or should I just set the Query for the fourth
subreport to select top 10 or something like that?

Here's an off the wall idea that might just work in your
situation?!

Place code in the subreport's Format event to check if the
detail will be too far down the page and cancle it if it is.

If Me.Top > 9 * 1440 Then ' 9 inches from top of page
Cancel = True
End If

you'll have to play around with it to determine how far is
too far. Good luck,
 
Back
Top