BookmarkSubscribeRSS Feed
deleted_user
Not applicable
When I run the proc report detailed below, I have the following message:

NOTE: Groups are not created because the usage of SPACE_LISTING is DISPLAY.
How can I update my SAS code in order to avoid such messages?
Moreover, when I put a 'GROUP' option in the define statement of the variable SPACE_LISTING then the new note message become:
NOTE: Groups are not created because the usage of B is DISPLAY.
So, I don't understand what can I do?? *** Please help ***!
Thank you very much

Data TEST;
A=1; B=2; C=3; SPACE_LISTING=""; Output;
A=1; B=4; C=2; SPACE_LISTING=""; Output;
A=1; B=3; C=3; SPACE_LISTING=""; Output;
A=1; B=2; C=1; SPACE_LISTING=""; Output;
A=2; B=2; C=3; SPACE_LISTING=""; Output;
A=2; B=4; C=2; SPACE_LISTING=""; Output;
A=2; B=3; C=3; SPACE_LISTING=""; Output;
A=2; B=2; C=1; SPACE_LISTING=""; Output;
Run;
Ods rtf file="C:\MyData\essai.rtf" headery=720 footery=720 NoToc_Data;
PROC REPORT DATA=TEST SPLIT="¤" NOCENTER NOWD MISSING SPACING=0 Style(report)=[just=center] Style(header)=[protectspecialchars=off posttext='\brdrb\brdrs\brdrtnthsg\brdrw10' font_weight=bold just=left];
COLUMN A SPACE_LISTING B SPACE_LISTING C;
COMPUTE BEFORE A;
LINE '\brdrt\brdrs\brdrhair\brdrw10 \brdrb\brdrs\brdrdash\brdrw10 \b Treatment group=' A;
ENDCOMP;
DEFINE A / WIDTH=55 LEFT FLOW GROUP NOPRINT Style(column)={CELLWIDTH=72mm};
DEFINE B / WIDTH=9 LEFT FLOW Style(column)={CELLWIDTH=12mm};
DEFINE C / WIDTH=10 LEFT FLOW Style(column)={CELLWIDTH=14mm};
DEFINE SPACE_LISTING / " " Style(column)={CELLWIDTH=1mm};
RUN;
Ods Rtf close;
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
You might try using ORDER (which will allow you to do the COMPUTE BEFORE A) instead of GROUP. And then, put your PROTECTSPECIALCHARS=OFF on a STYLE= override for LINES. Although that area (with the treatment group) is like a HEADER, the style is coming from the STYLE(LINE) or on the COMPUTE statment where the LINE is placed.
[pre]
Ods rtf file="C:\temp\essai.rtf"
headery=720 footery=720 NoToc_Data;
PROC REPORT DATA=TEST SPLIT="¤"
NOCENTER NOWD MISSING SPACING=0
Style(report)=[just=center]
Style(header)=[protectspecialchars=off posttext='\brdrb\brdrs\brdrtnthsg\brdrw10' font_weight=bold just=left];
COLUMN A SPACE_LISTING B SPACE_LISTING C;
COMPUTE BEFORE A /
style={protectspecialchars=off};
LINE '\brdrt\brdrs\brdrhair\brdrw10 \brdrb\brdrs\brdrdash\brdrw10 \b Treatment group=' A;
ENDCOMP;
DEFINE A / LEFT order noprint
Style(column)={CELLWIDTH=72mm};
DEFINE B / LEFT order
Style(column)={CELLWIDTH=12mm};
DEFINE C / LEFT order
Style(column)={CELLWIDTH=14mm};
DEFINE SPACE_LISTING / " "
Style(column)={CELLWIDTH=1mm};
RUN;
Ods Rtf close;
[/pre]

I made A, B, and C all ORDER variables, but if you don't want C to be ORDER, then change the usage to DISPLAY. GROUP usage tells PROC REPORT to "collapse" or summarize the rows, using the analysis variables on the report. For an example of what I mean, submit this code one time with the usage of "Group" and then submit it a second time with a usage of "Order" and compare the results.
[pre]
ods listing;
proc report data=sashelp.class nowd;
column sex height;
define sex / group;
define height / sum;
run;

[/pre]

cynthia
deleted_user
Not applicable
thanks a lot, it works well!
BR,
Violaine

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3297 views
  • 0 likes
  • 2 in conversation