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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1614 views
  • 0 likes
  • 3 in conversation