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 2025: Call for Content

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!

Submit your idea!

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
  • 1 reply
  • 384 views
  • 0 likes
  • 2 in conversation