- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I need have pdf file fit all the columns on one padge.
The code would not working, do no tknow why, need help. which option I should use to make it fit on one page.
options orientation=landscape pdfpageview=FITPAGE nocenter ;
ods pdf file="/mnt/nfs/prod/Sched/OpsDeptData/Operations/Reports/TPL_Membership_Summary_05042017.pdf";
PROC REPORT DATA=TPLMEM.TPL_SUMMARY_0100;
COLUMN MONTH Category OVERALL_MEMBERSHIP TPL MEDICARE MEDICARE_SUPPLEMENTAL MEDICARE_A MEDICARE_B MEDICARE_AB MEDICARE_ADVANTAGE COMMERCIAL VISION DENTAL LIMITED_BENEFITS Casualty PHARMACY;
DEFINE MONTH/GROUP;
DEFINE MONTH/ORDER descending;
title " LOB 0100 TPL Membership" ;
footnote" Run at &sDay &stime" ;
RUN;
ods pdf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You need to provide the information to SAS to get information to fit on a page, e.g.
ods pdf file="..."; proc report data=yourdata; column month category ...; define month / group style(column)={cellwidth=3cm}; ...; run;
Note the use of style()=, you can set all kinds of things here, cellwidth shows how wide the column would be (in this case in cm). Make sure all your columns widths add up to the width of the page and your columns will all fit on one page. Page breaking however is a totally different question (then you need an algorithm to work out how many rows per page to be displayed).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. I am goign to try
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Scott Huntley and I discussed wide output in our paper: https://support.sas.com/resources/papers/proceedings14/SAS038-2014.pdf and showed other STYLE= techniques.
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. Trying
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Add one option to make pdf as big as to hold all variables.
option papersize=(100in 100in) ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This works!
Thank you !
ods listing close;
options orientation=landscape papersize=(100in 100in)
nonumber topmargin=.25in bottommargin=.25in
leftmargin=.25in rightmargin=.25in;
ods escapechar='^';
ods pdf file="/mnt/nfs/prod/Sched/OpsDeptData/Operations/Reports/TPL_Membership/Summary/TPL_Membership_Summary.pdf";
PROC REPORT DATA=TPLMEM.TPL_SUMMARY_0100;
COLUMN MONTH Category OVERALL_MEMBERSHIP TPL MEDICARE MEDICARE_SUPPLEMENTAL MEDICARE_A MEDICARE_B MEDICARE_AB MEDICARE_ADVANTAGE COMMERCIAL VISION DENTAL LIMITED_BENEFITS Casualty PHARMACY;
DEFINE MONTH/GROUP;
DEFINE MONTH/ORDER descending;
title " LOB 0100 TPL Membership" ;
footnote" Run at &sDay &stime" ;
RUN;
ods pdf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
if Need put mutiple report for same PDF file, but would be mutiple page, this would not working.
ods listing close;
options orientation=landscape papersize=(100in 100in)
nonumber topmargin=.25in bottommargin=.25in
leftmargin=.25in rightmargin=.25in;
ods escapechar='^';
ods pdf file="/mnt/nfs/prod/Sched/OpsDeptData/Operations/Reports/TPL_Membership/Summary/TPL_Membership_Summary.pdf";
PROC REPORT DATA=TPLMEM.TPL_SUMMARY_0100;
COLUMN MONTH Category OVERALL_MEMBERSHIP TPL MEDICARE MEDICARE_SUPPLEMENTAL MEDICARE_A MEDICARE_B MEDICARE_AB MEDICARE_ADVANTAGE COMMERCIAL VISION DENTAL LIMITED_BENEFITS Casualty PHARMACY;
DEFINE MONTH/GROUP;
DEFINE MONTH/ORDER descending;
title " LOB 0100 TPL Membership" ;
footnote" Run at &sDay &stime" ;
RUN;
options orientation=landscape papersize=(100in 100in)
nonumber topmargin=.25in bottommargin=.25in
leftmargin=.25in rightmargin=.25in;
ods escapechar='^';
PROC REPORT DATA=TPLMEM.TPL_SUMMARY_0500;
COLUMN MONTH Category OVERALL_MEMBERSHIP TPL MEDICARE MEDICARE_SUPPLEMENTAL MEDICARE_A MEDICARE_B MEDICARE_AB MEDICARE_ADVANTAGE COMMERCIAL VISION DENTAL LIMITED_BENEFITS Casualty PHARMACY;
DEFINE MONTH/GROUP;
DEFINE MONTH/ORDER descending;
title "LOB 0500 TPL Membership";
footnote" Run at &sDay &stime" ;
RUN;
ods pdf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
If you know that both reports will fit on one physical page, one after the other, then you can use the STARTPAGE=NO option, like this (using PROC FREQ and PROC MEANS because I know that both tables will fit on 1 landscape page):
options orientation=landscape;
ods pdf file='c:\temp\use_startpage.pdf' startpage=no;
proc freq data=sashelp.class;
tables age;
run;
proc means data=sashelp.class n min mean median;
var height;
class sex;
run;
ods pdf close;
Results:
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you ! it works! Wonderful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ods pdf file fit on one page. when user oopen the pdf file, by defualt the viewable size very small, they need to resize make it readable. If they want to print , pdf file always stay on small size, how to solve this issue, how to set uo pdf default size as the normall readable size?
thank yo
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can change papersize as small as you can just hold all the variables.
options orientation=landscape papersize=(100in 100in)
nonumber topmargin=.25in bottommargin=.25in
leftmargin=.25in rightmargin=.25in;
options orientation=landscape papersize=(20in 10in)
nonumber topmargin=.25in bottommargin=.25in
leftmargin=.25in rightmargin=.25in;
options orientation=landscape papersize=A4
nonumber topmargin=.25in bottommargin=.25in
leftmargin=.25in rightmargin=.25in;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I see, will try.
Thank you.
I have another question: .
Might be easy for you.
data _null_;
dEnd =intnx('dtmonth', dhms(today(),0,0,0), -1,'e');
dStart =intnx('dtMonth', dhms(today(),0,0,0), -1,'b');
Call symputx('dmstart',CATS("'",PUT(dStart,DATEtime18.),"'"));
Call symputx('dmEnd',CATS("'",PUT(dEnd,DATEtime18.),"'"));
run;
%PUT &dmstart &dmEnd;
'01APR17:00:00:00' '30APR17:23:59:59'
What I shold do if I need this format: '01APR2017:00:00:00' '30APR2017:23:59:59'
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@JHE wrote:
Ok, I see, will try.
Thank you.
I have another question:
.
Might be easy for you.
data _null_;
dEnd =intnx('dtmonth', dhms(today(),0,0,0), -1,'e');
dStart =intnx('dtMonth', dhms(today(),0,0,0), -1,'b');
Call symputx('dmstart',CATS("'",PUT(dStart,DATEtime18.),"'"));
Call symputx('dmEnd',CATS("'",PUT(dEnd,DATEtime18.),"'"));
run;
%PUT &dmstart &dmEnd;
'01APR17:00:00:00' '30APR17:23:59:59'
What I shold do if I need this format: '01APR2017:00:00:00' '30APR2017:23:59:59'
Why are you asking this date format question AGAIN?
You received many answers in https://communities.sas.com/t5/Base-SAS-Programming/Month-beging-with-00-00-00-month-end-with-23-59-... including one that you say "agrere, that is the solution!" 2 hours before posting this question?