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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
column headings
 Login/Join
 
Platinum Member
posted
I want my column heading to change depending on the data. Is there a way to do this without doing a compound report?

I currently have it working by using a subhead but if my report goes to a 2nd page, the original column headings appear and I want the subheading to appear instead of the column headings since the data at the point is my indices information.

My data_type is either category information (A) or indices information (I). My description field should be called category if my data_type eq 'A' or it should be called indices if my data_type eq 'I'.

My category information appears first so I have

table file car
print description as 'category'
marketvalue as 'market value'
pct.marketvalue as '% of total'
end

My columns for category information are:

category market value % of total

and for indices information:

indices market value % of total

I tried putting an if statement in my print and changing the column heading depending on data_type but that didn't work.

Any suggestions?
 
Posts: 179 | Registered: November 10, 2004Report This Post
Gold member
posted Hide Post
try this

-set &heading/a8= if description eq 'a' then 'category' else if description eq 'i' then 'indices';

table file car
print description as '&heading'
marketvalue as 'market value'
pct.marketvalue as '% of total'
end
 
Posts: 76 | Registered: October 28, 2003Report This Post
<Pietro De Santis>
posted
Unfotunately, that's not going to work.

1) You cannot have a field format in a -SET command.

2) I don't think this can be done, you cannot base the AS statement on the data being printed on the report.
 
Report This Post
Virtuoso
posted Hide Post
Wanting to try something of course the CAR file doesn't have the fields, but I did some playing, of course this doesn't line up well in HTML nor excel, but:

-*just so I could force a page - break
SET LINES = 14
SET STYLEMODE = FIXED
DEFINE FILE CAR
COUNTEX/I2 WITH MODEL = (COUNTEX + 1);
REM/I1 WITH MODEL = IMOD ( COUNTEX, 2, REM );
DESCRIPTION/A1 WITH MODEL = IF REM EQ 0 THEN 'A' ELSE 'I';
MARKETVALUE/D12.2 = RETAIL_COST;
HEADMARK/A10 WITH MODEL = IF DESCRIPTION EQ 'A' THEN 'CATEGORY' ELSE 'INDICES';
END
TABLE FILE CAR
HEADING
"<HEADMARK MARKET VALUE % OF TOTAL PAGE: <TABPAGENO"
" "
PRINT DESCRIPTION AS ''
MARKETVALUE AS ''
PCT.MARKETVALUE AS ''
BY DESCRIPTION NOPRINT
ON DESCRIPTION
*-put in so if you don't page-break on the indices you will get the title change
SUBHEAD
" "
"INDICES MARKET VALUE % OF TOTAL"
" "
WHEN DESCRIPTION EQ 'I' AND TABPAGENO GT 1
END
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
ON my last post should most likely not have left the tabpageno in it.
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
this works like a charm(i'm in 525):
-SET &HDCOST = IF &WHICHCOST EQ 'STCOS' THEN 'Standard Cost' ELSE 'Actual Cost';
...
then in your code, not only the &var as a header but also a mouseover with info ( a bonus).

COST AS '<span title="Units * STSOC or STACC "> &HDCOST *,(d)</span>'

key is to make sure your &HDCOST header thing is separated by a blank before and after when you stick it in your AS phrase.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders