<?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 sub-headings or rather sub-columns in proc report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77732#M8801</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all-&lt;/P&gt;&lt;P&gt;I have another burning question that I hope can be resolved-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am looking to do is essentially create sub columns that branch across other columns for the purposes of highlighting and specifying date information so that for example you have columns defined as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;columns ('PROCESS A', A1 A2 A3) ('PROCESS B' B1 B2 B3)&lt;/P&gt;&lt;P&gt;But under each A1, A2,A3...B3 I need to put down the month&amp;nbsp; or QTR (by a macro)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so that final report:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROCESS A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp; Process B&lt;/P&gt;&lt;P&gt;A1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B3&lt;/P&gt;&lt;P&gt;JAN12&amp;nbsp;&amp;nbsp;&amp;nbsp; JAN12&amp;nbsp;&amp;nbsp; JAN12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2012Q1&amp;nbsp;&amp;nbsp;&amp;nbsp; JAN12&amp;nbsp;&amp;nbsp;&amp;nbsp; JAN12&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hopefully I have clarified my intent here-&lt;/P&gt;&lt;P&gt;I have no code per se as I am unsure on how to begin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option is to simply define a column, for example-&lt;/P&gt;&lt;P&gt;Define A1/"A1/&amp;amp;MONTH" I realize but I need to change the color with an escape character. If there is a way to highlight that component alone then that would suffice as well.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lawrence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Apr 2012 17:45:37 GMT</pubDate>
    <dc:creator>LB</dc:creator>
    <dc:date>2012-04-10T17:45:37Z</dc:date>
    <item>
      <title>sub-headings or rather sub-columns in proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77732#M8801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all-&lt;/P&gt;&lt;P&gt;I have another burning question that I hope can be resolved-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am looking to do is essentially create sub columns that branch across other columns for the purposes of highlighting and specifying date information so that for example you have columns defined as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;columns ('PROCESS A', A1 A2 A3) ('PROCESS B' B1 B2 B3)&lt;/P&gt;&lt;P&gt;But under each A1, A2,A3...B3 I need to put down the month&amp;nbsp; or QTR (by a macro)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so that final report:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROCESS A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp; Process B&lt;/P&gt;&lt;P&gt;A1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B3&lt;/P&gt;&lt;P&gt;JAN12&amp;nbsp;&amp;nbsp;&amp;nbsp; JAN12&amp;nbsp;&amp;nbsp; JAN12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2012Q1&amp;nbsp;&amp;nbsp;&amp;nbsp; JAN12&amp;nbsp;&amp;nbsp;&amp;nbsp; JAN12&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hopefully I have clarified my intent here-&lt;/P&gt;&lt;P&gt;I have no code per se as I am unsure on how to begin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option is to simply define a column, for example-&lt;/P&gt;&lt;P&gt;Define A1/"A1/&amp;amp;MONTH" I realize but I need to change the color with an escape character. If there is a way to highlight that component alone then that would suffice as well.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lawrence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 17:45:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77732#M8801</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2012-04-10T17:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: sub-headings or rather sub-columns in proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77733#M8802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I'm reading the words, but having trouble with some of them-- just can't visualize what you want when you say things like:&lt;/P&gt;&lt;P&gt;"sub-columns that branch across other columns" but in your "picture" you show a separate string (like JAN12 or 2012Q1) underneath &lt;SPAN style="text-decoration: underline;"&gt;each&lt;/SPAN&gt; variable name -- not "branching" or "crossing" other columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;and then you describe&lt;/P&gt;&lt;P&gt;"But under each A1, A2,A3...B3 I need to put down the month&amp;nbsp; or QTR (by a macro)" -- do you mean that A1, A2, A3 represent quarter 1 and b1, b2, b3, represent quarter 2???? OR???? One reason why I'm having trouble is that it is also not clear is why B1 shows 2012Q1, but the other columns all show JAN12 underneath the main header. And, what does macro have to do with it??? You have generic variables named A1, A2, A3 and for each run, those variable names represent different months???&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Also can't understand what you mean when you say:&lt;/P&gt;&lt;P&gt;"Define A1/"A1/&amp;amp;MONTH" I realize but I need to change the color with an escape character. If there is a way to highlight that component alone then that would suffice as well."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you say "highlight that component alone" -- what "component" do you mean? The HEADER cell, the DATA cell. Using ESCAPECHAR implies that you want to highlight a part of a string -- which part of the string do you want to highlight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, what is your destination of choice??? Still ODS PDF??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC REPORT does spanning ABOVE headers, not underneath headers. So if you run the code below, you will see LOTS of spanning headers before the "regular" headers. But PROC REPORT really doesn't put anything under each header...except data or output from LINE statements. See screenshot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you could mock up what you want your headers to look like in a Word table??? Also important to how PROC REPORT will create headers is whether you are going to have any ACROSS items in your report (how is your data structured)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods pdf file='c:\temp\spanhdr.pdf';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.cars(obs=10) nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; columns ('1 Span All'('2 And More to Say'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ('3 Span Two Stuffs'('5 Stuff' make model type origin)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ('6 More stuff' drivetrain msrp invoice enginesize))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ('4 Span Even More'('7 Even More Stuff' cylinders horsepower weight)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute before / style={just=l color=purple};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; line 'This is a LINE before data starts displaying';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute before _page_ /style={just=c color=blue font_weight=bold};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; line 'This is a LINE before _PAGE_';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10622i565E0CC26F842EAC/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="span_header_report.jpg" title="span_header_report.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 19:55:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77733#M8802</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-04-10T19:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: sub-headings or rather sub-columns in proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77734#M8803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Cynthia;&lt;/P&gt;&lt;P&gt;Thank you for your example-Sorry that I couldn't be more..obtuse in my description-&lt;/P&gt;&lt;P&gt;In essence the code you gave goes away towards what I want but I essentially need it inverted-By the code and what you said I am not sure if this is feasible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a photo made essentially made in Excel-But yes the final output would be in ODS PDF&lt;/P&gt;&lt;P&gt;I have spanned processes A &amp;amp; B into two groups with the individual data metrics below in a percent format.&lt;/P&gt;&lt;P&gt;Below each individual metric header, I have the time frame. Some of these metrics are monthly and some are quarterly- hence the difference on occasion-&lt;/P&gt;&lt;P&gt;In this scenario I would simply insert a stored value under each metric of either the month or quarter as necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can get away with defining a process with the metric and&amp;nbsp; time period using the escape character so instead of two separate headings below (A1, 2012Q1)&amp;nbsp; it would be the same in that it would still read&lt;/P&gt;&lt;P&gt;A1&lt;/P&gt;&lt;P&gt;2012Q1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I could not color code the headers accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps some.&lt;/P&gt;&lt;P&gt;Thanks again for your assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lawrence&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="example.bmp" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/1618_example.bmp" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 20:28:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77734#M8803</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2012-04-10T20:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: sub-headings or rather sub-columns in proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77735#M8804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK...so let's see if I have it. "Process A" and "Process B" are just spanning headers in the COLUMN statement or are they ACROSS items? What are A1, A2, A3 and B1, B2, B3 -- are they just regular columns or are they also ACROSS items? (Brings me back to the structure of your data, which you didn't describe -- Is your table a summary table or a just a simple detail listing of an existing "pre-calculated" dataset?) Who is calculating the percent #'s -- PROC REPORT??? Or some other process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see much color coding here -- just the yellow across the "time" headers. What you want to do is possible, it just means that you need to add some "extra" variables to the dataset in order to get that extra "row" of headers. Basically, you'll sort of fake out PROC REPORT, by making a dummy ACROSS item for every variable. I am showing data that is all ready to go -- presummarized with just the report rows that you want to show. In order to keep all the columns from collapsing or summarizing, I use ORDVAR as a NOPRINT item to make the first column. Then each variable has a "T" equivalent -- so 'A1' has 'TA1' and B1 has 'TB1' etc -- this is the fake out part. Basically, every value of TA1 is the same and every value of TB1 is the same. This will allow you to make a set of&amp;nbsp; headers above the labels for the "real" A1, A2, A3, B1, B2, B3 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the screenshot and run the code. As I said, the structure of your data is going to make a difference here, but it should not be too troublesome to "presummarize" and massage the data before sending it to PROC REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data fakedata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; infile datalines dlm=',' dsd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; input ordvar a1 a2 a3 b1 b2 b3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** make "extra" variables to be ACROSS variables;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** which will be the column headers in black and white;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** with the variable names;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ta1 = 'A1';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ta2 = 'A2';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ta3 = 'A3';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; tb1 = 'B1';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; tb2 = 'B2';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; tb3 = 'B3';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;return;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;datalines;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;1,0.36945,0.33337,0.0035,0.265,0.11084,0.4451&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;2,0.23820,0.21761,0.0020,0.200,0.07146,0.2778&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;3,0.26990,0.24647,0.0024,0.200,0.08097,0.3230&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;4,0.33195,0.30299,0.0032,0.270,0.09959,0.3575&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;5,0.43755,0.39014,0.0035,0.225,0.13127,0.3880&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title; footnote;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** now, use the a1-a3 and b1-b3 variables for the "yellow" rows;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** and assign the label for each column based on macro vars;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let time1 = 2012Q1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let time2 = JAN12;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods pdf file='c:\temp\spanhdr_fakedata.pdf';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=fakedata nowd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; style(header)={background=white};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; columns ordvar ('Process A' ta1,a1 ta2,a2 ta3,a3)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ('Process B' tb1,b1 tb2,b2 tb3,b3);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define ordvar / group noprint;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define ta1/across ' ';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define a1 /sum "&amp;amp;time1" f=percent8.2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={background=yellow};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define ta2/across ' ';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define a2 / sum "&amp;amp;time2" f=percent8.2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={background=yellow};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define ta3/across ' ';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define a3 / sum "&amp;amp;time2" f=percent8.2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={background=yellow};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define tb1/across ' ';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define b1 /sum "&amp;amp;time2" f=percent8.2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={background=yellow};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define tb2/across ' ';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define b2 / sum "&amp;amp;time2" f=percent8.2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={background=yellow};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define tb3/across ' ';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define b3 / sum "&amp;amp;time2" f=percent8.2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={background=yellow};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10715i88DE6ADB806CFB61/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="yellow_headers.jpg" title="yellow_headers.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 21:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77735#M8804</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-04-10T21:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: sub-headings or rather sub-columns in proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77736#M8805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cynthia-&lt;/P&gt;&lt;P&gt;Very ingenious-&lt;/P&gt;&lt;P&gt;In response to your question-&lt;/P&gt;&lt;P&gt; "Process A" and "Process B" are spanning headers and columns A1-B3 are indeed regular columns.&lt;/P&gt;&lt;P&gt;The percents are being calculated by proc report by means of formats. There is alot of other color coding going on-I did not include it to make it neater-I have traffic lighting that changes depending on compliance scores.&lt;/P&gt;&lt;P&gt;This should allow me to keep that formatting. My other solution was to add in the "fake" data by using proc sql to first add in the date info and then have to change everything to character and then have to deal with a lot of compute blocks. It would be messy and ugly. This method is much cleaner-Thank you again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lawrence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 21:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/sub-headings-or-rather-sub-columns-in-proc-report/m-p/77736#M8805</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2012-04-10T21:56:02Z</dc:date>
    </item>
  </channel>
</rss>

