BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
elsfy
Quartz | Level 8

Hi, 

 

I am trying to customize my proc report.

 

I computed columns in order to get the total sum of observations. 

The picture below shows the last line of my proc report with the total added.

The first three columns (var1--var3) refer to character variables and i want the total to be merged with the 2 cells on its left. Or alternatively,  i though of hiding the two border lines shown in yellow.

Any help ?

 

isgnr_1-1651848552242.png

proc report data = a ;

columns var1 var2 var3 ... ; 

define .. ; 
rbreak after / summarize ; 
compute after ;
var 3 = "Total" ; 
endcomp ; 
run ; 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  Changing border styles worked for me using 9.4M7:

Cynthia_sas_0-1651857189370.png

Cynthia

View solution in original post

6 REPLIES 6
Cynthia_sas
SAS Super FREQ

Hi:

  PROC REPORT does not merge cells the way that Excel does. You can use a LINE statement, which would produce one line that would span the entire report (but then your Grand Totals wouldn't show in the columns. Or you could change to a style like JOURNAL, which suppresses interior table lines. You don't show all your code. What is your ODS destination of interest? 

Cynthia

elsfy
Quartz | Level 8

If i understand correctly with the line statement i won't have the grand total with the sum of all next columns which is an absolute need.

 

Is it then possible to hide the borders in yellow like putting them in grey too? 

Cynthia_sas
SAS Super FREQ
Hi: Are there other changes in your code? How did you get the background grey? And the border lines in black? When I use the default ODS EXCEL style, my output for the TOTAL row is NOT grey and I don't have any borderlines. Did you show ALL your code including ODS style overrides? Are you using a custom style template? It maybe possible to change the border colors, but my experience with ODS EXCEL and borders is that EXCEL is very picky.
Cynthia
elsfy
Quartz | Level 8

Actually my code is way more than that.

 

I did most of the customs with proc report just like that for instance ; 

rbreak after / summarize  style(summary) = {font_weight=bold font_size=2 background=lightgrey just=r} ;

 

My idea was to hide the yellow borders with proc report but if it is possible with ods excel then it would be great. 

Thank you for your help !

Cynthia_sas
SAS Super FREQ

Hi:

  Changing border styles worked for me using 9.4M7:

Cynthia_sas_0-1651857189370.png

Cynthia

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 6 replies
  • 1105 views
  • 2 likes
  • 2 in conversation