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] Once more - totals split over two lines

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Once more - totals split over two lines
 Login/Join
 
Virtuoso
posted
I know that there are many topics on this issue.
I have read them all. But I could not find one that would help me with my problem.
I have a simple table request, that has no by-fields, but which does have an ON TABLE COLUMN-TOTAL.
This total will be split up over two lines in all cases, no matter the length of the first field in the report.
Now, I need this unsorted output for my report, so sorting on the field is not an option. And I also need the column-totals.

The following is a solution for this situation, that will produce only 1 total line:
TABLE FILE CAR
PRINT
     CAR
     COUNTRY
     MODEL
     BODYTYPE
     SEATS
     DEALER_COST
     RETAIL_COST
     COMPUTE ORDFLD/I4 = ORDFLD + 1; NOPRINT
BY TOTAL COMPUTE NOPRINT
BY CAR
ON CAR COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     BORDER=LIGHT,
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
ENDSTYLE
END

The trick is in computing the sort-field, before sorting on it. That way you will keep the unsorted order that would have been generated without the BY's.

Hope this may also help someone else with the similar problem.

This message has been edited. Last edited by: FP Mod Chuck,


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
GamP, i tried your code, and i'm just not getting it...
Its coming out in alphabetical order BY CAR
and CAR is listed twice.
I don't see how the original file order remains unsorted.
ON CAR COLUMN-TOTAL doesn't seem to do anything, so i changed it to ON TABLE.
Can you clarify? i'm puzzled.

If i change it to this:

DEFINE FILE CAR
ORDFLD/I4 WITH CAR=ORDFLD + 1 ;
END
TABLE FILE CAR
PRINT
-*      CAR
     COUNTRY
     MODEL
     BODYTYPE
     SEATS
     DEALER_COST
     RETAIL_COST
-*COMPUTE ORDFLD/I4 = ORDFLD + 1;  
BY TOTAL ORDFLD NOPRINT
 BY CAR  
ON TABLE COLUMN-TOTAL AS 'TOTAL'

it seems to work ok and the records are in their original order.
And just dumping the records does result in a split total line. So both the original order field AND the a visible BY field (car) seem to be necessary to get this particular no-split total on an unsorted file.

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Susannah,

I stand corrected.
Your remakrs are true, I was a little bit too anxious to get this recorded. Sorry about the confusion, and of course your bit of code is correct.
One additional remark though:
The total line will still split into two lines if the sort field is not long enough to accomodate the text used to identify the total. So if I were to specify
ON CAR COLUMN-TOTAL AS 'Total for the table'
it would still split. I would have to increase the size of the first visible by-column to prevent splitting.

Regards,


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
ah! i know just what you mean...




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
The solution to this issue can be found at link:https://www.informationbuilders.com/support/developers/how-display-report-totals-and-descriptions-same-line
 
Posts: 14 | Location: West Palm Beach | Registered: March 02, 2005Report 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] Once more - totals split over two lines

Copyright © 1996-2020 Information Builders