Focal Point
Multiple Excel one page

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

January 10, 2006, 03:39 PM
Prarie
Multiple Excel one page
I need 3 small spreadsheets on one spreadsheet page.
I tried using Resource Layout...but it turns the spreadsheets into HTML pages. Any thoughts?


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
what we do here is build 3 separate webqueries, and then phyically copy 2 of them onto the excel page of the first one.
save it.
then refresh data for all of them.
works every morning like a charm.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Would you happen to have a small example of exactly what you are saying?? Please... Red Face


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
sure, article on FP focus on developers




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
A possible alternative would be to build a combination of your data requirements into a single table and then use FML to construct the output into EXL2K.

I have this example which may help you. It uses a dynamic FML technique to determine what FOR statements you would require (which helps to make it future proof?) and you would have to analyse your data before you start coding to determine how best you can achieve your end report.

Copy and paste this into a new fex and run it to see the output -
SET HOLDLIST = PRINTONLY
APP FI FMLHOLD DISK FMLHOLD.FTM
-RUN
TABLE FILE CAR
SUM COMPUTE TABLE/A10 = 'CAR';
    CAR/A30
    DCOST/D12.2
    RCOST/D12.2
BY CAR NOPRINT
ON TABLE HOLD AS FMLHOLD
END
-RUN
APP FI FMLHOLD DISK FMLHOLD.FTM (APPEND
-RUN
TABLE FILE GGSALES
SUM COMPUTE TABLE/A10 = 'GGSALES';
    PRODUCT/A30
    DOLLARS/D12.2
    UNITS/D12.2
BY PRODUCT NOPRINT
ON TABLE HOLD AS FMLHOLD
END
-RUN
TABLE FILE FMLHOLD
BY TABLE NOPRINT
BY PRODUCT
ON TABLE SAVE AS COLUMNS FORMAT ALPHA
END
-RUN
-? &
-SET &Cnt = 0;
-SET &Iter = &LINES;
-REPEAT :Loop1 &Iter TIMES;
-READ COLUMNS, &Column&Cnt.EVAL
-SET &Cnt = &Cnt + 1;
-:Loop1
-RUN
TABLE FILE FMLHOLD
SUM DOLLARS AS 'Column 1'
    UNITS   AS 'Column 2'
BY TABLE NOPRINT SKIP-LINE
FOR PRODUCT
-* --------------------------
-* Here we repeat the FOR statements as many times as there are column values
-* We also build the RECAP for the Total line
-* --------------------------
-SET &Cnt = 0;
-SET &TotalLine = '';
-REPEAT :Loop2 &Iter TIMES;
'&Column&Cnt.EVAL' WHEN EXISTS LABEL LABEL&Cnt.EVAL OVER
-SET &TotalLine = IF &Cnt EQ 0 THEN 'LABEL&Cnt.EVAL' ELSE &TotalLine | ' + LABEL&Cnt.EVAL';
-SET &Cnt = &Cnt + 1;
-:Loop2
RECAP YTOTAL = &TotalLine; AS 'Total'
ON TABLE PCHOLD FORMAT EXL2K
END


Good luck

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
Tony A Hi There!!!

I tried to execute the code you put in localhost/ibi_html but, the down frame get white... no error returned...

Any idea what happens?



____________________________________________
Ruben Rueda
Consultant
Information Builders Iberica

Web: http://www.eruben.biz

Prod: WF 5.3.4 @ Red Hat Enterprise Linux ES 3 (Taroon Update 6) w/Oracle 9i
Test: WF 5.3.3 @ SUN Solaris 7 w/Oracle 8i
Ruben,

Just copy and paste the code into a fex in Dev Studio and then run it.

Why are you trying to put it in ../ibi_html? Confused.....

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
Ah, I see what you mean ... you are pasting it into the adhoc fex screen in ../ibi_html. I understand now.

Will try running that and see what I get.

T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
There was an error before...

I executed your code in the server, so I might be a bad configuration problem, becasu from Developer Studio in local mode, I can run it without problem Smiler

Anyway.... the execution returns fields from table car and ggorder. Car's fields are ok, but ggorder's fields are all like ########

Why? Red Face



____________________________________________
Ruben Rueda
Consultant
Information Builders Iberica

Web: http://www.eruben.biz

Prod: WF 5.3.4 @ Red Hat Enterprise Linux ES 3 (Taroon Update 6) w/Oracle 9i
Test: WF 5.3.3 @ SUN Solaris 7 w/Oracle 8i
Hmmmm... all I get is CGI misbehaved etc.

If you don't want to use Dev Studio (or can't because you don't have it?) then try putting it into ../ibi/apps/baseapp/multiexcel.fex and then use the URL
http://localhost/cgi-bin/ibi_cgi/ibiweb.exe?IBIAPP_app=baseapp&IBIF_ex=multiexcel


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
The ###### indicate that the cell width is not wide enough to accomodate the value being shown. Drag the cell width a bit wider to see the values.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
Yes, it works that way Smiler

About the #### you were right, the field couldn't be shown because of the column width.

Many Thanks.



____________________________________________
Ruben Rueda
Consultant
Information Builders Iberica

Web: http://www.eruben.biz

Prod: WF 5.3.4 @ Red Hat Enterprise Linux ES 3 (Taroon Update 6) w/Oracle 9i
Test: WF 5.3.3 @ SUN Solaris 7 w/Oracle 8i
Thanks Tony....That worked fine in Developers Studio...Thanks Susannah...for the direction...I think I have it now.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003