Solved

Spacing and margin issue

Posted on 2007-04-02
4
257 Views
Last Modified: 2013-11-26
We are trying to get this Permit Report to take up as much space on an 11X17 paper while showing all of the data.  The only way to get it to come close is to print from Internet Explorer at 125% in Print Preview but a Manager wants to see if we can use even more of the paper.  We have tried different table width and center settings along with margins settings in the IE browser and we are getting close.  The code for the whoe report is listed below.  Any assistance offered would be greatly appreciated.

<%@ Register TagPrefix="uc1" TagName="Header" Src="../Header.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="PermitStatusRpt.aspx.vb" Inherits="SMITHNet.PermitRpt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML >
      <HEAD>
            <title>Permit Status Report</title>            
            <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
            <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
            <meta name="vs_defaultClientScript" content="VBScript">
            <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">                  
            <style>
                  .tdHeader
                  {
                        font-size:12;
                        font-family:verdana,arial;
                        font-weight:bold;
                        padding:6px;
                  }
                  .tdJobName
                  {
                        font-size:13;
                        color:maroon;
                        font-family:verdana,arial;
                        font-weight:bold;
                        padding:6px;
                  }
                  .tdProjectDesc
                  {
                        font-size:11;
                        color:navy;
                        font-family:verdana,arial;
                        font-weight:bold;
                        padding:6px;
                  }
                  .tdComments
                  {
                        font-size:9;
                        font-family:verdana,arial;
                        font-weight:bold;
                        padding:6px;
                  }      
                  .tdData
                  {
                        font-size:9;
                        font-family:verdana,arial;
                        padding:6px;
                  }                  
            </style>      
      </HEAD>
      <body leftmargin="0" topmargin="0" bgcolor="#FFFFFF">
      <%If sErr <> "" Then%>
            <table width="1152" align="center" cellpadding="0" cellspacing="0">
                  <tr><td><font size="3" color="red"><b>ALERT!</b></font> <%= sErr%></td></tr>
            </table>
      <%End If%>
      <table align="center" width="1224px" height="792px" cellpadding="0" cellspacing="36">
      <tr><td>
            <table width="1152" cellpadding="0" cellspacing="0" border="2">
            <tr><td>
            <table width="1146" cellpadding="0" cellspacing="0" border="0">
                  <tr>
                        <td nowrap height="50" >
                        <%If sPJNameID <> "" Then%>
                              &nbsp;&nbsp;Project:&nbsp;<b><%= sProjectName%></b>
                        <%End If
                        If sProjNum <> "" Then%>
                              &nbsp;&nbsp;&nbsp;&nbsp;Job #:&nbsp;<b><%= sProjNum%></b>
                        <%End If
                        If sPSJobNum <> "" Then%>
                              &nbsp;&nbsp;&nbsp;&nbsp;Job:&nbsp;<b><%= sJobName%></b>
                        <%End If
                        If sProjectDesc <> "" Then%>
                              &nbsp;&nbsp;&nbsp;&nbsp;<b><%= sProjectDesc%></b>
                        <%End If%>
                        </td>                              
                  </tr>
            </table>
            </td></tr></table>
            <%If dtItems.Rows.Count > 0 Then%>
                  <table width="1152" cellpadding="0" cellspacing="0" border="1">
                        <tr>
                              <td width="150" class="tdHeader">Permit Type</td>
                              <td class="tdHeader">Agency</td>
                              <td class="tdHeader">Permittee</td>
                              <td class="tdHeader">Submitted</td>
                              <td class="tdHeader">RAI Rcv'd</td>
                              <td class="tdHeader">RAI Resubmitted</td>
                              <td class="tdHeader">Permit #</td>
                              <td class="tdHeader">Issued</td>
                              <td class="tdHeader">Expires</td>
                              <td class="tdHeader">SMITH
