<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to add a Title to my proc report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-Title-to-my-proc-report/m-p/790139#M252940</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to add the Title from my Proc Freq table "&lt;CODE class=" language-sas"&gt;Monthly Automated Tracking Records&lt;/CODE&gt;" to my proc report so it is showing above the _Counts_ table when it goes out to my customer. How would I do this?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
create table CPIM_Automation as 
SELECT DISTINCT
CPC.CHNL_PTNR_CASE_ID AS TrackingRecord
,CPT2.CHNL_PTNR_CASE_TYP_DE AS WorkType
,CPT1.CHNL_PTNR_CASE_TYP_DE AS SubType
,CPC.CHNL_PTNR_CASE_STAT_CD AS CaseStatusCode
,CPCS.SRC_SYS_CD AS SourceCode
,CPC.CHNL_PTNR_CASE_BGN_DT AS CaseStartDate
,AGET.CHNL_PTNR_CASE_SBJ_VAL_ID AS AgentType
,AGEY.CHNL_PTNR_CASE_SBJ_VAL_ID AS AgencyType
,CPCS.CHNL_PTNR_CASE_STEP_NB AS StepNumber

FROM 
CPM1P1.CHNL_PTNR_CASE_STEP CPCS
LEFT JOIN CPM1P1.CHNL_PTNR_CASE CPC ON CPCS.CHNL_PTNR_CASE_ID = CPC.CHNL_PTNR_CASE_ID
LEFT JOIN CPM1P1.CHNL_PTNR_CASE_TYP CPT1 ON CPC.CHNL_PTNR_CASE_TYP_CD = CPT1.CHNL_PTNR_CASE_TYP_CD
LEFT JOIN CPM1P1.CHNL_PTNR_CASE_TYP CPT2 ON CPT1.PRNT_CHNL_PTNR_CASE_TYP_CD = CPT2.CHNL_PTNR_CASE_TYP_CD 

       
LEFT JOIN (SELECT DISTINCT
          SUB2.CHNL_PTNR_CASE_ID, SUB2.CHNL_PTNR_CASE_SBJ_VAL_ID
          FROM CPM1P1.CHNL_PTNR_CASE_SBJ SUB2
          WHERE SUB2.CHNL_PTNR_CASE_SBJ_TYP_CD = 'CONTACTAGENTTYPE') AGET
          ON CPCS.CHNL_PTNR_CASE_ID = AGET.CHNL_PTNR_CASE_ID 

LEFT JOIN (SELECT DISTINCT
          SUB3.CHNL_PTNR_CASE_ID, SUB3.CHNL_PTNR_CASE_SBJ_VAL_ID
          FROM CPM1P1.CHNL_PTNR_CASE_SBJ SUB3
          WHERE SUB3.CHNL_PTNR_CASE_SBJ_TYP_CD = 'AGENCYTYPE') AGEY
          ON CPCS.CHNL_PTNR_CASE_ID = AGEY.CHNL_PTNR_CASE_ID
WHERE 
CaseStartDate between (intnx('month', today(), -1, 'b')+19) and (intnx('month', today(), 0, 'b')+19)
/*CaseStartDate between '20Oct2021'd and '20Nov2021'd*/
and SourceCode = 'SSPortal'
and StepNumber = 1 

ORDER BY CPC.CHNL_PTNR_CASE_ID ASC
;
quit;

proc freq data=WORK.CPIM_Automation;
	Title Monthly Automated Tracking Records;
    tables WorkType/out=_counts_ nopercent; 
run;

ods excel file="/prod/SalesOperations/appdata/users/&amp;amp;sysuserid./CPIM_Automation.xlsx" options (autofilter='all' sheet_name="Automation");

ods excel options(sheet_name="Summary" autofilter='all');
proc report data=_Counts_;
Define Group / display Group format=$5.
style(Column)=[font_size=8pt width=.7in tagattr='type:String'];
run;
ods excel options(sheet_name="Automation_Data" autofilter='all');
proc report data=CPIM_Automation;
Define Group / display Group format=$5. 
style(Column)=[font_size=8pt width=.7in tagattr='type:String'];
run;
ods excel options(sheet_name="_Counts_" autofilter='all');
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 14 Jan 2022 14:23:11 GMT</pubDate>
    <dc:creator>LMSSAS</dc:creator>
    <dc:date>2022-01-14T14:23:11Z</dc:date>
    <item>
      <title>How to add a Title to my proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-Title-to-my-proc-report/m-p/790139#M252940</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to add the Title from my Proc Freq table "&lt;CODE class=" language-sas"&gt;Monthly Automated Tracking Records&lt;/CODE&gt;" to my proc report so it is showing above the _Counts_ table when it goes out to my customer. How would I do this?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
