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     Comma in Column Title when using ACROSS and COMPUTE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Comma in Column Title when using ACROSS and COMPUTE
 Login/Join
 
Expert
posted
Why does the comma in the column title of the compute statement not work?

TABLE FILE CAR
SUM
SALES AS ''
DCOST NOPRINT
BY COUNTRY
ACROSS SEATS AS ''
COMPUTE TOT_COST/D15 = DCOST; AS 'TOTAL,COST'
END
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
One of my co-workers opened a case with IBI on this topic...this is the answer he got:

That is because there is a restriction that states that only ONE line
of text is supported with an ACROSS.
You would have to do someting line suppress the default title with
SUM/PRINT field AS ''(two single quotes, next to each other) and then
do a -- ON TABLE SUBHEAD, and basically create your own Heading -- but then
youwould have to make sure to align everythig in it, since you are also
styling the report.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
Prarie22,

Thanks for the information. Unfortunately, as you mention, creating column titles in heading or subheading lines is not a great solution, alignment is a big problem when the report can run for multiple formats.

Cheers.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
"A comma within a FIELD TITLE automatically generates a carriage return. This is
standard behavior that cannot be surpressed."

Yeah right, sounds to me like a bug that was "erradicated" in 4.3.5 has crept back in again!
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
I'm going to make a LOGICAL guess as to why this behavior is true and also give you a suggestion.

Due to the fact that the VALUES of the ACROSS field are used for the TITLES, the changing of a comma to a line break is not done. This makes sense since FOCUS has no idea if the VALUEs will contain commas, how many commas there might be in the VALUEs (there is a limit of 4 commas for a TITLE) and whether or not a user would want them converted to a line break. Even though the AS phrase text appears in the TITLE for the computed field, the disabling of the comma-to-line-break conversion propagates across (no pun intended) the entire "row" of ACROSS TITLEs. Is this a bug or an unforeseen issue yet to be addressed in a patch/release? I do not know because I have not seen this before.

Now for the suggested solution. IF your intended output format is HTML then change the AS 'TOTAL,COST' text to AS 'TOTAL<br>COST'. If you did not know, <br> is the HTML tag for a line break.

I hope this helps.
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
I second mickey's suggestion. that works!
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
The problem is that I have the same report running with three different formats: HTML, PDF and Excel 2000.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Mickey has the right idea. A COMPUTE after an ACROSS creates (internally) another value for the ACROSS field. Since a VALUE can't span multiple lines, the COMPUTEd column title can't either.
 
Posts: 25 | Location: 2 Penn Plaza 28 fl | Registered: March 27, 2003Report This Post
Expert
posted Hide Post
Or I could do it this way:

TABLE FILE CAR
SUM
COMPUTE TOT_COST/D15 = DCOST; AS 'TOTAL,COST'
BY COUNTRY
SUM
SALES AS ''
BY COUNTRY
ACROSS SEATS AS ''
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=TOT_COST, SEQUENCE=99, $
ENDSTYLE
END
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Nice job, Francis. That does the trick.

Back to your original post that started this all, I am perplexed as to why the COMPUTE in your original post gave you one column on the right instead of a column for each ACROSS value. If you move the COMPUTE statement above the BY COUNTRY phrase it then creates a TOT_COST for each SEATS value. Is this supposed to work this way? Is the COMPUTE that appears AFTER the ACROSS phrase treated like an ON TABLE action in some way, kinda like a ROW-TOTAL? Can anyone shed some light on this? Did anyone else find this strange or did I miss an enhancement to the FOCUS language somewhere along the way? Thanks!
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Guru
posted Hide Post
COMPUTEs after the ACROSS did get added somewhere along the way. (I'm pretty sure I couldn't do that in 4.3.6.) I don't know when it came in, but its here by 5.21. It is put on the end just like a rowtotal is.
 
Posts: 391 | Location: California | Registered: April 14, 2003Report 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     Comma in Column Title when using ACROSS and COMPUTE

Copyright © 1996-2020 Information Builders