Focal Point
Active HTML Calculation

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

June 10, 2008, 11:59 AM
KyleM
Active HTML Calculation
It appears that when running Active HTML that using the Calculate feature will calculate based on all data in the report regardless of having a sort by field as your drop down list at the top of a report. Can someone please clarify. Thanks!
June 10, 2008, 12:16 PM
Tom Flynn
Kyle,

From the IBI documentation:

Creating Reports With WebFOCUS Language > Navigating Within an HTML Report > Creating an HTML Active Report

Example: Creating an HTML Active Report
The following code generates an HTML Active Report.
  
TABLE FILE CENTORD
SUM
     ORDER_NUM
     ORDER_DATE
     QUANTITY
     LINEPRICE
     BY PLANTLNG AS 'Plant'
ON TABLE SET PAGE-NUM OFF 
ON TABLE SET BYDISPLAY ON 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT AHTML 
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT, $
TYPE=REPORT,
     GRAPHCOLOR='GREEN',
     GRAPHCOLORNEG='RED', $
TYPE=REPORT,
     FONT='ARIAL',
     SIZE=9,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
     FREEZE-WIDTH=AUTO,
     LINES-PER-PAGE=30,
     CALC-LOCATION =BOTTOM,$
TYPE=TITLE, STYLE=BOLD, $
TYPE=REPORT,
     OBJECT=MENU,
     COLOR=RGB(0 51 102),
     HOVER-COLOR='WHITE',
     BACKCOLOR=RGB(51 204 204),
     HOVER-BACKCOLOR='PURPLE',
     BORDER-COLOR='FUCHSIA', $
TYPE=REPORT,
    OBJECT=STATUS-AREA,
    COLOR=RGB(153 51 0),
    BACKCOLOR='AQUA', $
TYPE=REPORT,
    OBJECT=CURRENT-ROW,
    HOVER-BACKCOLOR=RGB(255 255 153),
    BACKCOLOR=RGB(255 153 0), $
TYPE=REPORT,
     OBJECT=CALC-AREA,
    COLOR=RGB(153 51 0),
    BACKCOLOR=RGB(255 204 153), $

TYPE=REPORT, COLUMN=N2, CALCULATION=CNT, $
TYPE=REPORT, COLUMN=N4, CALCULATION=SUM, $

ENDSTYLE
END


The column notations, Nx, begin at the first BY column, regardless of NOPRINT, then the PRINT/SUM columns:

N2 is column ORDER_NUM
N4 is column QUANTITY


Hope this helps...

Tom

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe