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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1448 views
  • 1 like
  • 3 in conversation