create table CPIM_Automation as 
SELECT DISTINCT
CPC.CHNL_PTNR_CASE_ID AS TrackingRecord
,CPT2.CHNL_PTNR_CASE_TYP_DE AS WorkType
,CPT1.CHNL_PTNR_CASE_TYP_DE AS SubType
,CPC.CHNL_PTNR_CASE_STAT_CD AS CaseStatusCode
,CPCS.SRC_SYS_CD AS SourceCode
,CPC.CHNL_PTNR_CASE_BGN_DT AS CaseStartDate
,AGET.CHNL_PTNR_CASE_SBJ_VAL_ID AS AgentType
,AGEY.CHNL_PTNR_CASE_SBJ_VAL_ID AS AgencyType
,CPCS.CHNL_PTNR_CASE_STEP_NB AS StepNumber

FROM 
CPM1P1.CHNL_PTNR_CASE_STEP CPCS
LEFT JOIN CPM1P1.CHNL_PTNR_CASE CPC ON CPCS.CHNL_PTNR_CASE_ID = CPC.CHNL_PTNR_CASE_ID
LEFT JOIN CPM1P1.CHNL_PTNR_CASE_TYP CPT1 ON CPC.CHNL_PTNR_CASE_TYP_CD = CPT1.CHNL_PTNR_CASE_TYP_CD
LEFT JOIN CPM1P1.CHNL_PTNR_CASE_TYP CPT2 ON CPT1.PRNT_CHNL_PTNR_CASE_TYP_CD = CPT2.CHNL_PTNR_CASE_TYP_CD 

       
LEFT JOIN (SELECT DISTINCT
          SUB2.CHNL_PTNR_CASE_ID, SUB2.CHNL_PTNR_CASE_SBJ_VAL_ID
          FROM CPM1P1.CHNL_PTNR_CASE_SBJ SUB2
          WHERE SUB2.CHNL_PTNR_CASE_SBJ_TYP_CD = 'CONTACTAGENTTYPE') AGET
          ON CPCS.CHNL_PTNR_CASE_ID = AGET.CHNL_PTNR_CASE_ID 

LEFT JOIN (SELECT DISTINCT
          SUB3.CHNL_PTNR_CASE_ID, SUB3.CHNL_PTNR_CASE_SBJ_VAL_ID
          FROM CPM1P1.CHNL_PTNR_CASE_SBJ SUB3
          WHERE SUB3.CHNL_PTNR_CASE_SBJ_TYP_CD = 'AGENCYTYPE') AGEY
          ON CPCS.CHNL_PTNR_CASE_ID = AGEY.CHNL_PTNR_CASE_ID
WHERE 
CaseStartDate between (intnx('month', today(), -1, 'b')+19) and (intnx('month', today(), 0, 'b')+19)
/*CaseStartDate between '20Oct2021'd and '20Nov2021'd*/
and SourceCode = 'SSPortal'
and StepNumber = 1 

ORDER BY CPC.CHNL_PTNR_CASE_ID ASC
;
quit;

proc freq data=WORK.CPIM_Automation;
	Title Monthly Automated Tracking Records;
    tables WorkType/out=_counts_ nopercent; 
run;

ods excel file="/prod/SalesOperations/appdata/users/&amp;amp;sysuserid./CPIM_Automation.xlsx" options (autofilter='all' sheet_name="Automation");

ods excel options(sheet_name="Summary" autofilter='all');
proc report data=_Counts_;
Define Group / display Group format=$5.
style(Column)=[font_size=8pt width=.7in tagattr='type:String'];
run;
ods excel options(sheet_name="Automation_Data" autofilter='all');
proc report data=CPIM_Automation;
Define Group / display Group format=$5. 
style(Column)=[font_size=8pt width=.7in tagattr='type:String'];
run;
ods excel options(sheet_name="_Counts_" autofilter='all');
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Jan 2022 14:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-Title-to-my-proc-report/m-p/790139#M252940</guid>
      <dc:creator>LMSSAS</dc:creator>
      <dc:date>2022-01-14T14:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Title to my proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-Title-to-my-proc-report/m-p/790142#M252943</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel options(sheet_name="Summary" autofilter='all');
title 'Your Title Goes Here';
proc report data=_Counts_;
Define Group / display Group format=$5.
style(Column)=[font_size=8pt width=.7in tagattr='type:String'];
run;
title; /* This line removes the title so it won't appear afterwards; if that's not what you want then delete this line */&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Jan 2022 14:36:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-Title-to-my-proc-report/m-p/790142#M252943</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-14T14:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Title to my proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-Title-to-my-proc-report/m-p/790148#M252944</link>
      <description>Thank you!</description>
      <pubDate>Fri, 14 Jan 2022 14:55:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-Title-to-my-proc-report/m-p/790148#M252944</guid>
      <dc:creator>LMSSAS</dc:creator>
      <dc:date>2022-01-14T14:55:10Z</dc:date>
    </item>
  </channel>
</rss>

