Focal Point
[CLOSED] variable column titles

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/328103835

October 01, 2010, 02:02 PM
JOE
[CLOSED] variable column titles
Hello,

I'm not having any success to get my variable column title to work. Basically, it based on if NEWDATE is LT 09/30/2010 make it 'RevPH' else it should be 'RevCr'. It's always displaying RevCr for any date. I suspect it has something to do with my date. Thanks!

Here's DM code:
 DEFINE FILE SQLOUT
-*QDATE/MDYY=QTDATE;
NEWDATE/MDYY=HDATE(QTDATE, 'MDYY');
END

-SET &RPT = NEWDATE;
-SET &COL3HDR = IF &RPT LT '09/30/2010' THEN 'RevPH' ELSE 'RevCr';
-RUN 

This message has been edited. Last edited by: Kerry,


WebFocus 7.7.02 WinXP
October 01, 2010, 02:07 PM
Tom Flynn
  
DEFINE FILE SQLOUT
NEWDATE/MDYY=HDATE(QTDATE, 'MDYY');
XDATE/YYMD = HDATE(QTDATE, 'YYMD');
END
TABLE FILE SQLOUT
SUM
  XDATE
IF RECORDLIMIT EQ 1
 ON TABLE SAVE
END
-RUN
-READ SAVE &XDATE.A10.

-* -SET &RPT = NEWDATE;
-SET &COL3HDR = IF '&XDATE.EVAL' LT '2010/09/30' THEN 'RevPH' ELSE 'RevCr';


Won't comment on the hard-coding...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 04, 2010, 05:08 PM
<JG>
quote:
I'm not having any success to get my variable column title to work


How many values can a variable hold at one time?

The answer is an integer less than 2 but greater than 0.

You will not.

If you want Dynamic column headings then you need a compound report. or
you need to use subhead with indexed / mutiple variables based on a define/compute and a BY.