BookmarkSubscribeRSS Feed
sameer112217
Quartz | Level 8
My issue is that I created a report in Proc Report. When I ran it, it worked fine. I used one  variable as across, so it increased the width of the report. In the email trigger, I am not able to view it completely. layout start width=8.5in height=11in; I tried increasing the width of 100% or 100 inch. How can increase it further in the email body as I used html body.Is there alternative? Sameer
3 REPLIES 3
ballardw
Super User

1) it is a good idea to at least show the code you are using to create the Proc Report

2) which ods destination are you sending the report to for inclusion in the Email? You might want to consider creating the report as an RTF or PDR document and attaching. Then use an appropriate style to create smaller text and use style elements to control cell/ column widths.

sameer112217
Quartz | Level 8

%macro Consolidated_reporting;

proc format;
picture hextraffic
low-<0 = "green"
other = "lightgrey"
;
run;

options missing=0;

ODS _ALL_ CLOSE;
filename mailbox email
TO= ('cccc@xrgmail.com' 'cccc@idfcfirstbank.com' 'ccccc@xrgmail.com' 'ccccc@ext-mails.com')

/*CC=*/
/*(*/
/**/
/*)*/
type='text/html'
subject="Alliance MIS Report for the Consolidated partners"
ATTACH="F:\IT_Projects\Strategic_Alliance_MBL\Strategic_Alliance_MBLMIS.xlsx";
ods html file=mailbox rs=none ;
OPTIONS MISSING=0;
PROC ODSTEXT;
P "Dear All,";
p " ";
p " Please find the attached Consolidated Partners BIL/LAP MIS as on &cur_date. ";
p " ";
P " Disb Potential is a sum of all Pending Disb cases (mentioned above) and Disbursed Cases" ;
p " ";
P " Please note that the amount numbers are in lakhs" ;

RUN;
ODS LAYOUT START COLUMNS=1 WIDTH=40.0IN HEIGHT=4.0IN;
ODS REGION;

options missing=0;
PROC REPORT DATA=final_report3
style(report) = {just=left borderwidth=0.5 font = ('zurich BT',8PT) bordercolor = black}
style(header) = {foreground = white background = maroon font = ('zurich BT',8PT) fontweight = bold bordercolor =black}
style(column) = {just=left foreground = black borderwidth = 0.5 borderstyle=solid bordercolor = black};
format app_cm_amt 5.2 dis_cm_amt 5.2 dis_cm_count 5.2 log_cm_amt 5.2 TARGET 5.2 DIFF 5.2;
format length PARTNER_PRODUCT $32.;
COLUMN PARTNER_PRODUCT Partner log_cm_count log_cm_amt
app_cm_count app_cm_amt TARGET dis_cm_count dis_cm_amt DIFF
;
define PARTNER_PRODUCT/group 'PARTNER_PRODUCT' format=$32. ;
DEFINE Partner/GROUP 'PARTNER' ;

define log_cm_count/analysis ' LOGIN_CM_CT ' style(column)={just=c CELLWIDTH =1.0in };
define log_cm_amt/analysis 'LOGIN_CM_AMT' style(column)={just=c CELLWIDTH =1.0in };

define app_cm_count/analysis 'APR_CM_AMT' style(column)={just=c CELLWIDTH =1.0in };
define app_cm_amt/analysis 'APR_CM_AMT' style(column)={just=c CELLWIDTH =1.0in };

define target/analysis style(column)={just=c CELLWIDTH =1.0in background=lightbrown};
define dis_cm_count/analysis 'DISB_CM_CT' style(column)={just=c CELLWIDTH =1.0in };
define dis_cm_amt/analysis 'DISB_CM_AMT' style(column)={just=c CELLWIDTH =1.0in background=lightbrown};

define DIFF/computed format=5.2 style(column)={just=c CELLWIDTH =1.0in background=hextraffic.};;

compute DIFF/;
DIFF=target.sum-dis_cm_amt.sum;
endcomp;

compute after PARTNER_PRODUCT;
PARTNER_PRODUCT='SUBT';
endcomp;

/*break after state/summarize;*/
/**/
/*break after zone/summarize;*/
/*rbrEAK AFTER /SUMMARIzE DOL DUL;*/

compute after;
PARTNER_PRODUCT= 'TOTAL';
endcomp;

break after PARTNER_PRODUCT/summarize style=Header {background=darkbrown foreground=white} ;
/*break after PARTNER/summarize style =Header {background=lightyellow} ;*/
rbreak after/summarize style= Header {background=maroon foreground=white FONT_WEIGHT=bold};

run;

%mend;

Consolidated_reporting;

 

sameer112217
Quartz | Level 8

HEre is the code. I need more width in email template.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 677 views
  • 0 likes
  • 2 in conversation