danishiumca / xdocreport

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

Support for vertical table rows with FieldsMetadata #347

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Support for vertical table rows.

 I created a template for horizontal and vertical table substitution
 Horizontal table looping working fine but where as the vertical table also working  and not expected manner.

Please find the attachment for template, actual output and expected output.

Xdoc version : docxandvelocity-0.9.1  
operating system :Windows XP SP3

Original issue reported on code.google.com by jvchb...@gmail.com on 8 Jan 2014 at 9:13

Attachments:

GoogleCodeExporter commented 9 years ago
At first, have you tried with 1.0.3 version of XDocReport (0.9.1 is very old).

If you have problems again with 1.0.3, please attach a simple docx+java code.

Original comment by angelo.z...@gmail.com on 8 Jan 2014 at 9:19

GoogleCodeExporter commented 9 years ago
I tried with  1.0.3 as suggested, still the problem persists.
 PFA for source files, output and input files

Original comment by jvchb...@gmail.com on 30 Jan 2014 at 6:16

Attachments:

GoogleCodeExporter commented 9 years ago
Your docx to loop for is like : 
------------------------------------------------
Name             «$developers.Name»
LastName    «$developers.LastName»
Mail            «$developers.Mail»
------------------------------------------------

But you cannot do that. You must use advanced table loop 
https://code.google.com/p/xdocreport/wiki/DocxReportingJavaMainListFieldAdvanced
Table 
You can find a sample in the zip with 
DocxTableWithoutFieldsMetadataWithVelocity.docx

Original comment by angelo.z...@gmail.com on 30 Jan 2014 at 9:51

GoogleCodeExporter commented 9 years ago
I tried with advance table loop.The advance table loop can able to generate 
table itself for each row from database not the table row. I tried with other 
example too.
Is there possibility to get the output each record vertically as mentioned in 
the attachment?

Original comment by jvchb...@gmail.com on 5 Feb 2014 at 6:22

Attachments:

GoogleCodeExporter commented 9 years ago
You must use @before-row and @after-row.

So :

1) remove your "foreach($d in $developers)" and "#end" mergefields.
2) use @before-row and @after row like this : 

------------------------------------------------------------------
«@before-row#foreach($d in $developers)» Name «$d.name»
LastName                                    «$d.lastname»
Mail«@after-row#end»                            «$d.mail»
------------------------------------------------------------------

Original comment by angelo.z...@gmail.com on 5 Feb 2014 at 9:15