BookmarkSubscribeRSS Feed
sameer112217
Quartz | Level 8

 

When I am using the below code, I am seeing proper formatted reports in my EG but if I send it on email the columns are shrink and small. In my outlook email the output column is not aligned and formatted. When I am getting an option of how the message is displayed and to view it in a browser I am getting proper format and column width. IS there any way I can increase the size/width of column size. Is it code issue or email setting issue

 

 

Proc Report data=BS1_Sample_code Missing split="*" nowd
Style (report)= {just=left borderwidth=0.5 font =('zurich b',9PT) bordercolor=black font_size=2}
Style (header)= {foreground=white background=blue font_size=2 font=('zurich b',9PT) fontweight=bold bordercolor=black}
Style (column)= {just=center foreground=black font_size=2 borderwidth=0.5 borderstyle=solid bordercolor=black};

column ("Balance Sheet - Amount- (USD) in 1000's"(Entity_Cd Vs_Product VS_Product_L1
CURRENT_DAY_USD PREVIOUS_DAY_USD Variance Variance_per));

Define Entity_Cd/"ENTITY" group style={just=L cellwidth=0.9} ;
Define Vs_Product/"Vs Product" group style={just=L cellwidth=0.9} ;
Define VS_Product_L1/"VS_Product_L1" group style={just=L cellwidth=0.9} ;
Define CURRENT_DAY_USD/analysis sum "11JUN2023 - AMOUNT USD" format= 20. style={just=r cellwidth=0.5};
Define PREVIOUS_DAY_USD/analysis sum "10JUN2023 - AMOUNT USD" format= 20. style={just=r cellwidth=0.5};
Define Variance/analysis sum "Variance" format= 20. style={just=r cellwidth=0.5};
Define Variance_per/"Variance %" computed format=percent8.2 style={just=r cellwidth=0.5};

compute Variance_per;
Variance_per=(CURRENT_DAY_USD.sum-PREVIOUS_DAY_USD.sum)/PREVIOUS_DAY_USD.sum;
endcomp;

compute after Vs_Product;
Vs_Product="Total"||''||Vs_Product;
call define(_row_,"style","style={background=cxEEFFFF}");
endcomp;

 

break after Vs_Product / dol skip summarize;
rbreak after / style ={background=brown};

1 REPLY 1
ballardw
Super User

Suggestion with options like Cellwidth: supply a unit of measure. One piece of software might default to a different unit so what you think is .9 inches might be interpreted as .9cm elsewhere. Same with fonts use a standard unit of measure like points instead of the relative font_size=2. Do you know what that 2 means?

 

Another approach would be to create a document format like RTF and PDF, where you can see the result externally from the email program and attach the document instead of placing the report directly into the email.

 


@sameer112217 wrote:

 

When I am using the below code, I am seeing proper formatted reports in my EG but if I send it on email the columns are shrink and small. In my outlook email the output column is not aligned and formatted. When I am getting an option of how the message is displayed and to view it in a browser I am getting proper format and column width. IS there any way I can increase the size/width of column size. Is it code issue or email setting issue

 

 

Proc Report data=BS1_Sample_code Missing split="*" nowd
Style (report)= {just=left borderwidth=0.5 font =('zurich b',9PT) bordercolor=black font_size=2}
Style (header)= {foreground=white background=blue font_size=2 font=('zurich b',9PT) fontweight=bold bordercolor=black}
Style (column)= {just=center foreground=black font_size=2 borderwidth=0.5 borderstyle=solid bordercolor=black};

column ("Balance Sheet - Amount- (USD) in 1000's"(Entity_Cd Vs_Product VS_Product_L1
CURRENT_DAY_USD PREVIOUS_DAY_USD Variance Variance_per));

Define Entity_Cd/"ENTITY" group style={just=L cellwidth=0.9} ;
Define Vs_Product/"Vs Product" group style={just=L cellwidth=0.9} ;
Define VS_Product_L1/"VS_Product_L1" group style={just=L cellwidth=0.9} ;
Define CURRENT_DAY_USD/analysis sum "11JUN2023 - AMOUNT USD" format= 20. style={just=r cellwidth=0.5};
Define PREVIOUS_DAY_USD/analysis sum "10JUN2023 - AMOUNT USD" format= 20. style={just=r cellwidth=0.5};
Define Variance/analysis sum "Variance" format= 20. style={just=r cellwidth=0.5};
Define Variance_per/"Variance %" computed format=percent8.2 style={just=r cellwidth=0.5};

compute Variance_per;
Variance_per=(CURRENT_DAY_USD.sum-PREVIOUS_DAY_USD.sum)/PREVIOUS_DAY_USD.sum;
endcomp;

compute after Vs_Product;
Vs_Product="Total"||''||Vs_Product;
call define(_row_,"style","style={background=cxEEFFFF}");
endcomp;

 

break after Vs_Product / dol skip summarize;
rbreak after / style ={background=brown};


 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 220 views
  • 0 likes
  • 2 in conversation