BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AKNess
Calcite | Level 5

I would like to create a PDF report that has different colored rows based on the value of my variable type. I would like the rows to be green when type='Complete', yellow when type='Planned' and red when type='At Risk'. I have tried running the following compute block:


     compute type;

     if type='Complete' then call define (_row_,'style','style=[BACKGROUND=lightGREEN]');

     if type='Planned' then call define (_row_,'style','style=[BACKGROUND=lightYELLOW]');

     if type='At Risk' then call define (_row_,'style','style=[BACKGROUND=lightRED]');

     endcomp;

I have used a run statement as well as an ods pdf close statement at the end of the proc report step but when I run this section of my code SAS indicates that Proc Report is still running and will not produce the PDF file. How can I successfully produce this report?

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Add the nowd (nowindows) option to your proc report statement. Proc Report can be an interactive procedure, so you want to tell SAS that you want it to be non-interactive.

proc report data=panel_1 nowd;

View solution in original post

4 REPLIES 4
Reeza
Super User

Full code please and log please.

Did you include nowd in the proc report statement as well?

AKNess
Calcite | Level 5

My full code looks like this:

Proc Report.jpg

I'm not very familiar with Proc Report and am not sure if I'm using any of the options correctly.

Reeza
Super User

Add the nowd (nowindows) option to your proc report statement. Proc Report can be an interactive procedure, so you want to tell SAS that you want it to be non-interactive.

proc report data=panel_1 nowd;

AKNess
Calcite | Level 5

That did it! Thank you!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 4111 views
  • 0 likes
  • 2 in conversation