Using SAS 9.2
I am sucessfull in getting all values in a column to conditionally format. Now I only want Female valued columns (not Males) to be highlighted. No matter what I try, both male and females are highlighted. Here is my latest attempt with the my SAS code and report sample! Notice that I conditionally format cells using a a couple of proc formats! (Plus I have changed the names of variables, etc for confidentiality)
Linda
Hi:
Items under an ACROSS variable need to be referenced with absolute column names. I've posted a couple of examples of tis in previous forum postings:
https://communities.sas.com/message/50996#50996
https://communities.sas.com/message/112134#112134
https://communities.sas.com/message/49987#49987
https://communities.sas.com/message/28822#28822
https://communities.sas.com/message/20444#20444
There seem to be a few glitches in some of the postings. The absolute column numbers are referenced as _c2_, _c3_ (underscore,c#,underscore)....but the forum mechanism seems to show them as C2 and C3 (which is incorrect). For a user group paper that discusses absolute column numbers, refer to this paper (starting on page 12-13):
http://support.sas.com/rnd/papers/sgf07/sgf2007-report.pdf
You will have to work with Tech Support on the use of multi-label formats in a style override. As far as I know, you MUST specify the MLF option on your DEFINE statement to use a multi-label format in PROC REPORT. Since the STYLE override doesn't have a place of way to specify MLF, I'm not even sure that the conditional highlighting will work.
So, I see several problems with your code. As for adjusting the size of your PROC REPORT output, depending on your version of SAS, you would use either OUTPUTWIDTH= or WIDTH= to specify a size for the REPORT piece of your output.
SAS 9.1.3:
proc report data=... style(report)={outputwidth=6in};
OR
SAS 9.2/9.3:
proc report data=... style(report)={width=6in};
OUTPUTWIDTH should actually work for any version of SAS, I wanted to show both possibilities.
cynthia
Hi:
Items under an ACROSS variable need to be referenced with absolute column names. I've posted a couple of examples of tis in previous forum postings:
https://communities.sas.com/message/50996#50996
https://communities.sas.com/message/112134#112134
https://communities.sas.com/message/49987#49987
https://communities.sas.com/message/28822#28822
https://communities.sas.com/message/20444#20444
There seem to be a few glitches in some of the postings. The absolute column numbers are referenced as _c2_, _c3_ (underscore,c#,underscore)....but the forum mechanism seems to show them as C2 and C3 (which is incorrect). For a user group paper that discusses absolute column numbers, refer to this paper (starting on page 12-13):
http://support.sas.com/rnd/papers/sgf07/sgf2007-report.pdf
You will have to work with Tech Support on the use of multi-label formats in a style override. As far as I know, you MUST specify the MLF option on your DEFINE statement to use a multi-label format in PROC REPORT. Since the STYLE override doesn't have a place of way to specify MLF, I'm not even sure that the conditional highlighting will work.
So, I see several problems with your code. As for adjusting the size of your PROC REPORT output, depending on your version of SAS, you would use either OUTPUTWIDTH= or WIDTH= to specify a size for the REPORT piece of your output.
SAS 9.1.3:
proc report data=... style(report)={outputwidth=6in};
OR
SAS 9.2/9.3:
proc report data=... style(report)={width=6in};
OUTPUTWIDTH should actually work for any version of SAS, I wanted to show both possibilities.
cynthia
Yes, Cynthia, width = 6in does work! Thanks so much!
Linda
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.