Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 16th, 2003, 08:36 AM
Authorized User
 
Join Date: Nov 2003
Location: Darwen, , United Kingdom.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default page break

Hi,
Ive created a table that groups together records into a particular order. For printing purposes is it possible to force the system to print each "group" on a seperate sheet of paper, even though it will appear as one list on the screen. Is it is possible can some one tell me how?

many thanks

Reply With Quote
  #2 (permalink)  
Old December 16th, 2003, 08:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , Denmark.
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

Yup, have a look here:
http://p2p.wrox.com/topic.asp?TOPIC_ID=7160

Reply With Quote
  #3 (permalink)  
Old December 16th, 2003, 10:36 AM
Authorized User
 
Join Date: Nov 2003
Location: Darwen, , United Kingdom.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ive tried this, it creates the break after each record. The record are displayed in this format

number name type
1 fred electrical
2 bob electrical
3 ted mechanical
4 geaorge mecahnical
5 ste mechanical

each time the type changes i need this prinitng on a seprate page. Is this possible, or do i have to group the records in a different way on the screen/ within asp

Reply With Quote
  #4 (permalink)  
Old December 16th, 2003, 11:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , Denmark.
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

It certainly is possible - show me your code and I'll fix it for you...

Reply With Quote
  #5 (permalink)  
Old December 16th, 2003, 11:35 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Perhaps you are setting the break after each new "number" which would certainly make it break for every record.

Peter
------------------------------------------------------
Work smarter, not harder.
Reply With Quote
  #6 (permalink)  
Old December 16th, 2003, 12:17 PM
Authorized User
 
Join Date: Nov 2003
Location: Darwen, , United Kingdom.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the code that displays my results

<p class="centered">Below is a list of faulty machines for week <%= week_no %>.<br />Carry out <a class="report" href="maintenance_report.asp">another search</a>.</p>

    <table border="1"align="center" cellspacing="0" cellpadding="2" bordercolordark="#CCCCCC" bordercolorlight="#FFFFFF" width="600">
      <tr>
        <td align="center"><strong>Date</strong></td>
        <td align="center"><strong>Clock No.</strong></td>
        <td align="center"><strong>Shift</strong></td>
        <td align="center"><strong>Machine</strong></td>
        <td align="center"><strong>Fault Type</strong</td>
        <td align="center"><strong>Fault Description</strong</td>
        <td align="center" width="100"><strong>Comment</strong></td>
      </tr>
    <%
       Do While Not RSlist.EOF
    %>
      <tr>
        <td align="center"><%= Rslist("MaintenanceDate") %></td>
        <td align="center"><span class="help" title="<%= Rslist("Initial") %>. <%= Rslist("Surname") %>"><%= Rslist("ClockNo") %></span></td>
        <td align="center"><%= Rslist("Shift") %></td>
        <td align="center"><%= Rslist("MachineNo") %></td>
        <td align="center"><%= Rslist("FaultType") %></td>
        <td align="center"><%= Rslist("Fault") %></td>
        <td align="left"><%= Rslist("Comments") %></td>
      </tr>
      <%
          RSlist.Movenext
        Loop

        Rslist.close
      %>
    </table>
thanks

Reply With Quote
  #7 (permalink)  
Old December 16th, 2003, 12:17 PM
Authorized User
 
Join Date: Nov 2003
Location: Darwen, , United Kingdom.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

forgot to add, ive taken the page break out of this code, so its back to how it began. any help is greatly appreciated

Reply With Quote
  #8 (permalink)  
Old December 16th, 2003, 12:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , Denmark.
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

Code:
<%
dim sLastType
%>
<p class="centered">Below is a list of faulty machines for week <%= week_no %>.<br />Carry out <a class="report" href="maintenance_report.asp">another search</a>.</p>

    <table border="1"align="center" cellspacing="0" cellpadding="2" bordercolordark="#CCCCCC" bordercolorlight="#FFFFFF" width="600">
      <tr>
        <td align="center"><strong>Date</strong></td>
        <td align="center"><strong>Clock No.</strong></td>
        <td align="center"><strong>Shift</strong></td>
        <td align="center"><strong>Machine</strong></td>
        <td align="center"><strong>Fault Type</strong</td>
        <td align="center"><strong>Fault Description</strong</td>
        <td align="center" width="100"><strong>Comment</strong></td>
      </tr>
    <%
       Do While Not RSlist.EOF
        If sLastType <> "" AND sLastType <> Rslist("FaultType") then
            response.write "<tr style=""page-break-before: always;"">"
            sLastType = Rslist("FaultType")
        Else
            response.write "<tr>"
        End if
    %>
      <tr>
        <td align="center"><%= Rslist("MaintenanceDate") %></td>
        <td align="center"><span class="help" title="<%= Rslist("Initial") %>. <%= Rslist("Surname") %>"><%= Rslist("ClockNo") %></span></td>
        <td align="center"><%= Rslist("Shift") %></td>
        <td align="center"><%= Rslist("MachineNo") %></td>
        <td align="center"><%= Rslist("FaultType") %></td>
        <td align="center"><%= Rslist("Fault") %></td>
        <td align="left"><%= Rslist("Comments") %></td>
      </tr> 
      <%
          RSlist.Movenext
        Loop

        Rslist.close
      %>
    </table>
Reply With Quote
  #9 (permalink)  
Old December 16th, 2003, 12:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , Denmark.
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

BTW: I'm assuming your results are sorted by the Fault Type...

Reply With Quote
  #10 (permalink)  
Old December 16th, 2003, 12:37 PM
Authorized User
 
Join Date: Nov 2003
Location: Darwen, , United Kingdom.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes, thats great, thankyou for all your help,

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page break grstad Classic ASP Basics 5 December 31st, 2006 01:27 PM
Page Break Neal Crystal Reports 1 August 31st, 2006 10:33 AM
Page Break Dhawood ASP.NET 2.0 Basics 0 August 8th, 2006 08:02 AM
Page Break chakravarthy_vr Reporting Services 1 June 22nd, 2006 10:16 AM
Page Break aspadda Excel VBA 0 February 9th, 2004 02:36 PM



All times are GMT -4. The time now is 04:09 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.