Help using Base SAS procedures

Proc Report: Getting note in log - trying to figure out how to avoid and get needed report

Accepted Solution Solved
Reply
Contributor
Posts: 71
Accepted Solution

Proc Report: Getting note in log - trying to figure out how to avoid and get needed report

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="SSmiley Tongueatient 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;


Accepted Solutions
Solution
‎12-12-2011 11:06 AM
SAS Super FREQ
Posts: 8,862

Re: Proc Report: Getting note in log - trying to figure out how to avoid and get needed report

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


All Replies
Solution
‎12-12-2011 11:06 AM
SAS Super FREQ
Posts: 8,862

Re: Proc Report: Getting note in log - trying to figure out how to avoid and get needed report

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

Contributor
Posts: 71

Proc Report: Getting note in log - trying to figure out how to avoid and get needed report

Posted in reply to Cynthia_sas

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!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 973 views
  • 1 like
  • 2 in conversation