navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Physically printing results

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Physically printing results
Page: [1]
 
sentinel

 

Posts: 565
Joined: 5/4/2005
From: Chicago, Illinois
Status: offline

 
Physically printing results - 4/18/2008 13:54:13   
Hey all.....

I was asked to create a page that would pull all records for all employee listing within a particular table then print them out individually.

So if my results page looked like this....

Employee One: john Smith

DOB : 02/02/1970

Group: INV

Phone : 555-5555


Employee Two: Jim Shoe

DOB : 02/02/1974

Group: OUTR

Phone : 555-5555


Etc.....


How can I list them on a page so when the user prints them out each record will be on its on sheet of paper?

Any ideas?

_____________________________

No matter where you go, there you are.
rdouglass

 

Posts: 9137
From: Biddeford, ME USA
Status: offline

 
RE: Physically printing results - 4/18/2008 14:06:21   
I use a style like so:

<style>
<!--
.newPage
{
page-break-after: always;
}
-->
</style>

and markup like this:

<div class="newPage">
(stuff for the first page here)
</div>
<div class="newPage">
(stuff for the second page here)
</div>
....


Works quite well for me.


EDIT: Oh yeah, you'll probably need to break them out of a single table and put them in their own.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to sentinel)
sentinel

 

Posts: 565
Joined: 5/4/2005
From: Chicago, Illinois
Status: offline

 
RE: Physically printing results - 4/18/2008 14:13:15   
Excellent...

So I can then incorporate them into my database results so the <div class="newPage"> will just continually loop through?

This is great... Thanks!

_____________________________

No matter where you go, there you are.

(in reply to rdouglass)
sentinel

 

Posts: 565
Joined: 5/4/2005
From: Chicago, Illinois
Status: offline

 
RE: Physically printing results - 5/1/2008 11:13:34   
Rdouglass....

I was trying to use your new page style but am having some difficulty. I created a DRW that simply lists the users in my users table. Instead of getting one user per page i still get them all on it. Can you please take a look at my code and let me know where I am messing up?

<html>
<head>
<title>user test</title>
<style> 
<!-- 
.newPage 
{ 
page-break-after: always; 
} 
--> 
</style> 
</head>

<body>


<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<script type="text/javascript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</script>
<% end if %>
<%
fp_sQry="SELECT * from users"
fp_sDefault=""
fp_sNoRecords=""
fp_sDataConn="ncc"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes=""
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<div class="newPage"> 
<table>
<tr>
<td><%=FP_FieldHTML(fp_rs,"username")%> </td>
<td><%=FP_FieldHTML(fp_rs,"x_Firstname")%> </td>
<td><%=FP_FieldHTML(fp_rs,"x_Lastname")%> </td>
</tr></table>
</div> 
<!--#include file="_fpclass/fpdbrgn2.inc"-->


</body>
</html>



Thanks!

_____________________________

No matter where you go, there you are.

(in reply to sentinel)
rdouglass

 

Posts: 9137
From: Biddeford, ME USA
Status: offline

 
RE: Physically printing results - 5/1/2008 12:12:22   
quote:

Instead of getting one user per page i still get them all on it.


They should display on the screen as on 1 page but they should print on individual pages. Did you try a Print Preview?

I just confirmed the syntax on IE7 and it works for me just fine. I don't see any problems with your code so I'm kinda' at a loss at the moment.

Or are you trying to display them on the screen 1 page at a time?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to sentinel)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Physically printing results
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts