[SOLVED] Visual Discovery Data Sheet - adding comma for 1000 separator
I am using a data sheet as part of a dashboard. The problem is that I have data that should be displayed as text only (no commas for numbers greater than 999). But the commas are being included even though the data pulls from a text file with no commas.
Does anyone know how to format the data displayed in the data sheet?This message has been edited. Last edited by: Kerry,
February 02, 2009, 02:46 PM
FrankDutch
Would you be so kind to post your masterfile? I might give us a better idea.
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
February 02, 2009, 04:09 PM
<Pants>
I'm not sure what you mean by masterfile? The text file contains employee data, so I can't post that.
February 02, 2009, 04:13 PM
FrankDutch
How do you read that textfile?
can you post your script/fex ?
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
February 02, 2009, 04:38 PM
FrankDutch
Well I can't read this.... I'm afraid you posted some html code and the system get's upset when you do it this way.
don't you have just a fex that says something like
TABLE FILE XXX PRINT xxxx END
do you know what a master file description is?
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
February 02, 2009, 04:57 PM
<Pants>
I have a fex that creates the text file and saves it to a folder location like this...
TABLE FILE NEWTABLE PRINT CLIENT_ID AS 'Client ID' CLIENT_MKT_SEG AS 'Market Segment' EMP_PER_ID AS 'PERID' ON TABLE SAVE FILENAME '\\KWVAPWFD02\IBI\WEBFOCUS71\IBI_HTML\VISDIS\BTD\LOA_VISDIZ.TXT' FORMAT VISDIS END
I have and HTML page with an ActiveX control inserted (data sheet) that goes out to the text file and brings the data in. But it is adding the commas when it displays them in the data sheet/HTML page
no, I am not sure what a master file description is
February 02, 2009, 05:03 PM
Francis Mariani
Are you sure it's the ActiveX control that's adding the commas? The commas could be in the text file created by the ON TABLE SAVE statement.
In your program (fex), the metadata for the file/table called NEWTABLE is called newtable.mas and should be in one of your Application folders. Perhaps it's the VISDIS format type that's adding the commas.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 02, 2009, 05:08 PM
FrankDutch
If you change your query to
TABLE FILE NEWTABLE
PRINT
CLIENT_ID AS 'Client ID'
CLIENT_MKT_SEG AS 'Market Segment'
EMP_PER_ID AS 'PERID'
END
How does it look?
Do you see comma's as well in the output?
Which fields holds the values that should be displayed as numbers without comma's
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
February 02, 2009, 05:09 PM
Francis Mariani
I assume the field with the commas is CLIENT_MKT_SEG. The comma is displayed based on the default display options depending on the USAGE or Displayed Data Type. If the field is defined as a Dnn (eg. D12) then a comma is automatically added to values over 999. To suppress the comma, your code could be modified like this:
TABLE FILE NEWTABLE
PRINT
CLIENT_ID AS 'Client ID'
CLIENT_MKT_SEG/D12c AS 'Market Segment'
EMP_PER_ID AS 'PERID'
ON TABLE SAVE FILENAME
'\\KWVAPWFD02\IBI\WEBFOCUS71\IBI_HTML\VISDIS\BTD\LOA_VISDIZ.TXT'
FORMAT VISDIS
END
The lower-case c in D12c suppresses the comma. I'm not sure if VISDIS overrides this and displays the numeric field with it's own formatting...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 02, 2009, 05:31 PM
<Pants>
There are no commas in the output in either case (format as visdis or with the code change you describe) I can go out and look at the text file created and there are no commas in it either.
quote:
Originally posted by FrankDutch: If you change your query to
TABLE FILE NEWTABLE
PRINT
CLIENT_ID AS 'Client ID'
CLIENT_MKT_SEG AS 'Market Segment'
EMP_PER_ID AS 'PERID'
END
How does it look?
Do you see comma's as well in the output?
Which fields holds the values that should be displayed as numbers without comma's
February 03, 2009, 10:10 AM
GinnyJakes
Please show us the master for NEWTABLE. Or at least the line from it that shows the definition of the market segment field.
Another thing you can try is changing the format to an I for integer.
The commas aren't in the data. They are produced based on the display format in the master of NEWTABLE. That has been stated before and we still need to see it.
You need to set the format of the field in the text file to "S" instead of "R" or "I". Look at this sample..
COUNTRY SALES SALES_A S I S ENGLAND 12000 12000 FRANCE 0 0 ITALY 30200 30200 JAPAN 78030 78030 W GERMANY 88190 88190
SALES_A will not have commas in the data sheet but SALES will. Commas are always shown for numeric (I or R) values as far as I know.
So you can manually edit your resulting text file and change the format to "S" or change the fex that generates the text file and convert the integer to alpha in there by using FTOA..
Sample code:
TABLE FILE CAR SUM SALES COMPUTE SALES_A/A9 = FTOA(SALES, '(D6c)', 'A9'); BY COUNTRY ON TABLE PCHOLD FORMAT VISDIS END
Hope this helps...
Jodye
WF 8.0.0.5M
February 03, 2009, 10:56 AM
<Pants>
Thanks Jodye! That worked
And thanks to the others who tried...I hope I did not test anyones patients to much with my ignorance