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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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