Certified</td>
                              <td class="tdHeader">Full Certification</td>                              
                        </tr>            
                       
                        <%For i = 0 to dtItems.Rows.Count - 1
                              dRow = dtItems.Rows(i)%>
                              <%If sProjectName <> dRow("Project").ToString().Trim() Then                                    
                                    sProjectName = dRow("Project").ToString()
                                    nRowsThisPage += 1%>
                                    <tr>
                                          <td colspan="11" class="tdJobName"><%= sProjectName%></td>
                                    </tr>
                              <%End If%>
                              <%If sProjectDesc <> dRow("ProjectDesc").ToString() Then                                    
                                    sProjectDesc = dRow("ProjectDesc").ToString()
                                    nRowsThisPage += 1%>
                                    <tr>
                                          <td colspan="11" class="tdProjectDesc">&nbsp;&nbsp;&nbsp;&nbsp;<%= sProjectDesc%></td>
                                    </tr>
                              <%End If%>
                              <%nRowsThisPage += 1%>
                              <tr>
                                          <td width="150" class="tdData"><%= GetFldVal(dRow, "PermitType", "S")%></td>
                                          <td class="tdData"><%= GetFldVal(dRow, "Agency", "S")%></td>
                                          <td class="tdData"><%= GetFldVal(dRow, "Permittee", "S")%></td>
                                          <td class="tdData"><%= GetFldVal(dRow, "Submitted", "D")%></td>
                                          <td class="tdData"><%= GetFldVal(dRow, "RAIReceived", "D")%></td>
                                          <td class="tdData"><%= GetFldVal(dRow, "RAIResubmitted", "D")%></td>
                                          <td class="tdData"><%= GetFldVal(dRow, "PermitNum", "S")%></td>
                                          <td class="tdData"><%= GetFldVal(dRow, "Issued", "D")%></td>
                                          <td class="tdData"><%= GetFldVal(dRow, "Expires", "D")%></td>
                                          <td align="center" class="tdData"><%= GetFldVal(dRow, "SMITHCertified", "D")%></td>
                                          <td align="center" class="tdData"><%= GetFldVal(dRow, "FullCert", "D")%></td>                                                                        
                              </tr>
                              <%If sCustCopy <> "1" Then%>
                                    <%sNotes = dRow("Notes").ToString()
                                    If sNotes <> "" Then
                                          nRowsThisPage += 1%>
                                          <tr>
                                                <td width="150" valign="top" class="tdComments">Submittal Comments:</td>
                                                <td colspan="10" class="tdData"><%= sNotes%></td>
                                          </tr>
                                    <%End If%>
                                    <%sNotes = dRow("CertNotes").ToString()
                                    If sNotes <> "" Then
                                          nRowsThisPage += 1%>
                                          <tr>
                                                <td width="150" valign="top" class="tdComments">Certification Comments:</td>
                                                <td colspan="10" class="tdData"><%= sNotes%></td>
                                          </tr>
                                    <%End If%>
                                    <%sNotes = dRow("Comments").ToString()
                                    If sNotes <> "" Then
                                          nRowsThisPage += 1%>
                                          <tr>
                                                <td width="150" valign="top" class="tdComments">Expiration Comments:</td>
                                                <td colspan="10" class="tdData"><%= sNotes%></td>
                                          </tr>
                                    <%End If%>
                                    <tr  height="1"><td colspan="11" height="1" background="images/GrayPixel.jpg" ><img src="images/Spacer.gif" border="0"></td></tr>
                              <%End If%>
                              <%If nRowsThisPage >= nRowsPerPage  Then
                                    nRowsThisPage = 0%>                              
                                          </table><p style="page-break-before: always">&nbsp;</p><table width="1152" cellpadding="0" cellspacing="0" border="1">                                          
                                          <tr>
                                                <td width="150" class="tdHeader" height="50">Permit Type</td>
                                                <td class="tdHeader">Agency</td>
                                                <td class="tdHeader">Permittee</td>
                                                <td class="tdHeader">Submitted</td>
                                                <td class="tdHeader">RAI Rcv'd</td>
                                                <td class="tdHeader">RAI Resubmitted</td>
                                                <td class="tdHeader">Permit #</td>
                                                <td class="tdHeader">Issued</td>
                                                <td class="tdHeader">Expires</td>
                                                <td class="tdHeader">SMITH Certified</td>
                                                <td class="tdHeader">Full Certification</td>                                                
                                          </tr>                                                
                              <%End If                              
                        Next%>
                        </table>
                  <%Else%>
                        <table width="1152" cellpadding="0" cellspacing="0" border="2">
                              <tr><td class="tdHeader">No records were found.</td></tr>
                        </table>
                  <%End If%>
            </table>
      </td></tr>            
      </table>      
      </body>
</HTML>
0
Comment
Question by:regsamp
[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
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
NickVd earned 500 total points
ID: 18839171
If you need accuracy on screen -- css can help. If you need accuracy on paper -- pdf is king.

I would generate the report using a pdf library for the language you are using, or you could use one of the many html2pdf converters that are available.  It will be MUCH easier to control the print output using PDF as opposed to HTML/CSS
0
 

Author Comment

by:regsamp
ID: 18839263
NickVD, an converter is a good idea but a deadline is almost up and just trying to go through this page and see if anyway just to work with the coding and browser to get it as large and readable on 11x17.  In the long run though it seems the way to go.  
0
 

Author Comment

by:regsamp
ID: 18839955
I got what I needed by mainly just trial and error with the margins and the report looks good but since you responded NickVD and I liked the idea about a converter, I am giving you the points.  
0
 
LVL 5

Expert Comment

by:NickVd
ID: 18841151
Thank you very much, I appreciate it :)

If you need any further help, you know where to find me :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
GET INFO ABOUT WHAT THE PRINTER IS DOING ? 11 77
emailing registered email addresses in phpmyadmin 5 71
CSS background-color 5 21
Phone number mask 4 16
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

710 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