Daniel Braunschvig Posted October 13, 2021 Share Posted October 13, 2021 I have version 8207.28 and, by chance, I found that the INT function give erroneous results. See the following fex: DEFINE FILE CAR DMIN/D12.2=CAR.BODY.DEALER_COST/60 ; IMIN/I5=INT(DMIN); SALES2/D2L=SALES; END TABLE FILE CAR SUM CAR.BODY.DEALER_COST CAR.BODY.DMIN CAR.BODY.IMIN CAR.BODY.SALES CAR.BODY.SALES2 BY CAR.ORIGIN.COUNTRY ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLEMBEDIMG ON ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = warm, $ ENDSTYLE END See the output: And by the way note that the format of SALES2 is ignored Link to comment Share on other sites More sharing options...
Doug Shartzer Posted October 13, 2021 Share Posted October 13, 2021 I think whats happening here is that its summing up the rounded down integer from the IMIN define. Link to comment Share on other sites More sharing options...
David Beagan Posted October 13, 2021 Share Posted October 13, 2021 I think INT is working properly. With the INT being used at the detail level with DEFINE, you will not always get the same as INT of the aggregated value. Run this and you can see: DEFINE FILE CAR DMIN/D12.2 = DEALER_COST/60 ; IMIN/I11 = INT(DMIN); SALES2/D4L = SALES; END TABLE FILE CAR PRINT DEALER_COST DMIN IMIN SALES SALES2 BY COUNTRY ON COUNTRY SUBTOTAL AS '' ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE SET STYLE * INCLUDE = warm, $ ENDSTYLE END So for example, the total of IMIN for ENGLAND, 123 + 186 + 249 + 71 = 629 Link to comment Share on other sites More sharing options...
David Beagan Posted October 13, 2021 Share Posted October 13, 2021 For the format for leading zeros SALES2/D2L=SALES; I guess it only puts the leading zeros on the number of digits you have for the DEFINE. In this case it is D2L so you only get leading zeros for two digits. Link to comment Share on other sites More sharing options...
Daniel Braunschvig Posted October 13, 2021 Author Share Posted October 13, 2021 Oh, shoot! A beginners mistake. Covered with shame Thanks David. Link to comment Share on other sites More sharing options...
Daniel Braunschvig Posted October 13, 2021 Author Share Posted October 13, 2021 What I meant to say is that, previously, if the format was too small for a value, WF displayed **. Anything on this Link to comment Share on other sites More sharing options...
Walter Brengel Posted October 13, 2021 Share Posted October 13, 2021 There is also a new setting: EXTENDNUM. The default value is AUTO and this will show all the digits of a number when you dont specify enough digits in your format. You can turn it off with SET EXTENDNUM=OFF and then see the overflow characters (*). Walter Link to comment Share on other sites More sharing options...
Daniel Braunschvig Posted October 13, 2021 Author Share Posted October 13, 2021 Thanks, Walter. By any chance do you know when this SET was introduced Link to comment Share on other sites More sharing options...
Walter Brengel Posted October 13, 2021 Share Posted October 13, 2021 Certainly. It was introduced in 7706M. I found this in the Summary of New Features doc Preventing Visual Overflow How to: Prevent Visual Overflow Reference: Usage Notes for SET EXTENDNUM At times, the size defined for the USAGE format of a field may be too small to fit the actual data to be displayed. In previous releases, this scenario would cause asterisks (***) to display in the report output in place of the actual value. Situations that cause this scenario include: If the display value is larger than the defined display format. If a value is aggregated, the summed value does not fit into the space that was allotted for the column by the USAGE format of the field. Syntax: How to Prevent Visual Overflow SET EXTENDNUM = {ON|OFF|AUTO} where: ON Displays all numbers in full, regardless of the USAGE format defined. OFF Displays asterisks when the value does not fit in the space allotted by the USAGE format. This is the legacy behavior. AUTO Applies an ON or OFF setting based on output format and SQUEEZE settings, as shown in the following table. Format SQUEEZE Setting EXTENDNUM PDF, PS, DHTML, PPT, PPTX ON OFF|ON OFF| |HTML, EXL2K, XLSX|N/A|ON| |BINARY, ALPHA|N/A|OFF| |WP, other delimited formats|N/A|OFF| AUTO is the default value. Reference: Usage Notes for SET EXTENDNUM Invoking SET EXTENDNUM=ON may change the report layout in the following ways. Changes in report layout: With styled formats (PDF, PS, DHTML, HTML, EXL2K, XLSX, PPT, PPTX), the width of the report is expanded to accommodate the width of the data columns. This may change the placement of the overall report on the defined page and in some instances cause columns to overflow to a new page. For PDF, DHTML, PPT, and PPTX, the setting SQUEEZE ON will ensure that the alignment within each column is retained. For HTML, EXL2K, and XLSX, the alignment will automatically be retained regardless of SQUEEZE settings. With unstyled formats (WP), the columns are not adjusted to fit the new values, which may cause misalignment of data columns. Changed behavior in operating systems where the defined number format is not supported: Integers larger than 2GB cannot display on 32-bit machines. Therefore, such integers on these machines will display incorrect values. Floating-point numbers (types F and D) that require more than 31 digits to print correctly will continue to display asterisks. For example, a field with usage D33.30 and a value of 10.0 will print as asterisks because it needs 30 zeros to the right of the decimal point and two digits to the left. Walter Please join Walter Blood, Mark Derwin and myself at our FOCUS Friday session which are held monthly. You can register here: TIBCO Software Inc. FOCUS Fridays Virtual User Group Applications are at the heart of this months FOCUS Frida The next one is this Friday (October 15th, 2021) from 11:30am EDT to 1:00pm EDT. Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted October 13, 2021 Share Posted October 13, 2021 Just for clarification 7706 and 8206 are synonymous. Also welcome to myibi Daniel! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now