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] Customize Header and subtotal

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Customize Header and subtotal
 Login/Join
 
Gold member
posted
Would like to find out how I could conditionally change the wording of a subtotal. For example on the subtotal line, it currently shows

*TOTAL W GERMANY

can I conditionally change it to

*TOTAL WEST GERMANY

without it affecting the detail rows? (meaning that in the detail section it would still show W GERMANY). For my actual report, the detail section shows a single digit code in the detail and I would like to translate that on the subtotal line to display a fuller description.

I've been trying to search and read about this and seems like I would have to use a sub footer instead, but hoping I don't have to code it as still new territory. If I do, would like to know how to line up the totals with the detail as there are 11 cols for subtotals and totals in the actual report. The sample contains 3, so hopefully is enough for me to get the idea.

For the report heading, I would like to have something like the following (including a variable in part of the header "amperREGION_HDR"):

---for some reason the amper symbol and region are not rendering properly on my browser, hope it doesn't impact the example. ---

  
--------------------------------------------------------------
-Run Date 06/29/12          Title1          Page 1           -
-Run Time 06:10:08          Title2          Program ID ABC   -
-                           amperREGION_HDR                  -
-                                                            -
- COUNTRY CAR   CARSOLD   SALES  DEALER COST                 -
- ENGLAND JAGUAR      0   12000  18,621                      -
 


Alignments of the above heading using the first row as an example:
"Run Date" flush left, "Title" centered "Page 1" near right edge of page

-DEFAULT ®ION = 'FOC_NONE'
-SET &OC='OPEN NOBREAK';
-SET &OPR='NE';
-REPEAT CARLOOP 2 TIMES
-SET ®ION_HDR = IF ®ION EQ '_FOC_NULL' THEN 'All Regions' ELSE ®ION;
DEFINE FILE CAR
REGION/A20=IF COUNTRY EQ 'ENGLAND' OR COUNTRY EQ 'JAPAN' THEN 'ISLAND' ELSE 'MAINLAND';
END
TABLE FILE CAR
SUM
     COMPUTE CARSOLD/I3 = SALES / DEALER_COST;
	 SALES
	 DEALER_COST
BY  LOWEST REGION NOPRINT
BY  LOWEST COUNTRY
BY  LOWEST CAR

ON COUNTRY SUBTOTAL AS '*TOTAL'
HEADING
"®ION_HDR"
WHERE REGION EQ '®ION.(<ALL,_FOC_NULL>,<MAINLAND,MAINLAND>,<ISLAND,ISLAND>).REGION.';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML &OC
-*ON TABLE PCHOLD FORMAT PDF &OC
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
ENDSTYLE
END
-RUN
-SET &OC='CLOSE';
-SET &OPR='EQ';
-SET ®ION = 'MAINLAND';
-CARLOOP
-ENDREPEAT
 

This message has been edited. Last edited by: sxschech,


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Virtuoso
posted Hide Post
To change your subtotal text, you will need to use SUBFOOT. SUBTOTAL does not provide any means to change the values used in the text. To align your SUBFOOT values, use the StyleSheet parameter HEADLIGN=BODY and use spot markers <+0> in the SUBFOOT, if necessary, to skip columns and correctly position the items in the report.

There are at least two ways to create your headings. First, DEFINE heading fields that contain the entire heading row, including the correct number of spaces between items and then use setting SHOWBLANKS=ON to force WF to honor the spaces between items in the headings. Second, specify your headings as usual and then use StyleSheet parameters HEADALIGN=BODY, COLSPAN, LINE, and OBJECT to line up the heading items with specific columns in the report. Both of these methods will require a fair amount of trial and error. It may actually be easier to do this in the painter.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Virtuoso
posted Hide Post
This should help with the name change at SUBTOTAL time:
  
-* File sx01.fex
DEFINE FILE CAR
XCOUNTRY/A16=DECODE COUNTRY(
ENGLAND 'GREAT BRITAIN' 
FRANCE 'LUTECE' 
ITALY 'ROMAN' 
JAPAN 'NIPPON' 
'W GERMANY' 'WEST GERMANY' 
ELSE 'OTHER');
END
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY XCOUNTRY NOPRINT
BY CAR
ON XCOUNTRY SUBTOTAL AS 'Total'
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
@ Daniel: Thank you for dismissing my SUBFOOT nonsense with your clear example of how to alter SUBTOTAL text.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
Thank you Daniel (Danny-SRL) for the decode suggestion. I eventually got it to work as it wasn't as simple to implement for my particular report because I had to do a compute and several defines. Too bad it's not like MS-Access where I can redefine a field at the point where it displays rather than having to do it elsewhere and in many places.

Dan Satchel, I've been trying your suggestion and since I am not familiar with understanding how to code styles, the results were looking horrible. At first, the output was all over the place. Eventually I went back and forth between using the report painter and the code view and was able to get something reasonable.


[update:] I thought it looked ok, but when I resized the browser window or tried to print, the header wrapped in such a way that it was unreadable. I tried printing to PDF instead of html, which keeps the positioning fine, but the point size increased (looks like 12 or 14) and because of that, the remaining cols of the report do not fit on one page. I have been unable to figure out how to get the point size to show up as 9 when output to pdf or if it is possible to scale down the report as can be done in some other programs.


Thank you both for your help, appreciate it very much.

This message has been edited. Last edited by: sxschech,


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report 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] Customize Header and subtotal

Copyright © 1996-2020 Information Builders