Hi: DISPNAME has to be wide enough to display ALL the characters in BABYDATE (8 characters) and the 5 characters in the word Total. I would expect that you are NOT seeing the entire word BABYDATE when you do this report. (Sorry, your PDF wouldn't open for me so that is just a guess.) Without data to experiment with or seeing all of your report in a screen shot, I'm not sure what you mean by your statement that " Instead it created a new column with total at the bottom. " That is exactly what dispname is supposed to do. Here's a modified version of my program and the output:
In my example see how NAME is the first item on the COLUMN statement. If I want the value of NAME on every row to be assigned to the DISPNAME column, then NAME has to be to the left of DISPNAME on the COLUMN statement. You will see this in both Example 2 and Example 3. Also note in #2 how you don't see NAME on the report because the DEFINE for NAME uses the NOPRINT option. But, in both #2 and #3 example, in the COMPUTE block for DISPNAME, I assign the value of NAME on THAT row to be the value of DISPNAME on that row. In your recent example, you assign the fixed string "BABYDATE" to the DISPNAME column -- that's going to give you a fixed string with a length of 6 on every row, which probably is NOT what you want.
In Example #3, notice how I have removed the NOPRINT option from the DEFINE for NAME and I have put DispName as the column header label for the DISPNAME column. So in #3, you should see the same value for student name in the first 2 columns. What NOPRINT does in #2 is allow me to use the value of NAME, but hide it on the report.
Cynthia
... View more