-DEFAULT &cntry=''; TABLE FILE CAR PRINT COUNTRY CAR ON TABLE SAVE AS CARHLD END -RUN -SET &NBR = &LINES; -REPEAT L_LOOP1 &NBR TIMES -READ CARHLD NOCLOSE &CTR.10. &CAR.16.
-SET &cntry=&CTR -*How can I remove the trailing blank spaces from the &cntry variable here? I tried TRIM with no success! -L_LOOP1 END
April 29, 2005, 03:51 PM
Francis Mariani
This depends on what you want to do with &cntry.
April 29, 2005, 05:32 PM
<new2focus>
&cntry is being displayed on the sub head portion of an included report. The problem is that the subhead style is defined with underline. So the trailing black spaces generating a trailing line after the value.
April 29, 2005, 05:38 PM
Francis Mariani
If &cntry is on it's own on the SUBHEAD line, you could try:
TABLE FILE CAR PRINT CAR BY MODEL ON MODEL SUBHEAD &SUBHEAD1 " " ON TABLE SET STYLESHEET * TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $ TYPE=SUBHEAD, LINE=1, STYLE=UNDERLINE, $ ENDSTYLE END
(In this example, there are many blanks after 'England').
April 29, 2005, 05:53 PM
<JG>
Depends on the version of WebFocus but the truncate function is what you need
-SET &VAR2= TRUNCATE(&VAR1);
April 29, 2005, 06:02 PM
reFOCUSing
Give this a try:
-DEFAULT &CNTRY1=''; TABLE FILE CAR PRINT COUNTRY CAR ON TABLE SAVE AS CARHLD END -RUN -SET &NBR = &LINES; -REPEAT L_LOOP1 &NBR TIMES -READ CARHLD NOCLOSE &CTR.10. &CAR.16.