Hi All, Gud Moring i have a following code which works fine as i have coded. thing i am Struggling here is in the footing section i need to print all the content of the "MODEL" of data type A50 as a list(one after the other). is this possible???
TABLE FILE CAR
PRINT
CAR
BODYTYPE
BY COUNTRY
ON COUNTRY PAGE-BREAK
HEADING
"My Reports "
FOOTING
" <MODEL "
Thanks krish
Prod: WebFOCUS 7.6.5 Excel;HTML;PDF SelfservThis message has been edited. Last edited by: Kerry,
7.1.1 Windows XP HTML
February 10, 2009, 08:22 AM
GamP
This is probable not exactly what you want, but it may be a first step towards the ultimate solution for you:
TABLE FILE CAR
BY COUNTRY
ON TABLE HOLD
END
-RUN
-REPEAT :LOOP &LINES TIMES;
-READ HOLD NOCLOSE &COU.10.
DEFINE FILE CAR
FOOT_MOD/A26 = '"' | MODEL | '"';
END
TABLE FILE CAR
PRINT FOOT_MOD
IF COUNTRY EQ '&COU'
ON TABLE HOLD AS INC_MOD FORMAT ALPHA
END
-RUN
TABLE FILE CAR
PRINT
CAR
BODYTYPE
BY COUNTRY
WHERE COUNTRY EQ '&COU'
ON COUNTRY PAGE-BREAK
HEADING
"My Reports "
FOOTING
-INCLUDE inc_mod.ftm
END
-:LOOP
Hope this helps ...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
February 10, 2009, 10:36 PM
Piipster
Maybe something like this:
TABLE FILE CAR
PRINT
CAR
BODYTYPE
COMPUTE DISP_MOD/A150 = IF COUNTRY NE LAST COUNTRY
THEN MODEL
ELSE SUBSTR(150,(LAST DISP_MOD || (', '|MODEL)),1,150,DISP_MOD;
NOPRINT
BY COUNTRY
ON COUNTRY PAGE-BREAK
HEADING
"My Reports "
FOOTING
" <DISP_MOD "
END
ttfn, kp
Access to most releases from R52x, on multiple platforms.
February 11, 2009, 06:44 AM
krish
Thanks a lot GamP and Piilster.
Gamp i got your solution... problem has been solved
7.1.1 Windows XP HTML
February 22, 2009, 06:55 AM
GamP
Krish,
You said you also needed this for excel. Well, since the idea I gave involves multiple table requests, that's not going to be so very easy. But, if you look at the proces from another angle, it suddenly becomes possible to do this in ultimtelt one request, as per the following example on the car database:
TABLE FILE CAR
BY COUNTRY
ON TABLE HOLD
END
-RUN
-SET &X = &LINES;
-SET &C = 1;
-REPEAT :LOOP_1 &X TIMES;
-READ HOLD NOCLOSE &COU.&C.10.
DEFINE FILE CAR
FOOT_MOD/A26 = '"' | MODEL | '"';
END
TABLE FILE CAR
PRINT FOOT_MOD
IF COUNTRY EQ '&COU.&C'
ON TABLE HOLD AS INC_MOD&C FORMAT ALPHA
END
-RUN
-SET &C=&C+1;
-:LOOP_1
-SET &ECHO='ALL';
TABLE FILE CAR
PRINT
CAR
BODYTYPE
BY COUNTRY
ON COUNTRY PAGE-BREAK
HEADING
"My Reports "
-SET &C = 1;
-REPEAT :LOOP_2 &X TIMES;
ON COUNTRY SUBFOOT
-INCLUDE inc_mod&C...ftm
WHEN COUNTRY EQ '&COU.&C'
-SET &C=&C+1;
-:LOOP_2
END
-RUN
This examples uses the ON .. SUBFOOT WHEN ... which allows it to be one request.