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

I use the below code to create a report of data. I have last name, first name, ptjul11 ptaug11 ptsep11 djul11 daug11 dsep11 sumday sumpts and avg only appearing at the top of each report per residents. Then each of the diagnosis listed per resident and the count for each one is listed and summed.

The report that the code creates looks fine, but I keep getting this note in my log:

NOTE: Groups are not created because the usage of diagnosis_c_wcc is DISPLAY. To avoid this note, change all GROUP variables

to ORDER variables.

Not sure if it something that is affecting my report and am unsure how to change my settings to avoid it. if i do change all my Group variable to order variables, then they appear on each line.

Thank you for any help you can provide.

PROC REPORT  NOWD DATA=resident_dx_patday

  style(report)=[preimage="S:Patient Requirements.jpg" rules=all 

                         cellspacing=0

                         bordercolor=gray]

          style(header)=[background=lightgray

                         foreground=black]

          style(column)=[background=white  foreground=black];

by resident;

title 'Resident Patient Statistics - July 2011';

    COLUMN last_name first_name level_11_12 PtJul11 PtAug11 PtSep11 sumpts dJul11 dAug11 dSep11 sumday Avg diagnosis_c_wcc count;

DEFINE last_name /'Resident Last Name' group;

DEFINE first_name/'Resident First Name' group;

          define level_11_12/ 'Resident Level' group;

Define ptjul11/ '# Pts July' group;

define ptaug11/ '# Pts Aug' group;

define ptsep11/ '# Pts Sept' group;

define djul11/ '# Days July' group;

define daug11/ '# Days Aug' group;

define dsep11/'# Days Sept' group;

define sumday/ 'Sum of Days' group;

define sumpts/ 'Sum of Pts' group;

    DEFINE  avg /  'Avg' group ; 

  DEFINE  diagnosis_c_wcc   /  'Diagnosis' display  ;

DEFINE COUNT / 'Count of Diagnosis';

break after last_name/page OL UL SKIP SUMMARIZE;

RUN;

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  Try changing this DEFINE statement from DISPLAY to:

DEFINE diagnosis_c_wcc / 'Diagnosis' ORDER;

The error message indicates that grouping cannot be performed because DIAGNOSIS_C_WCC is given a DISPLAY usage. This should allow PROC REPORT to do the proper collapsing.

However, I am confused why some of your variables are listed as GROUP variables:

Define ptjul11/ '# Pts July' group;

define ptaug11/ '# Pts Aug' group;

define ptsep11/ '# Pts Sept' group;

define djul11/ '# Days July' group;

define daug11/ '# Days Aug' group;

define dsep11/'# Days Sept' group;

define sumday/ 'Sum of Days' group;

define sumpts/ 'Sum of Pts' group;

I would normally expect these variables to be SUM usage, not GROUP usage.

So, without looking at a sample of your input data and some idea of what your output report should look like, it is hard to make any other suggestions. Your best resource might be to open a track with Tech Support. They can look at all your data and all your code and help you come to the best resolution.

Also, you do not say what destination (HTML, RTF, PDF) you are creating -- but you are using STYLE= overrides, so that means you are using ODS and not LISTING. You should be aware, however, that some options in your code are LISTING only options and will not work in other ODS destinations. Some of the options that are LISTING-only are: OL, UL, SKIP. To get the equivalent of a SKIP in ODS destinations, you need to use a COMPUTE block. However, since you have both SKIP and PAGE on your BREAK statement, you may find that you don't need the SKIP at all.

To send a question to Tech Support, go to http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem". Alternately, you can go directly to the Tech Support Problem Form here:

http://support.sas.com/ctx/supportform/createForm

cynthia

View solution in original post

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  Try changing this DEFINE statement from DISPLAY to:

DEFINE diagnosis_c_wcc / 'Diagnosis' ORDER;

The error message indicates that grouping cannot be performed because DIAGNOSIS_C_WCC is given a DISPLAY usage. This should allow PROC REPORT to do the proper collapsing.

However, I am confused why some of your variables are listed as GROUP variables:

Define ptjul11/ '# Pts July' group;

define ptaug11/ '# Pts Aug' group;

define ptsep11/ '# Pts Sept' group;

define djul11/ '# Days July' group;

define daug11/ '# Days Aug' group;

define dsep11/'# Days Sept' group;

define sumday/ 'Sum of Days' group;

define sumpts/ 'Sum of Pts' group;

I would normally expect these variables to be SUM usage, not GROUP usage.

So, without looking at a sample of your input data and some idea of what your output report should look like, it is hard to make any other suggestions. Your best resource might be to open a track with Tech Support. They can look at all your data and all your code and help you come to the best resolution.

Also, you do not say what destination (HTML, RTF, PDF) you are creating -- but you are using STYLE= overrides, so that means you are using ODS and not LISTING. You should be aware, however, that some options in your code are LISTING only options and will not work in other ODS destinations. Some of the options that are LISTING-only are: OL, UL, SKIP. To get the equivalent of a SKIP in ODS destinations, you need to use a COMPUTE block. However, since you have both SKIP and PAGE on your BREAK statement, you may find that you don't need the SKIP at all.

To send a question to Tech Support, go to http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem". Alternately, you can go directly to the Tech Support Problem Form here:

http://support.sas.com/ctx/supportform/createForm

cynthia

HyunJee
Fluorite | Level 6

Thanks Cynthia!

Adding the ORDER option after the title of the field name caused the note in the log to disappear Smiley Happy

The below variables are sums created previously and an output file was created that had the sums of each variable per resident. I wanted to combine these sum variables with the list of diagnosis each resident had listed for the three month time period.

However, I am confused why some of your variables are listed as GROUP variables:

Define ptjul11/ '# Pts July' group;

define ptaug11/ '# Pts Aug' group;

define ptsep11/ '# Pts Sept' group;

define djul11/ '# Days July' group;

define daug11/ '# Days Aug' group;

define dsep11/'# Days Sept' group;

define sumday/ 'Sum of Days' group;

define sumpts/ 'Sum of Pts' group;

Thanks again!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2619 views
  • 1 like
  • 2 in conversation