velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petermair Patrick <>
Subject text output page header
Date Mon, 22 Jun 2009 15:41:10 GMT

We are using Velocity to create some reports that will be printed out. One
report gets a list of customers and prints some data about them. I¹m now
faced with the problem of writing a page header at the beginning of every
page (that gets printed out). Something like:

³Page 23²

and so on... Is there any support in Velocity to print some kind of header
after a fixed amount of lines? I know how many lines a page can hold. The
data per customer isn¹t static so I don¹t know how many lines each customer
will take. So basically my textfile would look like this:

Page 1
<some data>
<more data>
Page 2
<some more data>
Page 3
<even more data>
<still more data>
<more more data>
Page 4

Without the header I would simply output every customer in a ³for each²
loop. But I need to tell Velocity somehow that it needs to print an extra
line with some header data after every 80th line (for example).

I was going through the documentation but I couldn¹t find anything that
would help me do this ... any ideas?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message