BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi Friends,

I need the 2 reports in sepearate page of PDF. The first report is given in Fig 1 which should have only one dataset rows but the report 2 will have 2 dataset datas with two different title as given in fig 2. Please help me friends.

Figure 1
Report 1- title

a d b d - column hearder which should be bold
1 2 3 4
.
.
.
12 month data 2 3 4 - last row of dataset which should be bold.

Figure 2
Report 2
Title -1
a d b d - column hearder which should be bold
1 2 3 4
.
.
.
12 month data 2 3 4 - last row of dataset which should be bold.
Title -2
a d b d - column hearder which should be bold
1 2 3 4
.
.
.
12 month data 2 3 4 - last row of dataset which should be bold.
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi!
The ODS STARTPAGE= option allows you to control where page breaks are inserted into your output file. This code starts out by turning page breaking off (STARTPAGE=NO) and then inserts a page break control (STARTPAGE=NOW) between procedure 1 and procedures 2 and 3);

The style(total)= override on the Proc Print statement is making the summary line bold. Of course, that works in conjunction with the SUM statement in PROC PRINT. If your tables are produced with a different procedure, you might need to use different syntax.

Good luck!
cynthia [pre]
*** the code;
ods pdf file='c:\temp\selvi.pdf' startpage=no;

proc print data=sashelp.shoes(obs=12) noobs
style(total)={font_weight=bold};
title1 'First Report';
var region subsidiary product sales inventory;
sum sales inventory;
run;

ods pdf startpage=now;

proc print data=sashelp.shoes(obs=12) noobs
style(total)={font_weight=bold};
title1 'Report 2 and Report 3';
var region subsidiary product sales inventory;
sum sales inventory;
run;

proc print data=sashelp.shoes(obs=12) noobs
style(total)={font_weight=bold};
var region subsidiary product sales inventory;
sum sales inventory;
run;
ods pdf close;

[/pre]
deleted_user
Not applicable
Hi Friend,

Thanks. I will try and let you know.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 794 views
  • 0 likes
  • 2 in conversation