The SAS Output Delivery System and reporting techniques

Proc report for spacing and sub-variables adjustment

Reply
Contributor
Posts: 21

Proc report for spacing and sub-variables adjustment

Hi team,

 

I am using the proc report to print the atatched,please fin find the below attachment for the same. Issue is I am not able maintian spacing as required for the report and i have only rigth and centre which is not fullfilling my requirement.

 

Please also find the code in the below.Please suggest me how to proceed with this for the report.

 

Title5 “KanCare Monitoring”;

title6 "Number of Beneficiaries Referred for Lock-In Review";

proc report data=table4a;/*

define case_subcategory_cd_desc/group 'Number of Beneficiaries Referred for Lock-In Review' style=[cellwidth=5.5 in just=left] ;*/

define case_subcategory_cd_desc/group '' style=[cellwidth=5.5 in just=left] ;

define Current_Month/sum style=[cellwidth=1.2 in just=left] ;

define QTD/sum style=[cellwidth=1.2 in just=left] ;

define YTD/sum style=[cellwidth=1.2 in just=left] ;

options missing=0;

run;

title5;

title6;

 

 

 

proc report data=MCO_feedback_rpt_final;

column case_subcategory_cd_desc Current_Month,(MCO) QTD,(MCO) YTD, MCO;

define case_subcategory_cd_desc/group "MCO Feedback Action Taken" style=[cellwidth=3.5 in just= left] ;

define Current_Month/analysis style=[cellwidth=0.6 in just=left] ' ';

define QTD/analysis style=[cellwidth=0.6 in just=left] ' ';

define YTD/analysis style=[cellwidth=0.6 in just=left] ' ';

define MCO/across " " ;

options missing=0;

run;

 

Also how to remove the cell borders and how to ge the format Y/N if possible as a single variable.

 

Thanks,

Harish


L_D5BA.tmp.PNG
Super User
Super User
Posts: 7,970

Re: Proc report for spacing and sub-variables adjustment

Do you mean you want to have some spaces before the text, i.e. like indenting?  If so then just pop some spaces in the data - in a datastep:

var=cat("   ",strip(var));

 

Then in your report use this:

define var / "Name" style={asis=on};

 

Note the style={asis=on} - if you take this away then SAS will trim blanks in the report.

Contributor
Posts: 21

Re: Proc report for spacing and sub-variables adjustment

Thanks for the Prompt reply..

 

Please let me know how to remove the Cell borders in the report and I mean cell borders for the each value should not be there..

 

Thanks,

Harish

Super User
Super User
Posts: 7,970

Re: Proc report for spacing and sub-variables adjustment

There are a lot of papers out there on what styles to put where, here for instance:

https://support.sas.com/resources/papers/proceedings11/246-2011.pdf

https://support.sas.com/resources/papers/stylesinprocs.pdf

 

Its all in the style()= part, you can set thicknesses, color, no borders etc.

SAS Super FREQ
Posts: 8,868

Re: Proc report for spacing and sub-variables adjustment

Hi:
I don't see any cell borders in the report PNG you posted. Also, in your code, you did NOT show your ODS statements. Are you using PDF or RTF with ODS to create output. Typically in those destinations, most people start with JOURNAL style, which removes all interior table lines.

But as RW9 has indicated, there are lots of previous postings on how to use style= overrides.

Also for indenting, depending on your destination you may not have to pad the variable with spaces, if you are using RTF or PDF, then INDENT= or LEFTMARGIN= should work for you.

cynthia
Super User
Posts: 11,343

Re: Proc report for spacing and sub-variables adjustment


Harish2 wrote:

Hi team,

 

 

Also how to remove the cell borders and how to ge the format Y/N if possible as a single variable.

 

Thanks,

Harish


To discuss details of your "Y/N" you'll have to provide some details of what your actual data looks like. A data step to generate a few records that looks like your data helps be specific.

If you are currently using a custom format to create the displayed 0/0 value then you should also include the definition of that format. Since your code does not use any format statements we really cannot tell what may need to be changed.

Ask a Question
Discussion stats
  • 5 replies
  • 160 views
  • 0 likes
  • 4 in conversation