Focal Point
Display graph - 20 records per page

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

May 07, 2007, 04:33 PM
Kamesh
Display graph - 20 records per page
Instead of displaying a graph for all the records, I wanted to be display the graph for 20(based on input) records per page.

Example: if you have 40 records in your hold file and the input they select is 10 then I have to display 4 graph (10 records per graph).

One way I am thinking of doing this by get the record number and display it based on record number.

TABLE FILE CAR
LIST CAR COUNTRY DEALER_COST RETAIL_COST
ON TABLE HOLD AS TEMPDAT
END

SET GRMERGE = ON
GRAPH FILE TEMPDAT
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
WHERE E01 LE 5
END

GRAPH FILE TEMPDAT
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
WHERE E01 GT 5 AND E01 LE 10
END
-EXIT

Anybody worked on this kind of requirement. Any other thought and the efficient way of doing this. Please let me know.

Thanks


WFConsultant

WF 8105M on Win7/Tomcat
May 07, 2007, 05:20 PM
Trav
I think this will do the trick:

-*GET THE PAGE BREAK VALUE
-DEFAULT &CNT = 5
TABLE FILE CAR
LIST CAR COUNTRY DEALER_COST RETAIL_COST
ON TABLE HOLD AS TEMPDAT
END
-*
-*GET THE RECORD COUNT
-SET &RECCNT = &RECORDS;
-*
-*INIT THE LOW & HIGH VARIABLES
-SET &LOW = 0;
-SET &HIGH = &CNT;
-*
-*TURN GRAPH MERGE ON
SET GRMERGE = ON
-*
-*BEGIN THE LOOP
-LOOPSTART
GRAPH FILE TEMPDAT
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
WHERE E01 GT &LOW AND E01 LE &HIGH
END
-*ADD THE PAGE BREAK VALUE TO HIGH & LOW
-SET &LOW = &LOW + &CNT;
-SET &HIGH = &LOW + &CNT;
-*IF WE HAVEN'T PASSED THE INITIAL RECORD COUNT, CONTINUE THE LOOP
-IF &LOW LE &RECCNT GOTO LOOPSTART;
-LOOPEND
-EXIT




Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF