I am taking all this data and putting it into an array because I'm using the Google Charts API which takes its data through an array. Here's the array data
As you can see, with my edits I've gotten the leading zeros down for the most part, but the very last column is giving me troubles with data. Because of the leading zeros in front of the 1556, the data is displaying differently than the way it should. Is there a way to get rid of these 0s? Perhaps with another function?This message has been edited. Last edited by: ccollier,
WebFOCUS 8.2.01M on Windows 10
August 16, 2018, 10:54 AM
Tony A
Use FPRINT or the newer EDIT2 function.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
August 16, 2018, 10:56 AM
MartinY
Try with this instead. Adjust length as requested. The alpha format must better be larger than the numeric one.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
August 16, 2018, 11:52 AM
ccollier
Instead of doing it inside of WebFOCUS, I actually just edited a stored procedure I was using to output the data into strings.
WebFOCUS 8.2.01M on Windows 10
August 16, 2018, 12:22 PM
Hallway
Personally I would use the FTOA function
DEFINE FILE CAR
TABLEDATA/A700V='[''' || MODEL || '''' || ',' || FTOA(DEALER_COST,'(D12c)','A15V') || ',' || FTOA(RETAIL_COST,'(D12c)','A15V') || ',' || FTOA(SALES,'(D12c)','A15V') || ']' ;
END
TABLE FILE CAR
PRINT TABLEDATA AS ''
ON TABLE SET PAGE-NUM OFF
END
-RUN