BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Hello,

I have a display problem with this method.
When I set at the beginning embedded_titles = 'yes', I have two concerns
1 / at the beginning of the display I have this displayed #byval (sex)
2 / the title of the report below the value of the title byval

If I remove embedded_titles = 'yes' in beginning, no title #byval  in second report
my objectifs are
1/ Insert the title of the report 2/ then, if there are titles that result from the #byval then it appears after the title of the report Thank you for your help
 

 

proc sort data=sashelp.class out=class; by sex; run;

ODS LISTING CLOSE;

ods escapechar="~";

ods excel file="H:\newdirectory\test.xls" options(sheet_name='test' sheet_interval='none'   suppress_bylines='yes' );

ods text="~{style[color=Black fontstyle=italic font_weight=bold] Report 1}";

proc report data=  class ;
run;


ods text="~{style[color=Black fontstyle=italic font_weight=bold] Report 2}";

ods excel options(embedded_titles='yes'  );


proc report data= class ;
by sex;
title j=l '#byval(sex)';
run;
ods _all_ close;
ODS LISTING CLOSE;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
options nobyline;
I think that removes the by titles. Then you can explicitly control them using your own Title2 statements. You'll need to reference the by variables using #byval notation. See the documentation for more details and examples

https://documentation.sas.com/?docsetId=grstatproc&docsetTarget=n1ukd9sqgqiwwhn1mrx4c1rbse1j.htm&doc...

View solution in original post

1 REPLY 1
Reeza
Super User
options nobyline;
I think that removes the by titles. Then you can explicitly control them using your own Title2 statements. You'll need to reference the by variables using #byval notation. See the documentation for more details and examples

https://documentation.sas.com/?docsetId=grstatproc&docsetTarget=n1ukd9sqgqiwwhn1mrx4c1rbse1j.htm&doc...

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch 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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1447 views
  • 0 likes
  • 2 in conversation