Shrimp007 / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

Footnotes do not work in Word #415

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to create footnotes in a foreach loop.  The footnotes are created 
and increment correctly, but the information in each footnote, which is 
supposed to change for each iteration, is always the value of that field from 
the first record.

Original issue reported on code.google.com by mark.sal...@highq.com on 1 Jul 2014 at 12:58

GoogleCodeExporter commented 9 years ago
It seems that you have already posted at 
http://stackoverflow.com/questions/24538622/creating-footnotes-with-velocity-and
-xdocreport-in-word

Footnotes are explained at 
https://code.google.com/p/xdocreport/wiki/DocxReportingJavaMainNotes but 
perhaps it should be improved?

Original comment by angelo.z...@gmail.com on 3 Jul 2014 at 7:03

GoogleCodeExporter commented 9 years ago
I did post to stack, but have gotten no responses. the stack posting has more 
information about what I have tried. i think the explanation you have provided 
on how it works is quite straightforward, I just can't get it to work.

Original comment by mark.sal...@highq.com on 3 Jul 2014 at 11:41

GoogleCodeExporter commented 9 years ago
Please attach your docx+java which causes problem. It was a long time that I 
have developped this feature, perhaps it is broken?

Original comment by angelo.z...@gmail.com on 3 Jul 2014 at 11:49

GoogleCodeExporter commented 9 years ago
I can try to do that.  If you want to try a simple test yourself and let me know

Original comment by mark.sal...@highq.com on 3 Jul 2014 at 11:57

GoogleCodeExporter commented 9 years ago
You can find a sample in the zip docxandvelocity with footnotes 
(DocxProjectWithVelocityAndFootnotes)

No time for the moment to study more your problem.

Original comment by angelo.z...@gmail.com on 3 Jul 2014 at 12:03

GoogleCodeExporter commented 9 years ago
I have attached a template (footnotes.docx) and an example generated document 
(footnotes-generated.docx). I am using v 1.0.2, btw.  

There is some code at the beginning to bring in the data, but you can see from 
the generated document that the data is there.  $record.Line outputs in the 
main document, but not in the footnote.

The value of the variable that I create in the loop, $line2, DOES appear the 
footnote, but only the value from the last iteration of the loop, and that 
value appears in every footnote. I'm not even sure how that is possible.

Also, $velocityCount also works inside the footnote correctly.

Original comment by mark.sal...@highq.com on 3 Jul 2014 at 1:52

Attachments:

GoogleCodeExporter commented 9 years ago
Angelo,

Let me know if you have time to look at this or test it out yourself.  Thanks!

Mark

Original comment by mark.sal...@highq.com on 7 Jul 2014 at 12:42

GoogleCodeExporter commented 9 years ago
Mark, I have no time to study your problem today.

Original comment by angelo.z...@gmail.com on 7 Jul 2014 at 12:49