Solved

Visual Studio Report every other only contain header/footer.

Posted on 2015-02-23
20
151 Views
Last Modified: 2015-03-13
Hello,

I have a slight problem driving me crazy.

I created a form with a report viewer launching a report.

First page is fine, looks fine, prints fine.

Every other page (2,4,6 etc.) is blank apart from the header/footer.

I searched this Google thing and a few suggested that components on the page is too wide, but I've tried resizing everything to just be an inch in the middle with no luck.

Any help would be greatly appreciated.

Thank you
~j
0
Comment
Question by:prosit
  • 11
  • 8
20 Comments
 
LVL 2

Author Comment

by:prosit
ID: 40626161
Oh, another thing, the print preview on the screen does NOT have the blank pages...
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40628158
Which reporting tool?

In Crystal one cause of this is a field that is slightly wider than the available page width.
or a field that is on the right side of the report that extends past the right margin.

mlmcc
0
 
LVL 2

Author Comment

by:prosit
ID: 40628190
Oh sorry, it's in the reportviewer built into VS2013.

And the margin thing isn't it, I moved everything to the middle just to try it and it still does it.

~j
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40628344
Try taking them off 1 by 1 or take all but 1 off and make it only 1 inch wide.

Another thing that might do it is if you have a page setup that is too wide for the printer.
Most printers have a minimum right and left margin.  The minimum is .25" and you set a margin of only .1", it might cause the same issue.

mlmcc
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40628367
Do you have any custom configuration for the layout (rectangles, formulas to hide/show rows, ...), or is it a simple report?
0
 
LVL 2

Author Comment

by:prosit
ID: 40630968
Thank you for the responses, but none of it really worked.  

I decided to recreate the report from scratch and see when things go bad.  On the report query I have three fields that are very narrow on the report and the problem started when I made them smaller.  

So I started looking at the data and those three fields contain NULL values, could that be the problem?  

Just not sure why resizing them makes them freak out...
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40631077
Null values generally don't cause issues like that.  However if the field is set to grow, it will grow vertically which might push a field to the next page.  If the value is NULL it could appear to be a blank page.

mlmcc
0
 
LVL 2

Author Comment

by:prosit
ID: 40631140
i'll try and do a replace on the query and see if that was the problem.
0
 
LVL 2

Author Comment

by:prosit
ID: 40641861
So the NULL is not the problem, even if I only have two fields without header/footer that takes up less than half of the page width it prints every other page blank...

Scratching my head I am...
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40641964
Can you upload the rpt file?

mlmcc
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 2

Author Comment

by:prosit
ID: 40641987
Maybe that's the problem, I don't have rpt files, they're rdlc's... I've added the form and the report.

~j
0
 
LVL 2

Author Comment

by:prosit
ID: 40642172
It won't let me add the rdlc file...

Grab it from www.funchtech.com/reports.zip

tnx
~J
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40642636
I don't have a VS environment so I can't look at an rdlc report file.

The rpt was my fault.  I didn't look up to see you weren't using Crystal.

Is the width of the report too wide for 1 page?
Is there a page view in the report editor?

mlmcc
0
 
LVL 2

Author Comment

by:prosit
ID: 40642876
I tried only grabbing one column and centering it, still does it.
There's a print-preview and in the preview it does not show blank second pages.

The interesting thing is that I took the header and footer out just to make sure, but when they are there it will print the header and footer but not the content.

Very annoying...
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40663114
Check the paper size or the paper selected for the printer.  If you are choosing a page that is too large you might get that effect.  I know Crystal defaults to A4 which is slightly different from the normal letter paper used in the US.  That can sometimes cause some issues.

mlmcc
0
 
LVL 2

Author Comment

by:prosit
ID: 40663390
Maybe a dumb question, but the paper size is fine for every other application...

Where are you suggesting changing it?  On the printer?

Reason I ask, if this is the issue, I will have a problem anyway because the application will be printing on 100's of printers across all over the company.

tnx
~j
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40663464
It would be set in the report.  It may be that the RDLC reports don't have a paper size you can set.

Just trying to figure out why this particular report has an issue.

If you create a new report does it have the same problem?
If not then perhaps just recreating the report will solve the problem

mlmcc
0
 
LVL 2

Author Closing Comment

by:prosit
ID: 40663561
I've changed every possible setting and I finally found it...

It's the body value of the actual report, not the size of the page which I kept thinking was the most logical place for it...

Thank you for getting me in the right direction.

~j
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40663685
Great.  I haven't used that reporting tool (no VS environment) so I didn't know where to look.

mlmcc
0
 
LVL 2

Author Comment

by:prosit
ID: 40663811
At least you got me looking, much appreciated.

Happy Friday
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now