Focal Point
[CLOSED] Truncate by default

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1087052706

July 22, 2011, 09:18 AM
Charles Richards
[CLOSED] Truncate by default
Is there a way to make all of my calculations, defines and computes, truncate by defualt instead of rounding up?

However, there is one value that i would like to comtinue rounding, WEEKS, so is there some way of just rounding one value?

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6
Windows, All Outputs
July 22, 2011, 10:40 AM
Tomsweb
Charles,
It would be helpful if you posted any code that you have written thus far.
Thanks,


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
July 24, 2011, 05:28 PM
Waz
You should also look at the properties of different numeric types.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

July 25, 2011, 04:41 AM
Ramkumar - Webfous
quote:
to make all of my calculations, defines and computes, truncate by defualt



Defenitely, there is no global or configurational setting to do this. You have to go by different numeric types, as needed.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
July 25, 2011, 05:27 AM
GamP
You may want to create a define function for rounding and one for truncating ... so that you can use those functions throughout your entire app ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
July 25, 2011, 05:31 AM
FrankDutch
Maybe take a look again on the answer I gave you on the rounding matter.
It depends if you want to SHOW a value only as if it is rounded/truncated or if you also want the truncation/rounding be done for real.
The sum of all rounded figures might give you an other result.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

July 25, 2011, 05:46 AM
Ramkumar - Webfous
quote:
want to create a define function for rounding and one for truncating



  
DEFINE FUNCTION CHGNUM(NUMVAL/D10.2)
CHGNUM1/P10 = NUMVAL;
END
-RUN


Gamp, Something of this sort. Yeah... The functions CHGNUM can be used along with all the Define and Compute fields as needed.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5