When I generated report with Excel format, there was a data contains '&', but it displayed as '&'. But if I generated the same report with HTML format, the '&' can be displayed properly. Does anyone know how to solve it?
Thanks MayThis message has been edited. Last edited by: Kerry,
May
WebFOCUS 7.6.8 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - MS SQL Server 2005 - DataMigrator 7.6.9
December 08, 2009, 01:52 PM
Francis Mariani
May,
The & should display correctly in an EXL2K report.
This works:
TABLE FILE CAR
SUM SALES
COMPUTE TEXT/A20 = 'APPLES & ORANGES';
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K
END
Maybe the problem is somewhere else.
What is the text that is displayed with &?
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
December 08, 2009, 01:56 PM
May
Francis,
Here is the sample: GAMBLE MARVIN JAMES & DOLORES JTWROS. It should display as 'GAMBLE MARVIN JAMES & DOLORES JTWROS.
I am reading the data from WebService. Will it cause problem?
May
WebFOCUS 7.6.8 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - MS SQL Server 2005 - DataMigrator 7.6.9
December 08, 2009, 01:58 PM
May
Oh no, it displayed correcly when this reply posted.
It displayed as "GAMBLE MARVIN JAMES '& 'DOLORES JTWROS".
May
WebFOCUS 7.6.8 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - MS SQL Server 2005 - DataMigrator 7.6.9
December 08, 2009, 02:01 PM
May
It displayed correcly again.
My excel output looks like 'GAMBLE MARVIN JAMES & a m p; DOLORES JTWROS'. Of course no space between amp.
May
WebFOCUS 7.6.8 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - MS SQL Server 2005 - DataMigrator 7.6.9
December 08, 2009, 04:18 PM
Tony A
You mean 'GAMBLE MARVIN JAMES & DOLORES JTWROS'?
The & is treated as a special character and will be expanded in HTML / XML output to &.
Try using HEXBYT or something similar to get the char through to your required output.
Bearing in mind that you will have created the original posting (and subsequent ones) via an HTML input form, I guess that you will continue to have difficulty with this.
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
December 08, 2009, 05:12 PM
Francis Mariani
May,
& is the web code for &. To make it display properly in an html page (this forum) you need to code as
&
The first & is to show the & character, the amp; is to show the rest.
Now, to the problem you're having - it seems WebFOCUS Web Services is returning &. One way to solve the problem is to use the STRREP function - "Replace Character Strings".
Try something like this:
DEFINE FILE CAR
TEST1/A100 = COUNTRY | ' &|amp; ' | CAR;
END
TABLE FILE CAR
PRINT
TEST1
COMPUTE TEST1X/A100 = STRREP(100, TEST1, 5, '&|amp;', 1,
'&', 100, 'A100');
BY COUNTRY
BY CAR
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
December 09, 2009, 09:33 AM
May
Francis,
It is working. Thank you so much.
May
May
WebFOCUS 7.6.8 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - MS SQL Server 2005 - DataMigrator 7.6.9