Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems Printing Combined subreports?

Status
Not open for further replies.

trustmefada

Technical User
Jun 26, 2007
14
US
I have combined 4 different reports into a blank report to be printed on seperate pages. I have successfully been able to get them all to appear on different pages but after each page there is a blank page so the order looks like this:

>>report1>>blankpage>>report2>>blankpage>>report3>>blankpage>>report4

I have remove any and all pagebreaks I could find and I also removed all headers/footers from all subreports and the report itself (which brought the blank pages down from 2 in between to 1 inbetween as shown above). Any ideas or suggestions please?
 
is your report wider than the margins of the paper?

--------------------
Procrastinate Now!
 
is there a page break in there somewhere, or against a sub reports property?

--------------------
Procrastinate Now!
 
What are your:
[blue]Paper width:
Report width:
Left Margin:
Right Margin:[/blue]

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I looked through all the properties of the subreport and I didn't find any page breaks. I removed all hints of a page break.
 

Paper width: 8.5"
Report width: 7.875"
Left Margin: .25"
Right Margin: .25"

 
Subreports don't support any type of "page" events or properties. It looks like your margins are within acceptable limits as long as your printer supports printing within .25" of the edges of your paper.

I would try set the background colors of various sections of the main and subreports to see what might be causing the issue.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
OK...I filled the background with orange on the first subreport. After viewing the print preview only the 1st page containing the first subreport had the orange background and the blank page after it was plain white. (btw...good idea, thanks for the logic)
 
Did you also try color the other subreports?
You might want to try add code to your report to display the "grown" height of various subreports. You would need code in the On Print event of the main report like:
Code:
Me.CurrentX = 0
Me.CurrentY = 0
Me.Print Me.subrptControl1.Height

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I added color to the other reports and no difference. How do I get the code to work? I have never used code in Access before.
 
The problem is fixed now. I just started over from the start and got an error message after attempting to print that said:

"The section width is greater than the page width, and there are no items in the additional space, so some pages may be blank.

For example, the report width may be wider then the page width."

I fixed this by placing the subreports directly above and below each other and making the page the exact size of the subreports.

Thanks all.

 
I kinda non-code method would be to add an expression to the On Format and On Print properties of the section of the main report containing the subreport(s). For instance if your main report name is "rptLargeMemo" and your subreport control name is "srptMemo" then you could update these property values:

On Format: =MsgBox("Format Height: " & [Reports]![rptLargeMemo]![srptMemo].[Height])

On Print: =MsgBox("Print Height: " & [Reports]![rptLargeMemo]![srptMemo].[Height])

The first msgbox will display the format/design height. The second msgbox will display the "grown" height.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top