Most people associate HTML/CSS with browsers, but I promote it for reports
and statements, too. Following is a template for one of our reports, picked
at random:
Note settings such as page size and orientation, margins, and page-break
attributes.
Our report programs are structured much like any other that might generate
spool files. But they generate IFS stream files, instead. Which are
optionally transformed into PDF stream files by a Java utility that runs
under IBM i.
Our reports might NOT ever be viewed in a browser. PDFs are often emailed
to customers. They might be sent automatically to PDF capable printers.
<!RECORD:BEGRPT>
<html>
<head>
<style>
@import url("/rdweb/apps/common/stylesheets/reports.css");
@page {
margin:.5in .5in .5in .5in;
size:letter portrait;
@top-center {
content: element(header);
vertical-align:bottom;
}
}
table {
page-break-inside:avoid;
border-collapse:collapse;
}
hr {
color:#cb8d49;
background-color:#cb8d49;
width:100%;
height:.05in;
width:7.5in;
border:none;
margin:3px 0px;
}
.error {
color:#FFF;
background-color:#C2452D;
}
</style>
</head>
<body>
<div class="pagehead">
<table class="port">
<tr class="title bold">
<td>Enrollment Report</td>
<td class="right">{{dt}}</td>
</tr>
</table>
</div>
<!RECORD:ERR01>
<hr />
<table class="port">
<tr class="error">
<td>Error: <strong>{{msg}}</strong></td>
</tr>
</table>
<!RECORD:STU01>
<hr />
<table class="port">
<tr class="{{color}}">
<td>Student: <strong>{{name}}</strong></td>
<td>ID: <strong>{{sid}}</strong></td>
<td>Phone: <strong>{{home}}</strong></td>
</tr>
<!RECORD:ADDR01>
<tr class="{{color}}">
<td>Address: <strong>{{address}}</strong></td>
<td colspan="2">Address Type: <strong>{{type}}</strong></td>
</tr>
<!RECORD:USER01>
<tr class="{{color}}">
<td>User ID: <strong>{{user}}</strong></td>
<td colspan="2">Password: <strong>{{pass}}</strong></td>
</tr>
<!RECORD:PAR01>
<tr class="{{color}}">
<td>Parent: <strong>{{name}}</strong></td>
<td colspan="2">Relationship: <strong>{{relation}}</strong></td>
</tr>
<tr class="{{color}}">
<td>E-mail: <strong>{{email}}</strong></td>
<td>Cell: <strong>{{cell}}</strong></td>
<td>Work: <strong>{{work}}</strong></td>
</tr>
<!RECORD:STU02>
<tr class="{{color}}">
<td>School: <strong>{{school}}</strong></td>
<td colspan="2">Graduation Year: <strong>{{grad}}</strong></td>
</tr>
<tr class="{{color}}">
<td>In Rankings: <strong>{{rank}}</strong></td>
<td colspan="2">Ed. Plan Template: <strong>{{edplan}}</strong></td>
</tr>
<tr class="{{color}}">
<td>Status: <strong>{{status}}</strong></td>
<td colspan="2">As of: <strong>{{dt}}</strong></td>
</tr>
</table>
<!RECORD:ENDRPT>
</body>
</html>
On Thu, Mar 19, 2015 at 11:42 AM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:
HTML is for web pages.
Yes, and it can be transformed into PDFs for precise print needs.
As an Amazon Associate we earn from qualifying purchases.