Focal Point
[CLOSED - no simple solution] Subtotal title for ACROSS when using ordered across

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1207076276

September 15, 2014, 06:49 AM
Martin vK
[CLOSED - no simple solution] Subtotal title for ACROSS when using ordered across
Hi,

It was difficult to make a proper subject, but it is easier to explain my question with a CAR example.

I have a report where I want to put the ACROSS values (say COUNTRY) in a specific order.
I use a DEFINE for the requested order and do a ACROSS NOPRINT.

DEFINE FILE CAR
COUNTRY_SORT/I2 = DECODE COUNTRY('JAPAN' 1 'W GERMANY' 2 'ENGLAND' 3 'FRANCE' 4 'ITALY' 5 ELSE 99);
END
TABLE FILE CAR
SUM SALES
BY SEATS
ACROSS BODYTYPE
ACROSS COUNTRY_SORT NOPRINT SUBTOTAL AS 'Total'
ACROSS COUNTRY 
END


I want a subtotal column over all the countries (within bodytype).
I need to do ACROSS COUNTRY_SORT NOPRINT SUBTOTAL AS 'Total'
This indeed gives the requested subtotal column, but the title is ignored. This makes sense as it is a NOPRINT column.
But how can I get a proper title?
A SUBTOTAL on the ACROSS COUNTRY does not work as it is a subtotal within COUNTRY_SORT so every column will be repeated.

Is there a way to get the title within this TABLE request? As the original report is very complex and dynamic, I'd rather not resort to extra hold files.

Martin.

This message has been edited. Last edited by: Martin vK,


WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
September 15, 2014, 07:30 AM
Alan B
Hi Martin

A bit of a kluge that may be acceptable:
DEFINE FILE CAR
COUNTRY_SORT/A20 = DECODE COUNTRY('JAPAN' '      JAPAN' 'W GERMANY' '     W GERMANY' 'ENGLAND' '    ENGLAND' 'FRANCE' '   FRANCE' 'ITALY' '  ITALY' ELSE ' ');
END
TABLE FILE CAR
SUM SALES
BY SEATS
ACROSS BODYTYPE
ACROSS COUNTRY_SORT AS COUNTRY  SUBTOTAL AS 'Total'
END



Alan.
WF 7.705/8.007
September 15, 2014, 08:05 AM
Martin vK
Hi Alan,

Nice workaround which I do use in some reports with limited columns.
Problem is that we have a generic report generator with some attributes that could be selected for the across have 100+ values, so gets a bit messy. HTML output will remove the spaces, but e.g. in PDF or Excel they will show.

Martin.


WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster