The SAS Output Delivery System and reporting techniques

proc REPORT and ODS HTML Output

Reply
Contributor
Posts: 33

proc REPORT and ODS HTML Output

Hello SAS professionals,

I’d be very thankful if someone could help me to solve a problem I faced:

Using proc REPORT I want to print to ODS HTML output a SAS table of about 700 rows, but there are written only 4 rows in a generate HTML output. How can I solve this problem ? Thanks.
SAS Employee
Posts: 22

Re: proc REPORT and ODS HTML Output

Are the variables in your data set numeric? If so, try defining them as DISPLAY:

define var / display;

Please send your code if you are still having problems.
Contributor
Posts: 33

Re: proc REPORT and ODS HTML Output

Hello Kathryn,
thank you a lot for your assistance Smiley Happy
Yes, values of variable that I want to display in rows are numerical. Actually a it is a date. But I need to define this variable as GROUP. Here is a sample of my program :

proc report data=a nowd ;

column date statistic, package_grp, count;

define date / group descending;
define statistic /across '' ;
define package_grp /across '';
define count /analysis;

run;

When I change the define option for date variable from GROUP to DISPLAY, then SAS terminates with error :

ERROR: date is not an ORDER, GROUP, or ACROSS variable and is marked DESCENDING.

Well, actually I need date to be defined as GROUP

I hope this is not a SAS bug ?
Thank you, Kathryn

with best regards,
Sarunas
SAS Employee
Posts: 22

Re: proc REPORT and ODS HTML Output

For numeric variables, if you do not define another usage, the default usage is ANALYSIS SUM. In your original question, I suspected that this is what was happening with your date variable. In order to prevent it from summing, I suggested defining another usage such as DISPLAY. ORDER or GROUP would be fine also. If you are using other options, such as DESCENDING, ORDER or GROUP must be used. This is not a bug.
Contributor
Posts: 33

Re: proc REPORT and ODS HTML Output

Well, but why are there only 4 rows in a display output ? There are about 700 of rows in SAS table, and date variable has different values in each row.

thnaks
Sarunas
SAS Employee
Posts: 22

Re: proc REPORT and ODS HTML Output

How do you define date when you only see 4 rows in the output? This might be an issue that is better handled by Technical Support through the tracking system. If you could email your code and a sample of the output to support@sas.com, that would be helpful.
Contributor
Posts: 33

Re: proc REPORT and ODS HTML Output

How do you define date when you only see 4 rows in the output? This might be an issue that is better handled by Technical Support through the tracking system. If you could email your code and a sample of the output to support@sas.com, that would be helpful.

Well, I define the date variable as GROUP. I can't understand why only first 4 rows are displayed... Why not 5 or 6 first rows. In a sense of substance of data all rows in table are equal Smiley Happy

Right, I'll try to contact sas support.

Thank you Katheryn for your help.

best regards,
Sarunas
N/A
Posts: 0

Re: proc REPORT and ODS HTML Output

Hi,
I think the basic missunderstanding is in the meaning of order, group and display. If you use display, you cannot use descending. However it is simple to have the data ordered anyway: just sort it before proc report comes...
GROUP means a summary. Same like CLASS in PROC MEANS. Each distinct date is one group, so if you have only 4 different dates, that is ok. The other numeric data is summarized according to the selected statistic. ORDER sorts the data and prints only the first occurance of a new date. No statistics are calculated in the rows, only in BREAK-lines.

By the way: if you use ORDER with formatted values, it is necessary to use also ORDER=DATA or ORDER=INTERNAL, otherwise you get it sorted by the formatted values.

Hope that helps a bit.
Contributor
Posts: 33

Re: proc REPORT and ODS HTML Output

Thank you, actually the values of date variable are all diferent. Interesting thing, that when I run this programs as stored process on Enterprise Guide all rows are outputed to html output. Here is a focus Smiley Happy

Thank you for you help Smiley Happy
Ask a Question
Discussion stats
  • 8 replies
  • 253 views
  • 0 likes
  • 3 in conversation