Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Visual Studio Report every other only contain header/footer.

Posted on 2015-02-23
20
Medium Priority
?
172 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 101

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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 101

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 101

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 101

Expert Comment

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

mlmcc
0
 
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 101

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 101

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 101

Accepted Solution

by:
mlmcc earned 2000 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 101

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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
Progress

704 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