Java Code : 
    ==========
    List<DosData> dosData = new ArrayList<DosData>();
    DosData data1 = new DosData();
    data1.setDosStart("10/10/2014");

    DosData data2 = new DosData();
    data2.setDosStart("11/10/2014");

    DosData data3 = new DosData();
    data3.setDosStart("12/10/2014");

    dosData.add(data1);
    dosData.add(data2);
    dosData.add(data3);
    context.put("dosData", dosData);



    I should get the Result Below : 

     ---------------------------------------  
    |10/10/2014  |  11/10/2014  | 12/10/2014|
     ---------------------------------------

    I have used Below code to display : 

     ----------------------------
    |                           |
    |                           |
    |                           |
    |       «@before-cell#      |
      foreach($d in $dosData)   |
        »«$d.dosStart»«@after-  |
        cell#end»               |
    |                           |
    |                           |
    |                           |
    |                           |
     -------------------------

When i am using above code getting some exceptions like below :

org.apache.fop.fo.ValidationException: The column-number or number of cells in the row overflows the number of fo:table-columns specified for the table. (No context info available)at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38) at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:54) at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175) at $Proxy297.tooManyCells(Unknown Source) at org.apache.fop.fo.flow.table.TableCellContainer.addTableCellChild(TableCellContainer.java:51) at org.apache.fop.fo.flow.table.TableRow.addChildNode(TableRow.java:95) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:315) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171) at org.apache.xml.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:206) at org.apache.xml.serializer.ToXMLSAXHandler.characters(ToXMLSAXHandler.java:524) at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.dispatchNodeData(DOM2DTM.java:1690) at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.dispatchCharactersEvents(DOM2DTM.java:1622) at org.apache.xml.dtm.ref.DTMTreeWalker.dispatachChars(DTMTreeWalker.java:204) at org.apache.xml.dtm.ref.DTMTreeWalker.startNode(DTMTreeWalker.java:333) at org.apache.xalan.transformer.TreeWalker2Result.startNode(TreeWalker2Result.java:146) at org.apache.xml.dtm.ref.DTMTreeWalker.traverse(DTMTreeWalker.java:114) at org.apache.xalan.transformer.TreeWalker2Result.traverse(TreeWalker2Result.java:74) at org.apache.xalan.templates.ElemCopyOf.execute(ElemCopyOf.java:186) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1273) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251) at org.docx4j.XmlUtils.transform(XmlUtils.java:834) at org.docx4j.XmlUtils.transform(XmlUtils.java:727)

Could any one please help me on this , I am new to working on.

1

There are 1 answers

2
Angelo On

It seems that you use the XDocReport docx->fop converter. This converter was just a POC. Today we have gaven up : you must use the XDocReport itext docx->pdf converter.

At first I suggest you that you don't convert the report to see if the generated docx is ok.