Java 如何使用xdocreport和velocity以行格式显示列表数据

Java 如何使用xdocreport和velocity以行格式显示列表数据,java,velocity,xdocreport,Java,Velocity,Xdocreport,您需要在内部循环之后放置一个新行字符 Please help me on this any one ... 新行字符可以是\n、\r或\n\r。谢谢jitesh,我按照您所说的编写了类似map.put(“新行“,“/n”)的代码;上下文。放置(“内容”,映射);,然后我在word文档中访问了诸如«@before cell#foreach($dosData中的d)»before cell#foreach($d中的f)»«$f»«before cell#end»«$content.newL

您需要在内部循环之后放置一个新行字符

    Please help me on this any one ...

新行字符可以是\n、\r或\n\r。

谢谢jitesh,我按照您所说的编写了类似map.put(“新行“,“/n”)的代码;上下文。放置(“内容”,映射);,然后我在word文档中访问了诸如«@before cell#foreach($dosData中的d)»before cell#foreach($d中的f)»«$f»«before cell#end»«$content.newLine»«before cell#end»但我仍然无法得到正确的响应。我还面临着一些问题,例如\n也作为文本的一部分出现。您是否使用了map.put(“newLine”,“/n”); ? 换行符是\n而不是/n。我已经试过你说的了,最后我从angelo那里得到了答案,«行前foreach($dosData中的d)»单元格前foreach($d中的f)»«$f»单元格后结束«行后结束»非常感谢你的支持。
    Please help me on this any one ...
«@before-cell#foreach($d in $dosData)»  |
«@before-cell#foreach($f in $d)»        |
«$f»                                    |
«@after-cell#end»    
new line character                   |
«@after-cell#end»