I like to print 2 foot notes on each page if any of the detail lines on the current page satisfy certain conditions. 2 conditions are independent and transitional, will be phased out over time.
Any sugguestions?
Thanks.
HuaThis message has been edited. Last edited by: Hua,
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
April 07, 2010, 04:43 PM
Dan Satchell
Can you DEFINE or COMPUTE fields for the FOOTING that contain a value if the condition(s) are true and blank when false?
DEFINE FILE ...
FOOTING1/A50 = IF <condition is true> THEN '<text>' ELSE ' ';
FOOTING2/A50 = IF <condition is true> THEN '<text>' ELSE ' ';
END
TABLE FILE ...
PRINT/SUM ...
BY ...
HEADING
"..."
FOOTING
"<FOOTING1 "
"<FOOTING2 "
END
WebFOCUS 7.7.05
April 07, 2010, 04:51 PM
Hua
Thanks Dan, this should do it.
quote:
DEFINE FILE ... FOOTING1/A50 = IF "condition is true" OR LAST FOOTING1 NE ' ' THEN "text" ELSE ' '; FOOTING2/A50 = IF "condition is true" OR LAST FOOTING2 NE ' ' THEN 'text' ELSE ' '; END
Hua
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
April 07, 2010, 05:19 PM
Hua
Not quite, how do I reset the fields to blanks on page-break?
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
April 07, 2010, 05:34 PM
Dan Satchell
Can you use SUBFOOT instead of FOOTING?
ON <sort break> COMPUTE/RECAP FOOTING1/A50 = ... ;
ON <sort break> COMPUTE/RECAP FOOTING2/A50 = ... ;
ON <sort break> PAGE-BREAK AND SUBFOOT
"<FOOTING1 "
"<FOOTING2 "
WebFOCUS 7.7.05
April 07, 2010, 05:45 PM
Hua
Dan,
I am just thinking it aloud, that could the foot notes be reset before printing, using the recap/recompute?
Hua
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
April 07, 2010, 10:12 PM
Ram Prasad E
quote:
ON COMPUTE/RECAP FOOTING1/A50 = ... ; ON COMPUTE/RECAP FOOTING2/A50 = ... ; ON PAGE-BREAK AND SUBFOOT ""
you can use WHEN phrase to conditional display for SUBFOOT
ON <sort break> PAGE-BREAK AND SUBFOOT
"<FOOTING1 "
"<FOOTING2 "
WHEN <condition>;
I see where you and Dan trying to lead me to. I had few attempts but not getting anywhere.
Here is the sample I WISH it worked:
TABLE FILE CAR
PRINT
MODEL
SEATS
DEALER_COST
BY COUNTRY
BY CAR
ON COUNTRY
SUBFOOT WITHIN
"*some models have 2 seats"
WHEN MIN.SEATS EQ 2;
SUBFOOT
"**SOME MODELS HAVE 5 SEATS"
WHEN MAX.SEATS EQ 5;
END
This message has been edited. Last edited by: Hua,
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
April 08, 2010, 11:35 AM
Dan Satchell
What isn't working? If you add a PAGE-BREAK on COUNTRY, the output seems to do exactly what you wanted.
TABLE FILE CAR
PRINT MODEL
SEATS
DEALER_COST
BY COUNTRY PAGE-BREAK
BY CAR
ON COUNTRY
SUBFOOT
"*some models have 2 seats"
WHEN MIN.SEATS EQ 2;
SUBFOOT
"**SOME MODELS HAVE 5 SEATS"
WHEN MAX.SEATS EQ 5;
END
WebFOCUS 7.7.05
April 08, 2010, 11:56 AM
Hua
It only worked on either one condition. When forced to run with 2 conditions, only the last one was tested. GUI too drops the first condition.
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
April 08, 2010, 12:43 PM
Hua
I recall now that some posts suguested using the stylesheet to fool the appearance of the report seems do the trick.
I might have to use this trick for now. Hope someone come up with better solution.
DEFINE FILE CAR
NOTE1/A50 = '* some models have 2 seats';
NOTE2/A50 = '** SOME MODELS HAVE 5 SEATS';
END
TABLE FILE CAR
PRINT
MODEL
SEATS
DEALER_COST
BY COUNTRY
BY CAR
ON COUNTRY SUBFOOT
"<NOTE1"
"<NOTE2"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
DEFMACRO=COND0001,
MACTYPE=RULE,
WHEN=N4 NE 2,
$
DEFMACRO=COND0002,
MACTYPE=RULE,
WHEN=N4 NE 5,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
TYPE=SUBFOOT,
BY=1,
LINE=1,
OBJECT=FIELD,
ITEM=1,
COLOR='WHITE',
MACRO=COND0001,
$
TYPE=SUBFOOT,
BY=1,
LINE=2,
OBJECT=FIELD,
ITEM=1,
COLOR='WHITE',
MACRO=COND0002,
$
ENDSTYLE
END
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
April 08, 2010, 01:07 PM
Hua
quote:
What isn't working?
SUBFOOT WITHIN... The keyword WITHIN was missing. GUI doesn't seem to like it.
Thanks for your help.
HuaThis message has been edited. Last edited by: Hua,