BookmarkSubscribeRSS Feed
anshulrastogi64
Calcite | Level 5

Hi all,

 

Whenever the proc report output is exceeding the page dimension the output is not getting printed in the pdf file. 

 

options orientation=landscape nodate nonumber topmargin=0.15in bottommargin=0.15in leftmargin=0.15in rightmargin=0.15in;

ods pdf file="/home/u49705186/SAS Report Writing/ANB_pdf/IM_VM.pdf" ;
ods escapechar='~';
ods layout absolute width=8.00in height=11.00in;

ods region x=0in y=1in;
ods pdf text="~S={outputwidth=100% bordertopcolor=#D53032 bordertopwidth=1pt } ";
ods pdf text="~{newline}";

ods region x=0in y=2.0in ;
ods pdf text='~{style[font_face=Arial fontweight=bold fontsize=7pt]Counterparty: xxxxxxxxxxxxxxxx}';
ods pdf text='~{style[font_face=Arial fontweight=bold fontsize=7pt]To:}';
ods pdf text='~{style[font_face=Arial fontweight=bold fontsize=7pt]Email:}';
ods pdf text='~{style[font_face=Arial fontweight=bold fontsize=7pt]Valuation Date: xxxxxxxxxx}';

ods region x=5in y=2.0in ;
ods text='~{style[fontweight=bold font_face=Arial fontsize=7pt]From: xxxxxxxxxxx}';
ods text='~{style[fontweight=bold font_face=Arial fontsize=7pt] xxxxxxxxxxxx}';
ods text='~{style[fontweight=bold font_face=Arial fontsize=7pt]Tel: xxxxxxxxxxxx}';


ods region y=3.0in x=0.0in ;
proc report data=cva
style(header) ={backgroundcolor=blue color=white borderleftcolor=black borderleftwidth=.5pt
borderrightcolor=black borderrightwidth=.5pt borderbottomcolor=black borderbottomwidth=.5pt bordertopcolor=black bordertopwidth=.5pt}
style(column) = {borderleftcolor=black borderleftwidth=.5pt
borderrightcolor=black borderrightwidth=.5pt borderbottomcolor=black borderbottomwidth=.5pt bordertopcolor=black bordertopwidth=.5pt};
where cpty_id ="2667";
column M_NB_INIT TRADE_DATE END_DATE M_TRN_FMLY M_TRN_GRP M_CNT_TYPO PRODUCT M_H_CURR0 M_H_NOMINAL0 M_H_CURR1 M_H_NOMINAL1 MMT_CCY RC_MTM_VALUE_SAR_NS;
define M_NB_INIT / display 'CNT.ORIGIN';
define TRADE_DATE / display;
define END_DATE / display 'EXPIRY DATE';
define RC_MTM_VALUE_SAR_NS /display 'MTM';
define M_TRN_FMLY/display noprint;
define M_TRN_GRP/display noprint;
define M_CNT_TYPO/display noprint;
/* define CPTY_NAME/display 'COUNTERPART' ls=100;*/
define M_H_CURR0/display 'NOMINAL CCY0';
define M_H_NOMINAL0/display 'NOMINAL0';
define M_H_CURR1/display 'NOMINAL CCY1';
define M_H_NOMINAL1/display 'NOMINAL1';
define MMT_CCY/ computed 'MTM CCY';
define PRODUCT/computed ;
compute PRODUCT/ character length=20 ;
PRODUCT =compress(M_TRN_FMLY) || ' ' || compress(M_TRN_GRP) || ' ' || compress(M_CNT_TYPO);
endcomp;
compute MMT_CCY/ character length=5;
MMT_CCY= "USD";
endcomp;
run;

ods layout end;

ods pdf startpage=now;
proc odstext;
p"*xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx."
/style=[font_face=Arial fontsize=6pt];
p"~{newline 1}";
p'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.'/style=[font_face=Arial fontsize=6pt];
run;

 

ods pdf close;

1 REPLY 1
ballardw
Super User

Since we do not have your data we can't test this.

 

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the </> icon or attached as text to show exactly what you have and that we can test code against.

 

What is your current system PAPERSIZE setting? Changing that may be appropriate if the PDF is not intended for printing on specific sizes of paper. You can make a logic size as big as needed to share the PDF.

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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