sas reporting...

Reply
Contributor
Posts: 31

sas reporting...

okay, i assume this should be a simple solution that i am just not coming up with but...i am new to sas reporting so i have two very large tables i am looking into creating a report for.  the reports are basicallly a summation of two variables grouped by a different variable for each report.  i have already built tables of the data i want on the report.  what i would like is to create a single pdf report with multiple tables & titles on it.  so it would look something like this...

 

pdf start

 

title 1

 

proc sql;

select *

    from table1;

quit;

 

 

title 2

 

proc sql;

select *

    from table2;

quit;

 

...4 more tables...

 

footnote...

 

end pdf

 

i would think this is possible but for some reason i keep getting a page break in between.  it does not have to be proc sql pulling the data also. 

Contributor svh
Contributor
Posts: 21

Re: sas reporting...

Have you tried the startpage=no option in your code?

 

ods pdf file='path' startpage=no; 

<different procedures>

ods pdf close;
Contributor
Posts: 31

Re: sas reporting...

[ Edited ]

that was part of it, i was putting the startpage=no in the wrong spot.  here is the code i am using...

 

data _null_ NOPRINT;
	today1=put(date(),worddate18.);
	today2=put(date(),YYMMDD10.);
	call symput('worddate',today1);
	call symput('numdate',today2);
run;


ods pdf file="test.pdf" startpage=no;
options label;

title "Test Reporting"; Footnote Generated by &_CLIENTUSERNAME with SAS Enterprise Guide &_CLIENTVERSION on &worddate; proc report data=RPT01 split="~" spanrows; title1 'report 01'; column SOURCE AmtA AmtB; run; title1; proc report data=RPT03 split="~" spanrows; title2 'report 03'; column SOURCE AMT1 AMT2; run; title2; title; ods pdf close; ods listing;

now however, i do not get the title inbetween.  this does stack the reports on the pdf but does not put a title inbetween like i need to explain the output...

Respected Advisor
Posts: 3,293

Re: sas reporting...

The ODS PDF destination allows for one title on a page. If there is a second output that begins on the same page, there is no new title.

 

See this thread for a way to add "titles".

https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/ODS-PDF-2-charts-per-page-titles-missing-o...

 

 

--
Paige Miller
Contributor svh
Contributor
Posts: 21

Re: sas reporting...

I've had this issue before, too. One workaround is to use ODS TEXT in the body of the report to add a title in the page. The TITLE statements are not that flexible and you can use ODS TEXT ='SAMPLE TITLE HERE' ; above your PROC REPORT code to insert text where you want it to go. 

Super User
Posts: 13,947

Re: sas reporting...


@svh wrote:

I've had this issue before, too. One workaround is to use ODS TEXT in the body of the report to add a title in the page. The TITLE statements are not that flexible and you can use ODS TEXT ='SAMPLE TITLE HERE' ; above your PROC REPORT code to insert text where you want it to go. 


Or Proc ODSTEXT which allows a little more flexibility in some ways than ODS text and does not create table output.

Ask a Question
Discussion stats
  • 5 replies
  • 90 views
  • 1 like
  • 4 in conversation