SAS Proc REPORT: How to hide/eliminate repeated values for multiple columns

Multi tool use
Multi tool use


SAS Proc REPORT: How to hide/eliminate repeated values for multiple columns


proc report data=DATA nowd headline out=test2
style(summary)=[color=cx3e3d73 backgroundcolor=cxaeadd9
Fontfamily=helvetica Fontsize=3 textalign=r];
column Company_code pid gl Balance Descr Amt Value difference;
define company_code/group 'Company Code';
define PID/group;
define gl/display 'GL Code';
define balance/analysis sum FORMAT=DOLLAR20. 'Blalance';
define descr/ display 'Description';
define amt/analysis max FORMAT=DOLLAR20.2;
define value/analysis max FORMAT=DOLLAR20.2 'Market Value';
define difference/ analysis max FORMAT=DOLLAR20.2 'Difference';
break after PID/summarize OL skip;
title 'TEST';
compute after PID;
line ' ';
endcomp;
run;



This is the code have, the results report in columns Amt, value and difference have repeaded value.So basically, I only need the value at the header, but I calculated the header by the values abpve it. I don't if there's a way for me to hide them. Like in the image.
this is the partial results report, I don't need the values above the header, how can I hide them?





Please add some sample data to the question, be sure to include both cases of company_code/PID having one detail row and multiple detail rows.
– Richard
Jul 2 at 18:41




1 Answer
1



You are coding Proc REPORT to do a mix of detail and summary. From Cynthia Zender post on SAS Community



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.



Cynthia is a SAS author and has taught and presented numerous times on REPORT topics






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

zSS0oZsLipe3mexQ8I,FCI 1KL7atGYduUqTleyK0rT6Fp7H0iN
sw61w0PN31,b yOvJy

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications