Open GoogleCodeExporter opened 9 years ago
Hi Bilel,
The values of MergeField comes from Java context, so why you cannot check this
value before using XDocReport?
Regards Angelo
Original comment by angelo.z...@gmail.com
on 12 Sep 2013 at 9:32
Hi Angelo,
I mean, I want to upload the docx template in DB before even thinking about
doing anything, i mean check the syntax of the MergField if it correctly
Freemarker syntax or not, you are telling me that i can have the syntax via the
context using XDocReport.
Regards,
Bilel
Original comment by oueslatibilel216@gmail.com
on 12 Sep 2013 at 9:50
Ok sorry I didn't understand what you wish to do. Forget my comment.
If I understand you wish to validate your "template" docx before saving it in
your DB.
When you generate a report, you can have 2 kinds of problem :
1) the Freemarker/Velocity syntax is bad (ex : you start a start loop with
[#list/#foreach without the end of the loop #end)
2) you set a name field which doesn't exists ${fieldNameDontExistsInTheContext}.
You have 2 choices to do that :
1) generate a report with hard-coded context and check if you have some errors.
2) load the report and extract the fields name of teh report with
IXDocReport#extractFields( FieldsExtractor extractor ) and check if field name
are known. But pay attention with the extractor, it manages simple case to
extract field name (just ${myField} is managed).
Regards Angelo
Original comment by angelo.z...@gmail.com
on 12 Sep 2013 at 12:06
Hi Angelo,
Thank you for the answer.
Regards,
Bilel
Original comment by oueslatibilel216@gmail.com
on 17 Sep 2013 at 5:25
Original issue reported on code.google.com by
oueslatibilel216@gmail.com
on 12 Sep 2013 at 9:28