BookmarkSubscribeRSS Feed
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

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;

15 REPLIES 15
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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

JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

Thank you. I am goign to try

Cynthia_sas
SAS Super FREQ
Hi:
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
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

Thank you. Trying

Ksharp
Super User

Add one option to make pdf as big as to hold all variables.

option papersize=(100in 100in) ;
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

thank you

JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

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;

JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

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;

Cynthia_sas
SAS Super FREQ

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:

use_startpage.png


cynthia

JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

Thank  you ! it works! Wonderful.

JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

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

Ksharp
Super User

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;

JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

Ok, I see, will try.

 

Thank you.

 

I have another question: Smiley Happy.

 

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'

 

ballardw
Super User

@JHE wrote:

Ok, I see, will try.

 

Thank you.

 

I have another question: Smiley Happy.

 

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?

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 15 replies
  • 15097 views
  • 1 like
  • 5 in conversation