Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Display '&amp' instead of '&'

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Display '&amp' instead of '&'
 Login/Join
 
Gold member
posted
Hi,

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
May

This 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
 
Posts: 51 | Registered: December 15, 2006Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
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
 
Posts: 51 | Registered: December 15, 2006Report This Post
Gold member
posted Hide Post
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
 
Posts: 51 | Registered: December 15, 2006Report This Post
Gold member
posted Hide Post
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
 
Posts: 51 | Registered: December 15, 2006Report This Post
Expert
posted Hide Post
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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
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
 
Posts: 51 | Registered: December 15, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Display '&amp' instead of '&'

Copyright © 1996-2020 Information Builders