I'm trying to use column headers like "++", "+++", "++++" in a shift table that I'm generating with proc report. When I specify this in the DEFINE statement, I get a row of plus signs across the entire column rather than the number of plus signs I specified between the quotes.
When I substitute just about any other character for the plus signs:
Similarly, if the first character of a heading is < and the last character is >, or
vice versa, then PROC REPORT expands the heading to fill the space over the column
by repeating the first character before the text of the heading and the last character
This behavior only occurs for listing output, so you can avoid it by writing the report to a non-listing destination such as PDF or HTML. If you must use listing output, you can defeat it by putting a blank before and a blank after the header, so instead of "++HEADER++" use " ++HEADER++ ".
To be completely accurate, when you're writing to a non-listing destination PROC REPORT removes the repeating characters from the header. To retain the plus signs, add an extra blank before and after the header as above.
Message was edited by: Tim@SAS
(with a leading a trailing space) and I'm still getting the plus signs all the way across the column. Unfortunately I can't output to any other format except the regular listing because this output feeds into an existing document management system.
I was hoping that there was some kind of FORMCHAR statement by which I could remove the "+" from any special treatment, but of course if there was such a solution you'd have mentioned it.
I guess I'm out of luck. Maybe they'll have to go with the plan B I suggested -- altering the heading text!
edit: I've read that over and over now that you pointed it out. It should work, dadgummit...
If a blank to start/end the string may not work try a null charcter. In Windows at least, hold down the Alt key and press 255 on the numeric key pad. It looks like a blank when printed but doesn't normally get stripped in other places, so may not in this case as well.
Just an update. I was able to achieve my objective using proc report. Instead of embedding the plus signs in column labels I inserted a "compute before _page_" block and printed the column headers exactly as I wanted them.
Hi.you can use ' line ' statement with noheader option to get that.
But I also find another solution ,You can add a variable before this variable to hold prefix
and add another variable after this variable to hold postfix .
but this solution is only suited for the length of label greater than the length of variable .