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
Diamond | Level 26
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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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