BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have a proc report with a number of compute blocks, breaks, and rbreak, styles, etc., but I need to suppress one particular line of the output, a line that comes from the dataset detail, not a break or rbreak. I would ideally like to just put something in a compute block like "if var1 eq 'x' then delete", but that obviously doesn't work.

So, is there a way to do this within PROC REPORT? I'm sending output to RTF.

Thanks for any suggestions.

David
3 REPLIES 3
Ross
Calcite | Level 5
Why not just eliminate it by subsetting the data by using a where statement for the Proc Report "where var1^='x';". This is no good if it necessary for any of the compute blocks otherwise it should work.
deleted_user
Not applicable
Thanks, but exactly... I need the observations to compute summary lines. So I want to show all the subtotals but not the detail for every category for which there's a subtotal.
Tim_SAS
Barite | Level 11
No, there's no way for PROC REPORT to delete or skip a row in a report. You'll have to fix up your data before calling PROC REPORT.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 1357 views
  • 0 likes
  • 3 in conversation