Forum Moderators: open
I have a unusual question. I dont whether it is possible or not but i would
like to hear suggestions from you guys.
I have a asp page which displays the search results from the database as follows:
700 Informations Systems
EmployeeName¦ Benefit¦Earned¦Used¦Remaining
___________________________________________
John ¦PDO ¦34.00¦ 10.00¦24.00
Kyle ¦PDO ¦234.00¦134.00¦100.00
712 Engineering Department
EmployeeName¦ Benefit¦Earned¦Used¦Remaining
___________________________________________
Mike ¦PDO ¦24.00¦ 10.00¦14.00
Kyle ¦PDO ¦34.00¦14.00¦20.00
Walton ¦PDO ¦26.00¦16.00¦10.00
634 Business Office
EmployeeName¦ Benefit¦Earned¦Used¦Remaining
___________________________________________
Mary ¦PDO ¦34.00¦ 10.00¦24.00
Chris ¦PDO ¦234.00¦134.00¦100.00
And the list goes on for all the departments in the company. And of course
we have more people in each department then i showed above.
My question is- Can I implement a print function or some other alternative function which when invoked prints the documents by department. i mean can i write a function which breaks the page after each department. I just want all the records of different departments to be printed on different pages. Even if the records of any department are supposed to fit more than one page say one and half page, the print function to print one and half pages and make a page break and start printing the next department records on the next page.
Can this be done? Any suggestions?
Thanks in advance.
VJ
CSS:
<style type="text/css">
pre {font-size : 8pt;}
</style>
<style type="text/css" media="print">
@page {size: landscape; }
.page {page-break-after: always;}
.lastpage {page-break-after: avoid;}
</style>
HTML:
<p class="page"><pre>
a page of content goes here....
</pre></p>
<p class="page"><pre>
and another page here.....
</pre></p>
I used a freebie control to bring the page up in print-preview mode so the user can page through one page at a time, choose to print a range of pages, etc. Sticky me if you need the name of the control vendor...
Ross