views:

23

answers:

1

Hi,

We have a report in MS Access 2003 that changed depending of the user selection. It shows stats for days from 1 to 7 seven days. Now, when we have the whole 7 days, we need a full length legal paper, landscape format. However, when we display 5 or less days, we don't need that much space, so we would like to switch to letter format. That works OK, meaning the paper format do change, but the size of the report seems to be stuck at the legal paper size so it always prints a blank page after, which is really annoying. We tried changing the report width (using me.Width and event Report!Width in a form), but it doesn't seem to make much of a difference.

Anyone can help me on that one ?

Thanks

+1  A: 

I am not sure when you are changing the width but i think you need to open the report in design mode, edit the width and then output it. If you know the width you require before you run the report you could try something like this:

DoCmd.OpenReport "ReportName", acViewDesign

Reports("ReportName").Width = 5000

DoCmd.OpenReport "ReportName", acViewNormal
Croberts
Tried it and it didn't work. However, if I save it then it works.. somehow. Now I only have to devise a function that will move out the controls that prevent the report to get smaller, because it seems that if there is a control in the way, it won't size down past it. Still, you put me on the right track.
David Brunelle