Recently, many people on the Forum mentioned that the problem of Web-based report printing is very hot.
I am willing to share some tips with you.
This method can be used to generate HTML languages regardless of language (ASP, ASP. NET, JSP, PHP.
In fact, it is very simple as long as you understand HTML and CSS, and the effect of printing (it depends on yourself) I personally think that general printing can fully cope.
First, a simple and practical method (you can print multiple pages, control pages, and hide non-print items) is provided)
<! -- Save language independence as. HTML -->
<Html>
<Head>
<Title> Report </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<! -- Media = print this attribute can be valid during printing -->
<Style media = print>
. Noprint {display: none ;}<! -- Hide non-print items when printing with this style -->
. PageNext {page-break-after: always ;}<! -- Control pagination -->
</Style>
<Style>
. Style_td
{
Border-bottom: 1 solid #000000;
Border-left: 1 solid #000000;
Border-right: 0 solid # ffffff;
Border-top: 0 solid # ffffff;
}
. Style_tab
{
Border-color: #000000 #000000 #000000 #000000;
Border-style: solid;
Border-top-width: 2px;
Border-right-width: 2px;
Border-bottom-width: 1px;
Border-left-width: 1px;
}
. NOPRINT {
Font-family: "";
Font-size: 9pt;
}
</Style>
</Head>
<Body>
<Center class = "Noprint">
<P>
<OBJECT id = WebBrowser classid = CLSID: 8856F961-340A-11D0-A96B-00C04FD705A2 height = 0 width = 0>
</OBJECT>