[SHARING] Probably not a Webfocus question but I don't know who else to ask...
Hi all -
I have an MS Access table connected to webfocus using SQLMAC connection. The field in MS Access is a Text field with a Field Size of 50. Webfocus creates the synonym for this field as A50V usage and actual. Exactly as I expected.
Problem: I run a report on the field. The value of the field is 06/8608. The report shows fine on HTML output. But, when I report it in Excel, the field shows as June-8608.
Okay, so this is probably an Excel problem. And I know I can fix it if I use an Excel template. Unfortunately, this report can change formats depending on certain criteria, so I will have to create a bazillion templates to cover all possibilities. Is there a way I can get Excel to treat it as plain text without a template?
Webfocus Dev Studio Version 7.6.4, MS Office 2003.This message has been edited. Last edited by: Kerry,
WF 8.1.05 Windows
July 14, 2010, 04:32 AM
OPALTOSH
If you don't want to remove the slash or change it then you could try concatenating a single quote to the front of the field value when you send it to excel.
July 14, 2010, 06:30 AM
FrankDutch
What happens if you put a space in front of the field.
Create a new field
NEWFIELD/A51=' '|OLDFIELD;
use this one in the report?
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 14, 2010, 09:47 AM
jgelona
I do what OPALTOSH says. In EXCEL any field starting with a single quote is a text field.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
July 14, 2010, 10:12 AM
Francis Mariani
Interesting that this code does not behave as you describe, the data with the slash shows as alpha.
Also, I don't think adding the quote to the beginning will work, in the example below, the quote displays in the Excel cells.
DEFINE FILE CAR
TEST1/A50V = '06/8608';
TEST2/A51V = '''' | TEST1;
END
TABLE FILE CAR
PRINT
TEST1
TEST2
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K
END
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
July 14, 2010, 11:33 AM
Tony A
I guess a quick question on which display application are each of you using - MS Excel or the browser plugin - and the version? It might make no difference but it would be interesting to find out if that's part of the problem.
For me, I use the plugin (opens in the browser) and I get what Francis describes. Version is 2003 (11.8324.8324) SP3
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
July 14, 2010, 04:22 PM
Francis Mariani
Tony is correct, it is a good idea to state which tool is used. I tried both the MS Excel browser plugin and a saved file opened in MS Excel.
MS Excel 2003 (11.8324.8324) SP3.
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
I GET WHERECLAUSE = 'WHERE SCT_VAL EQ 39ST30000' for example
How can i please GET WHERECLAUSE = 'WHERE SCT_VAL EQ '39ST30000'' Will it work in a TABLE FILE with .EVAL clause ?
Thanks for helping me !
WebFOCUS 7.6 Windows, All Outputs
June 27, 2014, 06:06 AM
Alan B
You could use:
-PROMPT &SAISEC.SECTION.
-SET &WHERECLAUSE = 'WHERE SCT_VAL EQ ' | '''&SAISEC''';
-TYPE LA CLAUSE WHERE = &WHERECLAUSE
The .EVAL should not be required.
Alan. WF 7.705/8.007
June 27, 2014, 06:42 AM
AL59
Hi Alan
Thanks for answering and it's almost working for me with
-PROMPT &SAISEC.SECTION.
-SET &WHERECLAUSE = '''&SAISEC''';
-TYPE LA CLAUSE WHERE = &WHERECLAUSE
-TYPE LA CLAUSE WHERE EVALUEE = &WHERECLAUSE.EVAL
I get SECTION ? ST3000 LA CLAUSE WHERE = '&SAISEC' LA CLAUSE WHERE EVALUEE = 'ST30000'
But as soon as I try to use "|" concatenation operator, the editor line breakes in 2 lines (IBM EMULATOR) and when executing the focexec it says (FOC261) EXPRESSION INCOMPLETE IL MANQUE UNE OPERATION 'FOC261 incomplete expression, an operation is missing Do you know if there is another way for concatenating string ? or IBM experts what am i missing in this editor ?