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     How to display a comma in a column title

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to display a comma in a column title
 Login/Join
 
Gold member
posted
Is it possible to insert a comma in cloumn titles? In general a comma is used to span the title across lines but if we need to display a comma as such in the column titles, is there any escape character which can be used?
 
Posts: 77 | Registered: December 22, 2004Report This Post
Platinum Member
posted Hide Post
Here's a simple example:

-SET &XTITLE = 'AUTO' | '&|#44;' | 'MOBILE';

TABLE FILE CAR
PRINT
CAR AS &XTITLE
BY COUNTRY
END


Regards,
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Virtuoso
posted Hide Post
thangam,

If you are displaying the report in HTML you can use the HTML Number for a comma ',' in the title. The key is to put the pipe symbol '|' after the '&' symbol.

TABLE FILE CAR
PRINT COUNTRY AS 'The&|#44;Country'
ON TABLE PCHOLD FORMAT HTML
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Gold member
posted Hide Post
Hi,
Thanks for the solution you people have given.
But this is working only when the "as" name is applied to a direct measure from a table or cube. When I alias a compute variable with the ASCII value of a comma it gives an error.

One more thing is that, this is working fine only in HTML and Excel. In PDF it just shows the whole string along with '&|#44' in the column title instead of displaying a comma.

Any solutions for the above issues please?
 
Posts: 77 | Registered: December 22, 2004Report This Post
Virtuoso
posted Hide Post
Thangam,

You are correct that this does not work for COMPUTEs. Very interesting. I did not know that.

My suggestion is to use SUBHEADs to create the column titles instead of trying to force the AS phrase to include commas. This is a lot easier to deal with the comma.

Here is an example which will work for HTML, EXL2K and PDF:

TABLE FILE CAR
PRINT
COMPUTE ABRV/A4=EDIT(COUNTRY,'9999'); AS ''
CAR AS ''
BY COUNTRY AS ''
ON COUNTRY SUBHEAD
"The,Country<+0>The,Abreviation<+0>The,CAR"
ON COUNTRY SUBFOOT
""
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=COUNTRY, WRAP=1.5,$
TYPE=REPORT, COLUMN=CAR , WRAP=1.5,$
TYPE=REPORT, COLUMN=ABRV , WRAP=1.5,$
TYPE=SUBHEAD, HEADALIGN=BODY,$
TYPE=SUBHEAD, LINE=1, OBJECT=TEXT, ITEM=1, POSITION=P1,$
TYPE=SUBHEAD, LINE=1, OBJECT=TEXT, ITEM=2, POSITION=P2,$
TYPE=SUBHEAD, LINE=1, OBJECT=TEXT, ITEM=3, POSITION=P3,$
ENDSTYLE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
In PDF We have more problems with extended characters.

If I make a compound report with a graph that has the Euro symbol it gives me not what I want.




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

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
<JJI>
posted
Thangam,

I think, I have a very simple solution for your problem. This code works for a define, compute in html, excel and most important in PDF!!!

  
-SET &XTITLE = 'AUTO' | '&|#44;' | 'MOBILE';
DEFINE FILE CAR
AUTO,MOBILE/A20 = CAR;
END

TABLE FILE CAR
PRINT
CAR AS &XTITLE
AUTO,MOBILE
COMPUTE MOBILE,AUTO/A20 = CAR ;
BY COUNTRY
ON TABLE SET ONLINE-FMT PDF
END


As you can see it is very simple. Just put the ',' in the name of your defined or computed field and voila.

Hope this helps,

This message has been edited. Last edited by: <JJI>,
 
Report This Post
Virtuoso
posted Hide Post
Dirk,

Very nice solution. It definitely works but it makes me nervous using commas in the names of fields. Eeker


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
It happens to be the documented method:

TECHNIQUE - How to have a column title display a comma?


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
Virtuoso
posted Hide Post
Well I have now learned my new thing for today. This sounds like a good Tip & Tech to share at Summit. I never knew about this. The information on Tech Support really brings it to the extreme with commas AND spaces AND a dollar sign in the field name.

Thanks for the link Francis.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
Though, like you, I'm scared to jump in!


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
<JJI>
posted
Mickey, Francis,

Sorry, but I didn't knew this was documented. I found this solution some time ago by accident. But I remembered it when I saw this post and wanted to share it.

Your right it's not the finest coding, but it's working. Smiler
I'm glad I could help. Winky
 
Report 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     How to display a comma in a column title

Copyright © 1996-2020 Information Builders