opensagres / xdocreport

XDocReport means XML Document reporting. It's Java API to merge XML document created with MS Office (docx) or OpenOffice (odt), LibreOffice (odt) with a Java model to generate report and convert it if you need to another format (PDF, XHTML...).
https://github.com/opensagres/xdocreport
1.22k stars 372 forks source link

$velocityCount problem #620

Open GoldGshok opened 1 year ago

GoldGshok commented 1 year ago

Hey guys, In 2.0.4 version have some problem with $velocityCount when i generate pdf file from odt template. In 2.0.2 version my expression works well #foreach($item1 in $placesWithImg) #if(1==1%2) but 2.0.4 not working. When i remove $velocityCount its work well. May be you know, what a problem? thanks

i'm use jdk 17

instagibb commented 1 year ago

$velocityCount no longer exists in Velocity 2.3 included in 2.0.4 you will need to use $foreach.count (1-based), or $foreach.index (0-based).

See the relevant upgrade guide for 1.7 to 2.x