Hi,
I have a problem with the merge, only the first table is merged. I’m working with the jdk 1.4 and my java code is:
*******
DataSet ds = new DataSet();
DataTable Empresas = new DataTable(executeQuery(“SELECT * from TABLE1”), “Empresas”);
ds.getTables().add(Empresas);
DataTable Centros = new DataTable(executeQuery(“SELECT * from TABLE2”), “Centros”);
ds.getTables().add(Centros);
DataRelation relation=new DataRelation(
“relation”,
Empresas.getTableName(),
Centros.getTableName(),
new String[]{“ID_1”},
new String[]{“ID_2”});
ds.getRelations().add(relation);
Document doc = new Document(“C://aspose//prueba//” + “plantilla.doc”);
doc.getMailMerge().executeWithRegions(ds);
doc.save(“C://aspose//prueba//” + “combinado.doc”);
And the document “plantilla.doc” is:
«TableStart:Empresas»
Empresa: «Nombre»
«TableStart:Centros» «Centro» «TableEnd:Centros»
«TableEnd:Empresas»
****************************************************************
The result of the merge in the "combinado.doc" file is:
Empresa: Abcd S.L.
efg1
hij2
Empresa: Dftu S.A.
«TableStart:Centros» «Centro» «TableEnd:Centros»
******************************************************************
Thank you very much.
Best Regards.