List of Tables with Maps

76 views
Skip to first unread message

Ivan Martoccia

unread,
Jan 12, 2017, 10:45:43 AM1/12/17
to xdocreport
Hello, 


I would use xdocreport with the maps but I have a problem when I create a list of tables as in "DocxTableWithoutFieldsMetadataWithVelocity". Instead of using the Developer and Roles classes I have to use the HashMap. How can I do to create the same example with the maps?

Thanks in advance!!

Angelo zerr

unread,
Jan 12, 2017, 10:48:52 AM1/12/17
to xdocr...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "xdocreport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xdocreport+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ivan Martoccia

unread,
Jan 12, 2017, 11:21:00 AM1/12/17
to xdocreport
Hi Angelo, 

i have read the wiki. 

i use context.put("key", "value") for single parameter, 
List<Map<String, String>> for table 

but if i have a list of table what should i use? Map<String, List<Map<String, String>>? 

My word is: 

Table inside loop for 
<<#foreach($d in $developers)>>
Identity
Name: <<$d.Name>>

Roles
<@before-row#foreach($r in $d.Roles)>><<$r.Name>><<@after-row#end>>

<<#end>>



Il giorno giovedì 12 gennaio 2017 16:48:52 UTC+1, Angelo ha scritto:
2017-01-12 16:44 GMT+01:00 Ivan Martoccia <m.i...@gmail.com>:
Hello, 


I would use xdocreport with the maps but I have a problem when I create a list of tables as in "DocxTableWithoutFieldsMetadataWithVelocity". Instead of using the Developer and Roles classes I have to use the HashMap. How can I do to create the same example with the maps?

Thanks in advance!!

--
You received this message because you are subscribed to the Google Groups "xdocreport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xdocreport+...@googlegroups.com.

Angelo zerr

unread,
Jan 12, 2017, 11:35:00 AM1/12/17
to xdocr...@googlegroups.com
2017-01-12 17:21 GMT+01:00 Ivan Martoccia <m.i...@gmail.com>:
Hi Angelo, 

i have read the wiki. 

i use context.put("key", "value") for single parameter, 
List<Map<String, String>> for table 

but if i have a list of table what should i use? Map<String, List<Map<String, String>>? 

Yes I think it should work. If you have problem, please post your question to Velocity forum.
Your question is more about Velocity templat engine than XDocReport.

 

My word is: 

Table inside loop for 
<<#foreach($d in $developers)>>
Identity
Name: <<$d.Name>>

Roles
<@before-row#foreach($r in $d.Roles)>><<$r.Name>><<@after-row#end>>

<<#end>>



Il giorno giovedì 12 gennaio 2017 16:48:52 UTC+1, Angelo ha scritto:

2017-01-12 16:44 GMT+01:00 Ivan Martoccia <m.i...@gmail.com>:
Hello, 


I would use xdocreport with the maps but I have a problem when I create a list of tables as in "DocxTableWithoutFieldsMetadataWithVelocity". Instead of using the Developer and Roles classes I have to use the HashMap. How can I do to create the same example with the maps?

Thanks in advance!!

--
You received this message because you are subscribed to the Google Groups "xdocreport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xdocreport+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "xdocreport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xdocreport+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages