I'm using an HTMLrapport to collect results. The results (time and amount) is in 11 or 12 decimals. How can I change this is 1 or 2 decimals?
You can set the max. number of places behind the decimal point as an argument like this:
If you want do display an exact number of decimal places (even if the places are zero) you can do it like this:
Thanks for replying.
But how do I put an argument in the HTMLreport?
#Geproduceerde volumes **Totale productie = [FluidDrain.statThroughput]** **Productie per dag = [FluidDrain.statThroughputPerDay]** **Productie per uur = [FluidDrain.statThroughputPerHour]**
The above is one section of my report. The results of this are with 11 decimals but 2 is enough. When I put your argument behind it iw does not work. What am I doing wrong?
Hello, have just tested (using a normal Drain) and their suggested edit should work.
#Geproduceerde volumes **Totale productie = [FluidDrain.statThroughput,2]** **Productie per dag = [FluidDrain.statThroughputPerDay,2]** **Productie per uur = [FluidDrain.statThroughputPerHour,2]**
On a quick side note, when using '02' to display 2 decimal places reguardless I have noticed it only works for real values and not for integers or time values.
This actually also works for times (for example [SingleProc.statFailTime, 2] ), except if the time is read from a global variable. Although the precision argument generally works for global variables too, it does not work for global variables of data type time (which seems to be a bug).
As a workaround, instead of writing [Variable, 2], you can write [Variable.value, 2]
Note: For some reason the leading zero does not work for the data type time.