velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Brisson <cla...@renegat.net>
Subject Re: text output page header
Date Mon, 22 Jun 2009 15:55:51 GMT
You can use a custom buffered writer that would count output lines and
insert the appropriate headers.


  Claude

On lun., 2009-06-22 at 17:41 +0200, Petermair Patrick wrote:
> Hi!
> 
> 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?
> 
> Thanks,
> Patrick
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message