BookmarkSubscribeRSS Feed
scb
Obsidian | Level 7 scb
Obsidian | Level 7

May I know how to make the proc report data appear in page1 instead of page2? I run the below codes; but the proc report data output appeared on page2, not on page1 after the ods text.  Can anyone help? Thank you very much.

 

 

ods pdf file='c:\sastest\test.pdf' style=minimal;

proc tabulate data=sashelp.cars format=dollar14.2;
class type; var invoice msrp; table type, msrp invoice msrp*pctsum<invoice>='Ratio of MSRP to Invoice'*f=8.2;
run;

 

ODS TEXT = "TRANSACTION RECORDS";

PROC REPORT DATA=SASHELP.CARS(Where=(Make='Volvo')) style(header)=[background=tan] NOWINDOWS HEADLINE HEADSKIP;
COLUMNS MAKE MODEL INVOICE;
DEFINE MAKE /GROUP 'Car Brand';
DEFINE MODEL /GROUP 'Car Model';
DEFINE INVOICE / ANALYSIS 'INVOICE' FORMAT=DOLLAR16.2;

RBREAK AFTER/ SUMMARIZE;

RUN;

ODS PDF CLOSE;
ODS LISTING;

1 REPLY 1
Reeza
Super User

Look at the STARTPAGE option on the ODS PDF statement - specifically note what the default option is compared to what you want.

 


@scb wrote:

May I know how to make the proc report data appear in page1 instead of page2? I run the below codes; but the proc report data output appeared on page2, not on page1 after the ods text.  Can anyone help? Thank you very much.

 

 

ods pdf file='c:\sastest\test.pdf' style=minimal;

proc tabulate data=sashelp.cars format=dollar14.2;
class type; var invoice msrp; table type, msrp invoice msrp*pctsum<invoice>='Ratio of MSRP to Invoice'*f=8.2;
run;

 

ODS TEXT = "TRANSACTION RECORDS";

PROC REPORT DATA=SASHELP.CARS(Where=(Make='Volvo')) style(header)=[background=tan] NOWINDOWS HEADLINE HEADSKIP;
COLUMNS MAKE MODEL INVOICE;
DEFINE MAKE /GROUP 'Car Brand';
DEFINE MODEL /GROUP 'Car Model';
DEFINE INVOICE / ANALYSIS 'INVOICE' FORMAT=DOLLAR16.2;

RBREAK AFTER/ SUMMARIZE;

RUN;

ODS PDF CLOSE;
ODS LISTING;


 

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 552 views
  • 0 likes
  • 2 in conversation