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.
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?
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, 2003
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.
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, 2003
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>,
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, 2003
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. I'm glad I could help.