BookmarkSubscribeRSS Feed
DME790
Pyrite | Level 9

Hi All,

 

I have the following Proc Report code however I want to get rid of the second column with the heading name in it.

 

Is there a way  I can do this?

 

Data Test;
input CombinedCode $ TotalJuly2018 RankedJuly2018	TotalJuly2017 RankedJuly2017 Total201718 Ranked201718;
datalines;
AAA 2288 15 564 20 12071 12
BBB . . 9 76 77 76
CCC 776 31 180 33 2349 32
DDD 1593 19 549 21 7265 18
EEE 2827 12 887 14 10997 14
FFF 1395 20 1463 9 11864 13
GGG 439 36 109 39 1795 34
HHH 9873 6 3151 6 42898 6
III 11 68 31 63 60 77
JJJ 376 37 119 38 1465 37
KKK . . 25 70 138 71
LLL 7 69 9 76 49 78
MMM 4132 9 1105 12 15367 10
NNN 293 41 87 46 1087 41
OOO 1053 27 . . 987 44
PPP 473 35 126 37 1451 38
;
run;



Proc Report data=Test;
	Column CombinedCode 
	('July 2018' ( TotalJuly2018,(pctsum) RankedJuly2018 TotalJuly2018)) 
	('July 2017' ( TotalJuly2017,(pctsum) RankedJuly2017 TotalJuly2017))
	('2017-18 Financial Year' ( Total201718,(pctsum) Ranked201718 Total201718))
	;


	Define CombinedCode / DIsplay;
	Define TotalJuly2018  / DIsplay 'Number of Exits' f=comma9.;
	Define RankedJuly2018 / DIsplay 'Ranking' order order=Internal;
	
	Define TotalJuly2017 / DIsplay f=comma9.;
	Define RankedJuly2017 / DIsplay;
	
	Define TotalJuly201718 / DIsplay f=comma20.;
	Define RankedJuly2017 / DIsplay;
	define pctsum / 'Percentage' format=percent7.1;


	rbreak after / ol summarize;
run;

which produces this and I would like Number of Exits, TotalJuly2017 and Total201718 not displaying in the report.

 

Table.JPG

 

 

any help appreciated.

 

Cheers

 

Dean

3 REPLIES 3
FredrikE
Rhodochrosite | Level 12

How about to change "Display" to "Noprint" for them?

//Fredrik

DME790
Pyrite | Level 9

Hi @FredrikE @Jagadishkatam ,

 

I knew I made a mistake as soon as I ready your responses. I need to keep the column sorry - I don't want the heading second row that shows

  • Number of Exits
  • TotalJuly2017
  • Total201718

Capture2.JPG

 

Cheers

 

Dean

 

 

Jagadishkatam
Amethyst | Level 16

I agree with @FredrikE please try to use noprint as in the code

 


Proc Report data=Test;
	Column CombinedCode 
	('July 2018' ( TotalJuly2018,(pctsum) RankedJuly2018 TotalJuly2018)) 
	('July 2017' ( TotalJuly2017,(pctsum) RankedJuly2017 TotalJuly2017))
	('2017-18 Financial Year' ( Total201718,(pctsum) Ranked201718 Total201718))
	;


	Define CombinedCode / DIsplay;
	Define TotalJuly2018  / DIsplay 'Number of Exits' f=comma9.;
	Define RankedJuly2018 / DIsplay 'Ranking' order order=Internal;
	
	Define TotalJuly2017 / DIsplay f=comma9.;
	Define RankedJuly2017 / DIsplay;
	
	Define TotalJuly201718 / DIsplay f=comma20.;
	Define RankedJuly2017 / DIsplay;
	define pctsum /noprint 'Percentage' format=percent7.1;


	rbreak after / ol summarize;
run;
Thanks,
Jag

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1477 views
  • 1 like
  • 3 in conversation