Focal Point
[Solved] DISPLAYING RESULTS IN COLUMNS

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

January 09, 2009, 10:09 PM
BJK
[Solved] DISPLAYING RESULTS IN COLUMNS
i WANT TO DISPLAY A REPORT IN COLUMNS say first column would be 1 to 15 ...say 16 to 30 in the second column....say 31 to 45 in the third column.. and then continue the same senerio for the second third fourth page or whaever it take to display all results....what this is is an index in alphabetical order going down each column..
any help would be great
thanks

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


Product WF 7.1.6 Windows
Database Oracle
outputs PDF, HTML, EXCEL
January 10, 2009, 03:29 AM
<JG>
Try this

 
TABLE FILE GGSALES
LIST SEQ_NO
BY SEQ_NO NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS SORTED
END
-RUN
DEFINE FILE SORTED
PAGEX/I9= INT(E01 / 45 ) + 1;
PAGE/I9= IF E01 EQ 1 THEN 1 ELSE
           IF PAGEX NE LAST PAGEX THEN LAST PAGE ELSE PAGEX;
CNTR/I9= IF PAGE NE LAST PAGE THEN 1 ELSE LAST CNTR +1;
COL/I9= IF CNTR GE 1 AND CNTR LE 15 THEN 1 ELSE
         IF CNTR GE 16 AND CNTR LE 30 THEN 2 ELSE 3 ;
ROW/I9= IF COL NE LAST COL THEN 1 ELSE LAST ROW +1;
END
TABLE FILE SORTED
SUM   SEQ_NO AS ''
ACROSS COL NOPRINT AS ''
BY PAGE NOPRINT 
BY ROW NOPRINT
ON PAGE PAGE-BREAK
END

January 10, 2009, 04:28 AM
FrankDutch
BJK

Please start updating your signature
to help you better we would like to know what version of the software you do use.

To answer your question.
Start giving your items you want to display a sequence number.
Next step is grouping these sequence numbers in page, column and row numbers.
Then use these 3 index numbers to report.

Suppose your items are numbered from 1 to 100 (S) and you want 15 in a column (C) and 3 columns on a page (P).

Px/I3=MOD(S,45);
P=Px+1;
Cx/I3=MOD((S-Px*45),15);
C/I3=Cx+1;
S2/I2=S-Px*45-Cx*15;

I hope this helps you a bit.

JG was quicker with his example....
I forgot to hit the enter key...




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

January 12, 2009, 10:18 AM
BJK
thanks all this worked


Product WF 7.1.6 Windows
Database Oracle
outputs PDF, HTML, EXCEL