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

Posted on 2009-02-19
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
    LVL 75

    Accepted Solution

    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

    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
    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

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Android App Development

    This course will involve creating widgets, customize list view, grid view, spinners, etc. Creating applications using audio, video, and SQLite database. Ending with publication on Google Play.

    Suggested Solutions

    I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    759 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

    9 Experts available now in Live!

    Get 1:1 Help Now