[Last Call] Learn how to a build a cloud-first strategyRegister Now


How can I ensure that all the columns in my reports fit on the page when printed via CSS?

Posted on 2009-02-19
Medium Priority
Last Modified: 2013-12-25
I have some reports that have about 16 columns. How can I ensure that all the columns in these reports show on the printed page?

I have included <a href="javascript:window.print()">Print this page</a>  on each page since the pages are in a frame.

I also know that I have to set the syntax <link rel="stylesheet" href="css/my_print.css" type="text/css" media="print" />

What must I have in my_print.css to ensure that the columns of my reports always print on the printed page?

Thank you
Question by:DeMyu
  • 2
  • 2
LVL 75

Accepted Solution

Michel Plungjan earned 2000 total points
ID: 23690212
There is nothing you can do in CSS to ENSURE something will print

What you can do is to make the colums 6% wide and they should ATTEMPT to print depending on the width of the content

Author Comment

ID: 23690602
The columns are created via the Gridview control in ASP.NET. I have seen applications that have more columns that mine and I had no problems printing the reports. Surely, there has to be a solution to this problem.
LVL 75

Expert Comment

by:Michel Plungjan
ID: 23691726
If the font-size is small enough and the orientation of the page is correct, your are right.

But CSS cannot decide if something is small enough for you. YOU have to decide

Author Comment

ID: 23743624
I am still not sure on how to proceed with this issue.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month18 days, 9 hours left to enroll

825 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