☑ This topic is solved.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 05-15-2024 07:38 AM
(1363 views)
Hi!
How can i change this?
for this
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can use a COMPUTE BEFORE block to achieve this. See example below. note that the make column is not printed but used in the COMPUTE BEFORE together with the LINE statement.
proc report data=sashelp.cars;
column make model invoice horsepower;
define make / order noprint;
define model / display style={textalign=left};
compute before make /
style={backgroundcolor=lightblue textalign=left}
;
line make $20.;
endcomp;
run;
5 REPLIES 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can use a COMPUTE BEFORE block to achieve this. See example below. note that the make column is not printed but used in the COMPUTE BEFORE together with the LINE statement.
proc report data=sashelp.cars;
column make model invoice horsepower;
define make / order noprint;
define model / display style={textalign=left};
compute before make /
style={backgroundcolor=lightblue textalign=left}
;
line make $20.;
endcomp;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Wow, thanks a lot. I've been trying to do this for a few days!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You are welcome. Maybe it makes sense to buy this book https://support.sas.com/content/dam/SAS/support/en/books/the-sas-programmers-proc-report-handbook/69...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Can I create a large group and then place other groups?
Like
South America
Brazil
Type1
Type2
Type3
Argentina
Type1
Type2
Type3
Europe
Germany
Type1
Type2
Type3
France
Type1
Type2
Type3
?
Like
South America
Brazil
Type1
Type2
Type3
Argentina
Type1
Type2
Type3
Europe
Germany
Type1
Type2
Type3
France
Type1
Type2
Type3
?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Sure just add the variables needed specify NOPRINT for the once you use in a COMPUTE BEFORE variable block.
proc report data=sashelp.orsales;
column year quarter product_line quantity;
define year / group noprint;
define quarter / group noprint;
define product_line / group;
define quantity / analysis;
compute before year;
line year 4.;
endcomp;
compute before quarter;
line quarter $6.;
endcomp;
run;