Martin Yergeau Posted November 17, 2021 Share Posted November 17, 2021 Hi community, I know that is possible, I know that it has been share in a post somewhere few months ago, and I just dont remember how to do it. On a tabular report, column formating must change depending on the displayed row. E.g. first row columns must be displayed as /P6C and second row as /P4.2C Col1 Col2 Row1 1 234 56 874 Row2 5.87 1 345.43 I know that can be done from a DEFINEd field but I cant have to proper syntax. Not from a variable, this I know. Thanks Link to comment Share on other sites More sharing options...
David Beagan Posted November 17, 2021 Share Posted November 17, 2021 Im thinking it needs to be a COMPUTE, not a DEFINE. But I guess the COMPUTE could be based on a DEFINE. DEFINE FILE CAR PERCENT_OR_DOLLAR/A1 = IF DEALER_COST GT 10000 THEN '$' ELSE '%'; END TABLE FILE CAR PRINT COMPUTE FMT/A8 = IF PERCENT_OR_DOLLAR EQ '%' THEN 'P9.2C%' ELSE 'P9.2M'; NOPRINT DEALER_COST/FMT AS 'Amount' BY COUNTRY END BY COUNTRY END Link to comment Share on other sites More sharing options...
Martin Yergeau Posted November 17, 2021 Author Share Posted November 17, 2021 This is what I was doing but does not working. My error was that the FMT field was defined as a /A10V instead of a /A10 BTW, it does work with a DEFINEd field only. Thanks David Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now