Questions tagged [proc-report]
A SAS procedure which combines features from PRINT, TABULATE and MEANS. It supports the SAS Outpute Delivery System and thus is useful for creating reports in various formats.
65
questions
0
votes
0
answers
38
views
How does sorting by multiple variables work in a proc report?
I just don't get it. I have few numeric dates and have to sort my report by them(and do not display)
I need to sort by SUBJECT then DTN then STDTN then ENDTN;
Regular sas sorting:
proc sort;
by ...
1
vote
0
answers
17
views
Сan I create a sub-group for headers that will not create a new line from above but occupy part of the grouped headers instead?
To better explain what I need, I added a picture. I want to get option 1 instead of option 2 which is usually created with column var1 ("Title for both vars" var 2 var 3) var4
The only thing ...
1
vote
0
answers
45
views
SAS proc report ensure that sections do not split between pages
I'm creating rtf report and group data by Var that is not into final report. I also added the split line between groups
column var stat group1 group2 group3;
define var/'' group noprint;
define ...
0
votes
1
answer
34
views
SAS: include values that don't meet a threshold as missing
I am using proc sql and proc report to create a table for my results:
proc sql;
create table newtable as
select location, year, month, count(distinct day) as daycount
from have
where threshold>90
...
1
vote
1
answer
103
views
How to make a table (with proc report or data step) of a grouped variable where in different columns are counts of different variables?
Could you give some advise please how to calculate different counts to different columns when we group a certain variable with proc report (if it is possible with it)?
I copy here an example and the ...
0
votes
2
answers
977
views
SAS proc report with nested headers
I'm attempting to generate an automated report that combines counts, row percentages, and chi-squared p-values from two-way proc freq output for a series of variables.
I'd like the counts and ...
1
vote
1
answer
209
views
proc report to create table as it is
I am working on PROC REPORT. i want to crate table as it is
data have;
input A B $ C E F G I K L M N;
datalines;
1 japan 190 46 15 0 0 0 0 0 1
2 us 152 39 47 86 0 0 0 0 1
3 aus 50 6 36 41 0 0 0 0 1
;
...
0
votes
0
answers
341
views
SAS ODS RTF & proc report
I'm trying to figure out why the formatting of my reports suddenly changed.
I had been exporting a report with 8 columns, all which fit on a single page in a word document. This month, it decided to ...
0
votes
1
answer
657
views
SAS - Using the Summarize function of proc report to total percents
I have a table about several organizations budgets with information for the past two years, and I need to add columns for this year's info. So essentially, I have a table with the columns: Year 1 ...
1
vote
2
answers
417
views
Row label is being truncated
I have written the following query to extract a list of distinct military status from a SAS table.
proc sql;
create table mil_stat as
select distinct MILITARY_STAT_sERSS format $MILSTAT. as ...
0
votes
0
answers
753
views
Removing blank space between title and report in proc report for listings
I am looking for a method to remove a blank row between a title and body of a report.
title 'Title';
proc report data=have nocenter nowd headline headskip;
column('--' col1 col2);
define ...
1
vote
1
answer
942
views
Repeating values after page break in proc report
I created a report of the following form:
ID VAR1
VAR2
111 1
2
3
4
5
6
222 1
2
I need to follow a requirement that if a page break appears inside ...
0
votes
1
answer
211
views
Customizing proc report
I need to produce a few reports and I always struggle with the report procedure to obtain the required result without messing too much with the initial dataset what takes a lot of time.
The dataset is ...
0
votes
1
answer
622
views
Sorting variables and proc report
I have a dataset of the following form:
GROUP 1 GROUP 2 TOTAL
A 400
A a1 100
A a2 100
A a3 300
B 300
B b1 ...
0
votes
1
answer
42
views
Using a Macro Program
I am trying to use a Macro program to make a record sorted by TotalGPA of the top ten percent GPA's which turns out to be the 24 highest GPAs, that have more than 60 credit hours but less than 130 ...
1
vote
2
answers
2k
views
I changed columns names, but SAS PROC REPORT still uses the old names
Using PROC SQL, I changes column names from English to Hebrew.
When I use such tables via PROC REPORT, SAS uses the English columns names, even though the BY and DEFINE statements use the new Hebrew ...
0
votes
1
answer
745
views
how to average a computed column in SAS `proc report`
In SAS proc report, a computed column is calculated row by row.
This applies to the summary lines too, but that is not always wat you want.
As an example, take this study of the Body Mass Index in ...
0
votes
1
answer
629
views
SAS blanks between 2 proc reports
I have ods HTML email sender, in which i have included 2 proc reports:
ods html file=sendmail;
proc report data=h2 headskip headline spacing=100;
column d1 d2 d3;
define d3/group noprint;
define d1/...
1
vote
1
answer
430
views
Proc report - Call Define to change format of the second row under GROUPING variable?
I want to apply a pre-defined format to several columns, but only for one variable. The problem is, this variable has two subgroups, LEFT and RIGHT, my codes only change the format for the first ...
0
votes
1
answer
1k
views
Proc Report-Assigning a different format for different rows
I have a table that is current laid out in the way I want. The only issue is that when I went to assign the format, it carried over the format for all values. I have a row that should be total, but I'...
0
votes
1
answer
2k
views
Merge cells horizontally in RTF output using proc report
I am trying to create a summary row above each group in my data. I have 2 questions:
How do I merge the first 2 cells horizontally (the ones in red below) in the summary rows.
How do I remove the ...
0
votes
1
answer
1k
views
SAS Proc Report page break for columns
I'm hoping someone would be able to help me with this problem. I am trying to make a report using proc report with ods pdf. The problem is when I use the page option with the intention of displaying ...
0
votes
1
answer
570
views
ODS Tagsets RTF
I am trying to make underscores (_) appear in my output while using ODS Tagsets but for some unknown reasons it's not appearing as expected. I'm using SAS 9.4.
It appears with Bodytitle and ...
0
votes
1
answer
3k
views
WARNING: Unsupported device 'ACTIVEX' for EXCEL destination. Using device 'ACTXIMG'
I am getting 'ACTIVEX' warning message in SAS while running below code, I ignored that warning in log when i was running in SAS EG but when i run code through SAS Console (Scheduler) program is ...
0
votes
0
answers
54
views
Problem with proc report multilayered heading
I am trying to create a report that looks like:
The first row is in the column named MPM_Description.
The second row is the Release date of those movies and the third row is the box office collection....
0
votes
1
answer
710
views
Proc REPORT move group value (row header) closer to totals
I have some data that is structured as below. I need to create a table with subtotals, a total column that's TypeA + TypeB and a header that spans the columns as a table title. Also, it would be ...
0
votes
2
answers
1k
views
Proc Report - Rows of two tables
I have to export some data in the format of two tables per row, with multiple rows. So far I have got as far as building a report with multiple tables stacked on top of each other, but with only one ...
1
vote
2
answers
3k
views
Sending an email from SAS with report AND text in the body
I've created a report in SAS EG 7.2 and have got SAS to email it in the body of the email, however I can't seem to add any text. I have got this code:
filename mymail email
to=...
1
vote
4
answers
2k
views
Sending an email from SAS only if certain conditions are met
I want SAS to send an email out, but only if a global macro variable &warning is equal to 1.
Is this possible? I'm trying the following, but it's not working. It still sends an email when ...
-1
votes
1
answer
2k
views
sas 9.3 - insert a new line with condition in proc report
I want to insert a new line after a group of every br variable but not when br=10 in proc report.
I have the compute code written as below, but the if condition does not seem to work
compute after ...
0
votes
1
answer
875
views
PROC REPORT : Is it possible to don't print a specific row?
I am writing a report to Excel with PROC REPORT. the first column is grouped, and I add a break line before some values of it. This break line contains the value of the column if it match some ...
1
vote
1
answer
2k
views
Rollup function in SAS
I would like to add summary record after each group of records connected with specific shop. So, I have this:
Shop_id Trans_id Count
1 1 10
1 2 23
1 ...
1
vote
1
answer
3k
views
proc report: add indentation on sub-group
In proc report, I am having difficulty getting the indentation before second level (High Level Term 1) or third level and so on.
When I use style(column)=[cellwidth=6.5 cm JUST=LEFT asis=on], I get ...
0
votes
1
answer
63
views
SAS Proc Report Specific Setup
I want to use proc report to build a display instead of simple proc print. My data look like this.
A B C D
Bill Harry Bog The
Bill Harry Hog Quick
Bill ...
1
vote
1
answer
130
views
Is it possible to add a class to a <tr> table row in SAS Proc Report with a compute statement?
I have an ODS HTML table made with Proc Report where I need to add an HTML class attribute to a table row <tr>, and not each individual <td> cell in that row. The reason is that this is ...
0
votes
1
answer
267
views
proc report: proportion of group sum
I have the following proc report
proc report data=sashelp.class;
col
sex
age
weight
;
define sex / group;
define age / group;
define weight / analysis sum;
run;
However I do ...
0
votes
1
answer
228
views
Do not want columns with null value in Proc Report
I am trying to create report like the one:
But I am getting the report like this:
I am using the proc report to do this. I don't want the columns which has All the values zero. The AFG,ALL,CapMkt,...
0
votes
1
answer
2k
views
Proc Report - Print ID on first line of each page
I am reporting a large listing of values for subgroups of my data. I have the data in the form I currently want and just have a cosmetic change to make. I am trying to find a way to print the value of ...
0
votes
1
answer
51
views
Why use RowNum+1 in proc report
I found if I want to color the column day1 after the header, I have to add 'RowNum+1;'. Without that, my code doesn't work ever if I change the number. Can someone tell me why? Thank you very much!
...
1
vote
0
answers
521
views
Customising subtitle when splitting up table on more pages in PROC REPORT
I'm trying to split a tabel from PROC REPORT into two (as it is to big to fit onto one page). I found (thank you google) two ways of doing the split, both based on a dummy variabel ('pgbrk') ...
0
votes
1
answer
227
views
Adding a line at the end of every page in proc report
I am just wondering how can I add a line at the end of every page of my report.
Thanks
2
votes
1
answer
1k
views
Is it possible to limit the numbers of observations per page for proc report
I am just wondering if there are any options can be used to limit the number of observations printed per page in Proc Report procedure?
Thank you
1
vote
1
answer
322
views
SAS - Ods tagsets.excelxp & proc report - column with formula not aligned to center
I need your help!
I'm trying to create an output, in SAS, with proc report.
Although i use in options center_vertical & center_horizontal as you can see below, column "Failing Rule" (that is ...
1
vote
3
answers
1k
views
SAS Proc Report changing header style attributes for an across variable
A sample SAS Proc report code is below. I want to change the color of the header background and foreground for one value of the across variable. I used a compute block to change the column background ...
0
votes
1
answer
2k
views
SAS proc report the split symbol is not working on "compute before" statement
I tried to output rtf, the first column is the classification, subgroup and level names. I concatenated classfication and subgroup together with the split symbol '~' into the variable 'cat' and I was ...
1
vote
2
answers
785
views
PROC REPORT within DATA in SAS
I am trying to do a simple thing - write a PROC REPORT procedure within a DATA sentence. My main idea is - if the condition in data step is true - lets execute PROC REPORT, if it is false - do not ...
0
votes
0
answers
1k
views
SAS: PROC REPORT or STYLE Double Outside Border, Solid Inside Border
I need to format tables in an output RTF file (to be saved as a Word .docx file) with double outside border and solid inside border as such:
Is this possible to do with PROC REPORT using some sort of ...
0
votes
1
answer
1k
views
sas proc report, break after page and break after skip
I have a question:
The data look like that:
a 1
a 2
a 3
a 4
a 5
a 6
...
d 1
d 2
...
f 1
f 2
...
I want break skip after a,b,c,d and break page if the group in column ...
1
vote
1
answer
489
views
PROC Report, multiple columns with same statistic
I'm using PROC REPORT to generate a report of weighted sums. There are 2 columns that need to be summarized, both with the MEAN statistic. On top of that, I want to output the total weight.
I have ...
0
votes
2
answers
910
views
Proc Report Color Coding with Traffic Lights instead of highlighting entire cell?
I have a report we run in SAS and format in Excel that has traffic color coding based on Excel formulas. I'd really like to just have everything created in SAS, so I have been using PROC REPORT to ...