I'm trying to print text into pdf document. I've provided example below. Can you please suggest how I can achieve this?
ods pdf file = "/folder1/checks_report.pdf" style=custom_matth notoc;
data _null_;
put "Check1 has &check1.ed";
put "This month Volume is &this_mon_vol";
put "Mean Volume of last 12 months trend is &mean_volume";
put "Std Deviation of last 12 months trend is &std_volume";
put "Lower limit for volume is &lower_limit_volume";
put "Upper limit for volume is &upper_limit_volume";
run;
ods pdf close;
run;
I want the below result in a pdf.
Check1 has passed
This month Volume is 22346
Mean Volume of last 12 months trend is 17982
Std Deviation of last 12 months trend is 3297
Lower limit for volume is 11388
Upper limit for volume is 24576
Use proc print or proc report on the dataset:
ods pdf file...; data temp; text="Check..."; output; text="This month..."; output; ... run; proc print data=temp; run; ods pdf close;
You can fiddle around with proc print or proc report options to remove labels and such like.
Use proc print or proc report on the dataset:
ods pdf file...; data temp; text="Check..."; output; text="This month..."; output; ... run; proc print data=temp; run; ods pdf close;
You can fiddle around with proc print or proc report options to remove labels and such like.
It works as I expected. Thanks!
However is there a way I could suppress variable name to be shown on the report? In below report check1 is my variable name which is printing. I would like not to display that.
|
Thank you!
I'm trying 3 proc reports in ods pdf. Each proc report is printing in different page. I need all of them to print in a single page. Is it possible?
ods pdf file = "/folder1/checks_report1.pdf" style=custom_matth notoc;
proc report data=check1 nowd noheader;
title 'Check1';
define check1 / style=[font_weight=bold font_size=14pt];
column check1;
run;
proc report data=check2 nowd noheader;
title 'Check2';
define check2 / style=[font_weight=bold font_size=14pt];
column check2;
run;
proc report data=check3 nowd noheader;
title 'Check3';
define check3 / style=[font_weight=bold font_size=14pt];
column check3;
run;
ods pdf close;
run;
Thank you! It works. But, now its printing only 1 title. The first title. I would like to have all 3 titles and their tables listed in 1 page.
ods pdf startpage=YES;
proc report data=check1 nowd noheader;
title 'Check1';
define check1 / style=[font_weight=bold font_size=14pt];
column check1;
run;
ods pdf startpage=NO;
proc report data=check2 nowd noheader;
title 'Check2';
define check2 / style=[font_weight=bold font_size=14pt];
column check2;
run;
ods pdf startpage=NO;
proc report data=check3 nowd noheader;
title 'Check3';
define check3 / style=[font_weight=bold font_size=14pt];
column check3;
run;
ods pdf close;
run;
ods pdf file = "/folders/myfolders/checks_report.pdf" style=sasweb notoc;
data _null_;
file print;
put "Check1 has &check1.ed";
put "This month Volume is &this_mon_vol";
put "Mean Volume of last 12 months trend is &mean_volume";
put "Std Deviation of last 12 months trend is &std_volume";
put "Lower limit for volume is &lower_limit_volume";
put "Upper limit for volume is &upper_limit_volume";
run;
ods pdf close;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: