MohamedSaeed / xdocreport

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

Line Feeds within Docx not interpreted #380

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Use  \n line break in the context.

What is the expected output? What do you see instead?
Expected output contains a line break in the word document after each 
mergefield that contains content, I see no line break instead.

What version of the product are you using? On what operating system?
1.0.4

Please provide any additional information below.
I am ttrying to format a set of address fields, one or more of these may be 
null, in which case I do not want blank lines to appear in the formatted 
address. I have used freemarker syntax to evaluate if there is string content 
for a key. if there is content, it will then add a line feed. However when I 
merge the content the fields just ignore the line feed. I attach a sample Word 
document showing the Mergefields I have added.

Original issue reported on code.google.com by rob.r...@me.com on 9 Mar 2014 at 6:35

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

please attach a simple java main which causes your problem

Regards Angelo

Original comment by angelo.z...@gmail.com on 9 Mar 2014 at 9:35

GoogleCodeExporter commented 9 years ago
Will obtain for you. Can you confirm for now whether I have set the Mergefields 
correctly in terms of the \n switch?

Original comment by rob.r...@me.com on 9 Mar 2014 at 9:42

GoogleCodeExporter commented 9 years ago
XDocReport should manage \n for one mergefield. But for set of mergefield, I 
think it will not work (never tested, that's why I'm waiting for your sample), 
but I think it will no solution for that. Waiting for your sample to study that.

Original comment by angelo.z...@gmail.com on 9 Mar 2014 at 9:48