Hello
Lets say I have a data set with 20,000 rows and 10 columns.
Is it possible and recommended to create display proc report (that also color some cell based on crietria)?
Or it is too many rows for proc report???
It depends on the destination.
HTML, for instance, does not force SAS to keep the whole output in memory; every new line of the report is just appended to the file or stream.
EXCEL, OTOH, forces this, as the whole XML information is written as a ZIP archive only when the destination is closed, not before. And therefore SAS needs to keep the whole, uncompressed file in memory.
You need to be a bit more specific as to what the "report" would contain.
For example a report that summarizes numeric values by some sort of grouping variables would quite likely display many fewer than 20000 rows.
What are the rules for "coloring cells"? This is likely crucial. If the coloring is based only on the content of the cell itself then Proc Print may well be a much better option for that much output.
If you are displaying all 20,000 observations that is roughly the equivalent of 250 pages of output depending on page and font sizes. Who is going to "read" these 250 pages?
Maybe you could split this dataset into many small part data. and output them one by one separatedly and combine them together by hand or by the third-part software ?
data part1 part2; set sashelp.class; run; ods _all_ close; ods noresults; ods excel file='c:\temp\temp1.xlsx' options(sheet_name='part1'); proc report data=part1 nowd; define _all_/display; compute age; if age<14 then call define(_col_,'style','style={background=yellow}'); endcomp; run; ods excel close; ods excel file='c:\temp\temp2.xlsx' options(sheet_name='part2'); proc report data=part2 nowd; define _all_/display; compute age; if age<14 then call define(_col_,'style','style={background=yellow}'); endcomp; run; ods excel close;
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.