Many reports in one file

174 views
Skip to first unread message

wyborowiec

unread,
Dec 26, 2011, 4:44:25 AM12/26/11
to jodreports-users
Hello

I would like to know if it's possible in JODReports to have template
ODT file and generate more than one report based on the template into
one file. I want to generate many reports but have only one resulting
ODT file to contain all of them. Printing of such report set would
more comfortable than printing many separate files.

I'll be grateful for help
Wacław Borowiec

leif hanack

unread,
Dec 26, 2011, 6:23:17 AM12/26/11
to jodrepor...@googlegroups.com

Hi.

I'm not sure if I understand you right. Generally you can create a template with conditionals, so that one template fits for multiple reports. Nevertheless it might be better to separate your concerns.
If you primary want to have one PDF as a result you can concatenate PDFs. I'm not sure if JOD offer this out of the box. But there are libs that can do this.

Regards Leif

Ansgar Konermann

unread,
Dec 26, 2011, 7:10:50 AM12/26/11
to jodrepor...@googlegroups.com


Am 26.12.2011 12:10 schrieb "wyborowiec" <wybor...@googlemail.com>:
>

> Hello
>
> I would like to know if it's possible in JODReports to have template
> ODT file and generate more than one report based on the template into
> one file.

Yes. Use a list of input data items, one per report. Iterate over these items using #list and generate the report content. Pay attention to page breaks to cleanly separate the individual reports.

> I want to generate many reports but have only one resulting
> ODT file to contain all of them. Printing of such report set would
> more comfortable than printing many separate files.
>

Printing multiple PDF files might be as easy as

$> lpr -P yourprinter *.PDF

Depending on your OS, the actual print client and its command line syntax might differ, but some easy way of automating printing of multiple files should exist.

Best regards

Ansgar

wyborowiec

unread,
Dec 26, 2011, 4:06:13 PM12/26/11
to jodreports-users
Thank you for your answers. Having a resulting reports set in one file
is a requirement here. It also has to be in ODT format finally, so
PDFs merging is not an option here. Ansgar's proposition looks
interesting, I'll look into it.

regards
Wacław

On Dec 26, 1:10 pm, Ansgar Konermann <ansgar.konerm...@googlemail.com>
wrote:

j_nemo2

unread,
Jan 9, 2013, 7:09:18 AM1/9/13
to jodrepor...@googlegroups.com, wybor...@googlemail.com, ansgar.k...@googlemail.com
Did you resolve this problem? I would be gratefull if you could put some java code and tamplate here.

j_nemo2

unread,
Jan 9, 2013, 8:25:50 AM1/9/13
to jodrepor...@googlegroups.com, wybor...@googlemail.com, ansgar.k...@googlemail.com
I did many reports in file but i cannot make page breaks between them.
I did this as a list in a table row.

Ansgar Konermann

unread,
Jan 17, 2013, 5:23:59 AM1/17/13
to jodrepor...@googlegroups.com, wybor...@googlemail.com, ansgar.k...@googlemail.com


Am Mittwoch, 9. Januar 2013 14:25:50 UTC+1 schrieb j_nemo2:
I did many reports in file but i cannot make page breaks between them.

You could try 

a) Insert -> Manual Break

b) Format -> Paragraph -> Text Flow -> Breaks -- see https://help.libreoffice.org/Writer/Text_Flow#Breaks

HTH

Ansgar

j_nemo2

unread,
Jan 31, 2013, 2:14:33 AM1/31/13
to jodrepor...@googlegroups.com, wybor...@googlemail.com, ansgar.k...@googlemail.com
Thank you for help. I've use new text-section for each report.

But I have problem with style-sheet.  i dont know how to change style sheet using jooscript.
Reply all
Reply to author
Forward
0 new messages