In XDocReport, how to handle null value? -


is there way handle null value field in xdocreport? or need manipulate on own? example:

if (thisvar == null)   context.put("sampletext", ""); else   context.put("sampletext", thisvar); 

or there option in docx quick parts?

i found line in error message of xdocreport. not understand apply this, in template or in code.

tip: if failing expression known legally refer that's null or missing, either specify default value myoptionalvar!mydefault, or use [#if myoptionalvar??]when-present[#else]when-missing[/#if]. (these cover last step of expression; cover whole expression, use parenthesis: (myoptionalvar.foo)!mydefault, (myoptionalvar.foo)??

in docx, append ?if_exists field name

«${tx.amount?if_exists}»

you may append !

«${tx.amount!}»

please refer link uses freemarker. how check if variable exists in freemarker template?


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -