Jump to content

I have version 8207.28 and, by chance, I found that the INT ...


Daniel Braunschvig

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...