08-04-2011 02:11 AM
I have a requirement to hide 2 rows in my report, but I need to show the total of these records using 'rbreak summarize' . Since I have to show the total in the report I am not able to delete these records from my source dataset. Is there any option in proc report like
if col1 = 'SP" then delete;
08-04-2011 06:30 AM
You need to use computed column to hiden these two row of especial column and use noprint for this especial column.
The best way is to post some data and output you need, then Cynthia is able to do it with happiness.
Of course.I can do it also.But I recommend Cynthia who is better.
08-04-2011 07:54 AM
My source dataset is like
I want the report to be in the form
i.e., i want to delete the 2 rows corresponding to DIV C and print the Total only..
Hope I am clear with the requirement nw..
08-04-2011 09:54 AM
I appreciate Ksharp's confidence in my ability to code PROC REPORT, however, I cannot code anything counter to the way that PROC REPORT wants to operate.
The bottom line is that PROC REPORT does not allow you to delete report rows. If report is doing a detail report, with summary lines, you can either have summary lines or not --- but you cannot delete the detail lines and only show the summary lines. To collapse the detail lines, you would move into the world of summary report, but given your data, you are generating a detail report that contains summary lines.
PROC REPORT does allow you to hide report columns, using the NOPRINT option. But if you want to generate the TOTAL line with PROC REPORT, for each division, then each division will be treated the same way and you cannot show the report rows for Div A and Div B and suppress them for Div C. You might be able to pre-process your data somewhat to do the report you want, but PROC REPORT will not do it "out of the box".