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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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