Focal Point
[CLOSED] Report Painter Sorting by the TOTAL Column.

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

April 08, 2013, 09:57 AM
Scotty823
[CLOSED] Report Painter Sorting by the TOTAL Column.
Thanks to IBI support and everyone help. I got what I need but 1 thing on aesthetics can I sort by the total column that it generates. Here is my code. I've tried a few different by statements but because how I grouped it it will show each detail of other. I was wondering if I could just order by the TOTAL column painter generated. THANKs


SET NODATA = 0.00
SET NULL = ON
SET ORIENTATION = LANDSCAPE
SET EMPTYREPORT = ON
DEFINE FILE BBC_REPORTING
SLINES/A6 MISSING ON=
IF SLINE EQ 'BBCC' THEN SLINE ELSE
IF SLINE EQ 'SBMR' THEN SLINE ELSE
IF SLINE EQ 'IDMC' THEN SLINE ELSE
IF SLINE EQ 'WCXE' THEN SLINE ELSE
IF SLINE EQ 'TBSE' THEN SLINE ELSE 'OTHER';

END
TABLE FILE BBC_REPORTING
SUM
BBC_REPORTING.BBC_REPORTING.MTONS
BY BBC_REPORTING.BBC_REPORTING.SLINES NOPRINT
BY BBC_REPORTING.BBC_REPORTING.COMPANY

ACROSS LOWEST BBC_REPORTING.BBC_REPORTING.SLINES COLUMNS 'BBCC' OR 'SBMR' OR 'IDMC' OR 'WCXE' OR 'TBSE' OR 'OTHER'
ON TABLE SUBHEAD
"US Export Company Ranking Report - Houston "
ON TABLE SUBFOOT
"Report Run On <+0>&DATEMDYY <+0> Cargo Type: NonContainerized "
WHERE ( BBC_REPORTING.BBC_REPORTING.USPORT EQ 'HOUSTON' ) AND ( BBC_REPORTING.BBC_REPORTING.COUNTRY EQ 'ECUADOR' );
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
TYPE=DATA,
COLUMN=ROWTOTAL(1),
JUSTIFY=LEFT,
$
TYPE=DATA,
COLUMN=N3,
JUSTIFY=LEFT,
$
TYPE=DATA,
ACROSSCOLUMN=N1,
JUSTIFY=LEFT,
$
TYPE=TABHEADING,
LINE=1,
JUSTIFY=LEFT,
$
TYPE=ACROSSVALUE,
ACROSS=1,
BACKCOLOR='WHITE',
JUSTIFY=LEFT,
$
TYPE=REPORT,
IMAGE=bbc-chartering.gif,
SIZE=(2.291667 1.000000),
$
TYPE=REPORT,
COLUMN=N2,
WRAP=6.000000,
$
ENDSTYLE
END

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6
Windows, All Outputs
April 08, 2013, 03:39 PM
Doug
How about this train of thought:
DEFINE FILE (whatever)
MyCompany/A64 = DECODE CompanyName (THIS1 Company1 ...  ELSE 'Bogus Company') ;
CompanySort/I1 = IF MyCompany EQ 'Bogus Company' THEN 1 ELSE 0 ; 
END
TABLE FILE (whatever)
PRINT fields ...
BY CompanySort NOPRINT
BY MyCompany PAGE-BREAK
-* Style Stuff...
END

April 09, 2013, 09:17 AM
Mighty Max
I don't see a reason to hold the format as SQLMSS. When you do a hold format SQLMSS a sql table is created.
Just use a regular hold file. You could use format XFOCUS if you need a specific format.
  
TABLE FILE CAR
PRINT
  CAR
BY COUNTRY
ON TABLE HOLD AS H1 
END
-RUN

TABLE FILE CAR
PRINT
  DEALER_COST
BY COUNTRY
ON TABLE HOLD AS H2 
END
-RUN



WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
April 11, 2013, 05:07 PM
Scotty823
Thanks for everyones input I updated this thread. Can I sort by the TOTAL column that report painter generated?


WebFOCUS 7.6
Windows, All Outputs