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

When I use ods excel & proc report, cells of sequentialley empty in title is united.

I want to avoid this 3rd line in title.

 

before-bad.jpg

 

data d_out;
 set sashelp.class;
 attrib col1 - col4 length = $20;
 call missing(of col1 - col4);
run;

ods excel file= "D:\test.xlsx";
proc report data=d_out(obs=3)
 split="#"
 out = _O_REP
;
    column 
  ("1" ("A" ("" ("" col1))))
  ("2" ("B" ("" ("" col2))))
  ("3" ("C" ("" ("" col3))))
  ("4" ("D" ("" ("" col4))))   
   age
    ;
    define col1 / display "";
    define col2 / display "";
    define col3 / display "";
    define col4 / display "";
   
    define age / display;
run;
ods excel close;

I want to insert break/boundary like this. (insert blank as dummy is also OK.)
after.jpg

Related QA = using across which I don' t use.
https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Create-Border-and-Title-should-be-...


Thank you for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
t_ar_taat
Quartz | Level 8

I solve it with split.

proc report data=d_out(obs=3)
 split="#"
 out = _O_REP
;
    column 
  ("1" ("A" ("" ("" col1))))
  ("2" ("B" ("" ("" col2))))
  ("3" ("C" ("" ("" col3))))
  ("4" ("D" ("" ("" col4))))   
   age
    ;
    define col1 / display "#";
    define col2 / display "#";
    define col3 / display "#";
    define col4 / display "";
    
    define age / display;
    
run;

View solution in original post

2 REPLIES 2
t_ar_taat
Quartz | Level 8
This doesn't work.
define col2 / display "" style(column)=[ tagattr="merge:no"];
t_ar_taat
Quartz | Level 8

I solve it with split.

proc report data=d_out(obs=3)
 split="#"
 out = _O_REP
;
    column 
  ("1" ("A" ("" ("" col1))))
  ("2" ("B" ("" ("" col2))))
  ("3" ("C" ("" ("" col3))))
  ("4" ("D" ("" ("" col4))))   
   age
    ;
    define col1 / display "#";
    define col2 / display "#";
    define col3 / display "#";
    define col4 / display "";
    
    define age / display;
    
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 2 replies
  • 704 views
  • 0 likes
  • 1 in conversation