Focal Point
[SOLVED]Repeating SubTotals

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

May 04, 2009, 04:44 PM
Fernando
[SOLVED]Repeating SubTotals
Country Car Cost
A1      B1    10
A1      B2     2
Subtotal A1   12
B1      C1     8
B1      C2    12
Subtotal B1   20

Subtotal A1   12
Subtotal B1   20

We have a standard report to create with # and subtotals. All easy to do.
We have been asked repeat the subtotals at the bottom.

Any ideas?

Fernando

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


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
May 04, 2009, 05:33 PM
Francis Mariani
Fernando,

I'd say you can do this with FRL.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 05, 2009, 03:02 AM
Danny-SRL
Or with McGuyver


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

May 05, 2009, 03:15 AM
Danny-SRL
Example of McGuyver:

  
-* File Fernando1.fex
SET NODATA = ' '
JOIN BLANK WITH SALES IN CAR TO BLANK IN FSEQ AS B_
-*
DEFINE FILE CAR
BLANK/A1 WITH SALES=' ';
XCOUNTRY/A16=IF COUNTER EQ 2 THEN 'Total ' | COUNTRY ELSE COUNTRY;
XCAR/A16=IF COUNTER EQ 2 THEN ' ' ELSE CAR;
END
-*
TABLE FILE CAR
SUM SALES
BY COUNTER NOPRINT SUBFOOT
" "
BY XCOUNTRY AS COUNTRY 
ON XCOUNTRY SUBTOTAL AS 'Total' WHEN COUNTER EQ 1
BY XCAR AS CAR
WHERE COUNTER LE 2
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ONLINE-FMT STANDARD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF, $
ENDSTYLE
END


Output:
  
  COUNTRY           CAR                SALES                                    
  -------           ---                -----                                    
  ENGLAND           JAGUAR             12000
                    JENSEN                 0
                    TRIUMPH                0
  
  Total ENGLAND                        12000
  
  FRANCE            PEUGEOT                0
  
  Total FRANCE                             0
  
  ITALY             ALFA ROMEO         30200
                    MASERATI               0
  
  Total ITALY                          30200
  
  JAPAN             DATSUN             43000
                    TOYOTA             35030
  
  Total JAPAN                          78030
  
  W GERMANY         AUDI                7800
                    BMW                80390
  
  Total W GERMANY                      88190
  
   
  Total ENGLAND                        12000
  
  Total FRANCE                             0
  
  Total ITALY                          30200
  
  Total JAPAN                          78030
  
  Total W GERMANY                      88190
  
   




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

May 05, 2009, 08:51 AM
Fernando
Either of the solutions is good.

Thanks guys.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03