HI
I have in my report a field with a possibility of 2 decimal or none depending the value of the report:
amount/p15.2 if report code 001
amount/p15 if report code 002
how i can do that
thanks
breyt
If you can get the 'report type' value into an amper variable field (&REPTYPE, for example), the following should work:
-SET &FTYPE = if &REPTYPE EQ '001' THEN 'P15.2' ELSE 'P15';
-RUN
DEFINE FILE BLAH
AMOUNT/&FTYPE = ...;
END
TABLE FILE BLAH
SUM AMOUNT, etc.
END
-RUN
With later releases, there's something called 'field-based reformatting', which allows the format for each row of a report to vary, base on a pre-defined specification.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.