Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print page 1

Status
Not open for further replies.

tgriffin

Programmer
Jan 18, 2001
20
0
0
US
Normally, when something is printed from the web, it displays the current date at the bottom right hand side of the page. The document that I want to print is dynamically generated based on weekly entries input by users and is always more than one page. A new document is created for each week and users are allowed to view past reports at their discretion.

What is the proper way to format a page so that it will print the date that the report was created instead of the current date OR to include the date that the report was created along with the current date; and even the page number. Would this require the document to be exported into a Word template or saved as a pdf file?? Just looking for direction on how to accomplish this task.

Any help would be greatly appreciated!!

Thanks!!
tgriffin
 
I would have a "date created" field in my database so that I would know when a particular record was entered. You could then output that date anywhere on the display page.

If you're wanting to axe the current date, you'd have to do that through the page setup on the user's browser.

I hope this helps. Kevin
slanek@ssd.fsi.com
 
Thanks Kevin. I have that field already and it is printing fine at the top of the first page, but, the concern I have is that most of the time, these documents are multiple pages, containing information from different departments. If Dept A wants to print the document (and I use that term loosely....since it isn't a 'Word' document, yet a web page that contains dynamically generated information based on user input) but will only need to keep, or concentrate on, pages 2 through 7. How do I ensure that the date created will print at the beginning or end of each page? Then I would also like the page numbers to be visible as well.

 
You got me there! You might try inserting &quot;page-break-after&quot; in your code with a <CFOUTPUT> for the date immediately following, but with dynamically created pages it would really be hard. If all the pages, although created dynamically, are basically the same, the page-break-after might be effecive, but if you have NO idea what the pages are going to look like before they're created, I don't think it would work well. Kevin
slanek@ssd.fsi.com
 
I know this might be a really dumb question but how do you do a &quot;page-break-after&quot;?

Cheers,
Duncan
 
It's not a dumb question at all. Let's say you have 2 HTML tables on the same page (they don't have to be tables, they can be anything.) When you print that page, you'll get one table followed by the other, however if you want the tables on separate pages you can:

1. In the <TABLE> tag of the first table put...
Code:
STYLE=&quot;page-break-after:always;&quot;

OR

2. Put page-break-before:always in the second table.

Here's some more info...
Kevin
slanek@ssd.fsi.com
 
Thanks that was very helpful. I must gen up on CSS.

Duncan
 
You can wade through the pile of stuff at W3C and really learn a lot.

Also, there is a great site out there called &quot;A List Apart&quot; that I visit often. Lots of humor, but the information is unbelievably helpful.

Be sure to visit the archived articles. That's where I get some of the best tips and stuff. Kevin
slanek@ssd.fsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top