I have created two macros using PROC SQL from a table attached as follows
proc sql;
create table March_Quarter_Begin as
select March as MarchStart from prototype
where Milestone = 'Quarter_Start';
select cats('',put(MarchStart,WORDDATX19.),'') into : Kotara_start from March_Quarter_begin;
quit;run;
proc sql;
create table March_Quarter_end as
select March as MarchEnd from prototype
where Milestone = 'Quarter_Stop';
select cats('',put(MarchEnd,WORDDATX19.),'') into : Kotara_end from March_Quarter_end;
quit;run;
I then created a pdf report using the code below.
ods pdf file = "&TMC_Report\Weekly_TMC_Performance_Report.pdf_file" notoc;
ods text = "Quarter performance: &Kotara_start to &Kotara_end";
Proc report data=Prototype;
run;
The results are in the pdf file attached.
The problem is that the dates are showing on two rows instead of a single row in the report.
Is there something I am not doing correct?
Please assist?
Regards
MMohotsi
To me it looks like the title may be too long for the margin/page settings you have in your report. I think that is because CATS normally returns a result of length 200, you can use the TRIMMED options to ret rid of trailing blanks:
select cats('',put(MarchStart,WORDDATX19.),'') into : Kotara_start TRIMMED from March_Quarter_begin;
To me it looks like the title may be too long for the margin/page settings you have in your report. I think that is because CATS normally returns a result of length 200, you can use the TRIMMED options to ret rid of trailing blanks:
select cats('',put(MarchStart,WORDDATX19.),'') into : Kotara_start TRIMMED from March_Quarter_begin;
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 25. 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.