In the xml data file, we maintain two fields: amount and amountFormatted. For example,
amount: -5000
amountFormatted: ($5,000)
And when do the data-bindings, we only bind the amountFormatted field to the element in PDF.
I am not sure if it's possible to use those fields which are not binded to any elements in the pdf template. Namely,
Instead of comparing string in pdf to control the color
If( this.rawValue.substring(0,1) == "(" ) {
this.fontColor = "255,0,0";
}
Can we use number in dataset to do the comparison
if(Number($record.summary-vO.amount) < 0) {
this.fontColor = "255, 0, 0";
}
Thanks
Alan Ji