BookmarkSubscribeRSS Feed
NathanOch
Obsidian | Level 7

I have a pretty intermediate issue with SAS results at the moment. I am trying to generate some reports where the PROC REPORT summary lines (break and rbreak) have label commands to change the text in the summary line row. I have successfully changed the text within SAS EG, but when I got to our information delivery portal, run the stored process, and have it open in Excel (via ODS tagsets command) the altered summary line text does not show up in the Excel output...it is blank instead. Below is my code for the PROC REPORT statement and I am wondering if anybody has encountered this issue.


"Batch Track Report";


"Generated by the SAS System (&_SASSERVERNAME, &SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";



format;


value blankValue other=' ';


;



report data=WORK.GROSS_COLLECTION_RESULTS nowd split='_';


column Region Type List_Month cv1 JCC_Collections Legal_Collections Total_Collections;


define Region / order 'Region' missing center style=[fontsize=12pt cellwidth=150 fontweight=bold];


compute Region;


if upcase(_break_)="TYPE" then do;


call define("Region", 'style', 'style=[pretext="Subtotal  "]');


end;


if _break_='Region' then do;


call define("Region", 'style', 'style=[pretext="Region Total "]');


end;


if _break_ = '_RBREAK_' then do;


call define ('Region','style','style=[pretext="Grand Total "]');


end;


endcomp;


define Type / order 'Type' missing center style=[fontsize=12pt cellwidth=120 fontweight=bold];


define List_Month / display format=YYMMDD10. missing noprint order=internal center style=[fontsize=12pt cellwidth=120];


define cv1 / computed 'List_Month' missing center style=[fontsize=12pt cellwidth=120];


compute cv1 / char length=30;


if _break_ eq ' ' then do;


if List_Month ne . then hold1=List_Month;


YYMMDD10.);


end;


if _break_ ne ' ' then cv1=' ';


endcomp;


define JCC_Collections / analysis SUM 'JCC_Collections' format=DOLLAR20.2 missing center style=[fontsize=12pt cellwidth=150];


define Legal_Collections / analysis SUM 'Legal_Collections' format=DOLLAR20.2 missing center style=[fontsize=12pt cellwidth=150];


define Total_Collections / analysis SUM 'Total_Collections' format=DOLLAR20.2 missing center style=[fontsize=12pt cellwidth=150];


break after Type / summarize suppress skip style(summary)=[fontsize=12pt fontweight=bold background=lightgrey];


break after Region / ol summarize suppress skip style(summary)=[fontsize=12pt fontweight=bold background=lightgrey];


rbreak after / summarize style(summary)=[fontsize=12pt fontweight=bold background=lightgrey];


compute after Region;


line ' ';


endcomp;


compute after Type;


line ' ';


endcomp;


run;


;



catalog catalog=work.formats;


delete blankvalue / entrytype=format;


;TITLE; FOOTNOTE;



3 REPLIES 3
NathanOch
Obsidian | Level 7

Sorry, the copy and paste cut off the front of my code.

ballardw
Super User

It's obnoxious, and hopefully soon to change, with the paste function here. Until then (next week) you will get better results pasting the code from the SAS editor into a NOTEPAD or similar pure text editor and then copy/paste from there to the forum.

You should show your entire ODS statement sending the data to Excel. Some options may be of interest for this bit.

Cynthia_sas
SAS Super FREQ

Hi:

  This is a question for SAS Tech Support. When you run a stored process, depending on whether or how you are overriding the values for &_ODSDEST reserved macro variable, you may or may not be generating code that respects the ODS style PRETEXT that you are coding. This will depend on the version of SAS and the version of the Platform and other things about your stored process setup (not just &_ODSDEST, but &_ODSSTYLE).

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

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
  • 3 replies
  • 911 views
  • 0 likes
  • 3 in conversation