Thanks for your help, i really appreciate it :)
Your tips were right on target, I tried it, and after some work i managed to make it do what i wanted.
I'm still having a bit of a problem tough... I cannot rename/add the new table-row styles properly...
I mean, i add the new styles manually to the content.xml or the styles.xml (tried both) but the next time I save the document, the extra styles i added get deleted by a garbage collector or something like that... (it reset to the automatic styles and deletes the ones i added)
What I could do was create on the table 2 lines (one has the code for the list) and the other is a blank line of grey background. Then i switch between the table row styles of those 2 lines instead of the "custom" ones like you suggested.
But this way i will always end up with one extra line on my table in the end... Is there a way i can add the extra table-row styles withouth word rewriting them when I save the template?
I tried it, and it works REALLY well!!!
The section is invisible to all but navigator indeed, and navigator is almost never used.
I take this moment to thank you for all your help, and for the quick replys too, and congratulate you on a very useful program. It is powerfull, fast, and does its job very well. :)
I liked JODreports VERY much, you guys rule :)
I included my working template as an attachment, in case you want it for future reference for some other person with the same problem :)
Greetings
Marco André Pedrosa
On Fri, Sep 16, 2011 at 9:52 PM, Ansgar Konermann <ansgar.konermann@googlemail.com> wrote:
Am 16.09.2011 18:01, schrieb Legolith:You could:Thanks for your help, i really appreciate it :)
Your tips were right on target, I tried it, and after some work i managed to make it do what i wanted.
I'm still having a bit of a problem tough... I cannot rename/add the new table-row styles properly...
I mean, i add the new styles manually to the content.xml or the styles.xml (tried both) but the next time I save the document, the extra styles i added get deleted by a garbage collector or something like that... (it reset to the automatic styles and deletes the ones i added)
What I could do was create on the table 2 lines (one has the code for the list) and the other is a blank line of grey background. Then i switch between the table row styles of those 2 lines instead of the "custom" ones like you suggested.
But this way i will always end up with one extra line on my table in the end... Is there a way i can add the extra table-row styles withouth word rewriting them when I save the template?
- introduce a section into your template with the sole purpose of containing a table with two rows and one row-style each
- sole purpose of this table is to *define* and *reference* the row-styles so they don't get garbage collected
- use the automatic styles of this table in your actual table you'd like to generate, maybe using ternary operator to choose row style name (like: #if counter % 1 == 0 ? "name1" : "name2")
- set the sections 'visible' attribute to false, so you won't see it (this is the real trick :-)
This is a bit ugly, you'll get an extra section in the generated document, but you'll only see it if you actually open the navigator view. AFAIK, when converting this document to PDF, there won't be an extra section at all.
Best regards
Ansgar
Thanks again
Marco Andre Pedrosa