![]() |
||||||||||||
Go ![]() | New ![]() | Search ![]() | Notify ![]() | Tools ![]() | Reply ![]() | ![]() |
Member |
Hi All, Is it possible to print two hold files one after the other for summary and detail format in Excel format. able to get like Output holdfiles one hold file followed by next hold file. Below are the hold files TABLE FILE CAR SUM RCOST DCOST BY COUNTRY HEADING "Summary at Country Level" FOOTING "" ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK END TABLE FILE CAR SUM RCOST DCOST BY COUNTRY BY CAR HEADING "Summary at Country and Car Level" FOOTING "" ON TABLE PCHOLD FORMAT EXL2K NOBREAK END TABLE FILE CAR SUM RCOST DCOST BY COUNTRY BY CAR BY MODEL HEADING "Detail at Model Level" FOOTING "" ON TABLE PCHOLD FORMAT EXL2K CLOSE END The output needs to be like COUNTRY RETAIL_COST DEALER_COST ENGLAND 45,319 37,853 COUNTRY CAR RETAIL_COST DEALER_COST ENGLAND JAGUAR 22,369 18,621 JENSEN 17,850 14,940 TRIUMPH 5,100 4,292 COUNTRY CAR MODEL RETAIL_COST DEALER_COST ENGLAND JAGUAR V12XKE AUTO 8,878 7,427 XJ12L AUTO 13,491 11,194 JENSEN INTERCEPTOR III 17,850 14,940 TRIUMPH TR7 5,100 4,292 COUNTRY RETAIL_COST DEALER_COST FRANCE 5,610 4,631 COUNTRY CAR RETAIL_COST DEALER_COST FRANCE PEUGEOT 5,610 4,631 COUNTRY CAR MODEL RETAIL_COST DEALER_COST FRANCE PEUGEOT 504 4 DOOR 5,610 4,631 .... In the excel the output displays like summary row for one record followed by details and second summary row followed by details having page break by country. Any suggestions.. Please update Thank You! WebFOCUS 8 Windows, All Outputs | ||
|
Silver Member |
There may be a better answer but when I've needed to do this kind of thing I've wrapped it up in a loop or two allowing me to repeat the extract or output code a number of times while feeding in a parameter from a generated hold file. So along the lines of: TABLE FILE CAR BY COUNTRY ON TABLE NOTOTAL ON TABLE HOLD AS CLIST END -RUN -SET &CCNT = &LINES ; -REPEAT :ENDREPEAT2 FOR &I FROM 1 TO &CCNT -READFILE CLIST -RUN . . . your extract code + Where COUNTRY EQ ‘&COUNTRY’ ; . . . -:ENDREPEAT2 -RUN 7.7.05 Windows. | |||
|
Virtuoso |
Basically, what you are requesting is subtotals on each BY field where the subtotal is above the detailed line Does something such as this may suits your need ? TABLE FILE CAR SUM RETAIL_COST DEALER_COST BY COUNTRY ON COUNTRY RECOMPUTE AS 'Country Total' BY CAR ON CAR RECOMPUTE AS 'Car Total' BY MODEL ON MODEL RECOMPUTE AS 'Model Total' ON TABLE PCHOLD FORMAT XLSX -* To create a "page-break" (new tab) in Excel ON TABLE SET COMPOUND BYTOC -* To have the subtotal placed above the detailed data ON TABLE SET SUBTOTALS ABOVE ON TABLE SET PAGE-NUM NOLEAD -* To make all BY fields displayed on each line ON TABLE SET BYDISPLAY ON -* To avoid the display of the Grand-Total ON TABLE NOTOTAL ON TABLE SET LINES 999999 ON TABLE SET HTMLEMBEDIMG ON ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $ ENDSTYLE END -RUN WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007 | |||
|
Member |
Thank You Martin. Can we display the column names separately for each subtotal fields. WebFOCUS 8 Windows, All Outputs | |||
|
Virtuoso |
What do you mean by the above ? Can you illustrate with a sample output ? WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007 | |||
|
Powered by Social Strata |
![]() | Please Wait. Your request is being processed... |
|