views:

383

answers:

1

Hi,

I'm using the report viewer control included in Visual Studio 2005 and something odd is happening; when I set the margins on the report and I run the application the report viewer adds a page break after each content page, so if I have 2 content pages I end up having 4 pages of which 2 of them are blank pages.

If I set the margins of the report as zero then the report displays ok but of course it doesn't look good without the margins (and won't print properly)

I'm pretty sure the content is not wrapping or something that could cause this since I intentionally designed the tables to fit in 6 inches so, 6 inches plus 2 (one for each side margin) are 8 and I still have half an inch of space there so things don't mess up since this is in letter size which is 8.5" x 11"

Anybody has had this same behavior?

Thanks in advance.

+1  A: 

Found the solution, turns out that the body should not be wider than the report size so for example if you have a standard letter page: 8.5" x 11" than the body should be less than 8.5, pay special attention if you have margins since you have to subtract those inches too, I want a one inch margin per side so left and right would sum up two inches:

8.5 - 2 = 6.5

So if you plan to have a letter report with one inch margins make sure the body is 6.5 at the most then it would fit.

Pretty obvious huh? but I did not figured it out at the beginning since the report viewer designer does not have any rulers to mark the beginning of the body, only for the report.

Gustavo Rubio