This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
applications:calculdated_value [2020/02/05 13:32]
admin created
applications:calculdated_value [2020/02/05 13:35]
Line 1: Line 1:
 +~~Title: Using calculated values~~
 +Sometimes, it's useful to add calculated values to your report. To do this, simply use your own implementation of **ICalculatedValue**.
 +Here's an example:
 <code java> <code java>
 Bean bean = new Bean(); Bean bean = new Bean();
Line 18: Line 24:
 w.fillInData(node);​ w.fillInData(node);​
 w.saveDocument(new FileOutputStream(getTempOutputFile("​result_calculatedValues.rtf"​)));​ w.saveDocument(new FileOutputStream(getTempOutputFile("​result_calculatedValues.rtf"​)));​
 +If you're using an AbstractDataNode like **StorageNode**,​ **ListNode** or **EmptyNode**,​ be sure that you set the calculated value as parameter:
 +<code java>
 +dataNode.setParameter("​CALCULATED",​ new ICalculatedValue() {...});
 </​code>​ </​code>​
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information