<?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 Re: Output just the title from PROC REPORT in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207283#M13740</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Cynthia has stated, just add a step to check this.&amp;nbsp; Myself I generally do something like:&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table TEST &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;a char(20),b num);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.vtable (where=(libname="WORK" and memname="TEST" and nobs=0));&lt;/P&gt;&lt;P&gt;&amp;nbsp; call execute('data test; msg="No data found"; output; run;');&amp;nbsp;&amp;nbsp; /* will only be called if the dataset has 0 observations */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2015 13:49:48 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-07-23T13:49:48Z</dc:date>
    <item>
      <title>Output just the title from PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207280#M13737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;,Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am seeking your help in trying to resolve an issue which i am getting while generating the report. Report is generated as a PDF which has a mix of reports(generated using PROC REPORT statements) and text(ODS PDF TXT). When there is data in dataset then we use PROC REPORT to print else use ODS PDF TXT to provide a comment "No data found". There are about 4 datasets that are part of this report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Sample Pseudocode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ODS PDF FILE= &amp;lt;destination&amp;gt;;&lt;/P&gt;&lt;P&gt;1. Check if data present in dataset - DataA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If yes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROC REPORT DATA=DataA;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS PDF TEXT='No data found';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This repeats for the 4 datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue that i am facing is-&lt;/P&gt;&lt;P&gt;1. When there is no data present in DataA, the overall title which i want for the report is not getting published. The report starts with the text "No data found".&lt;/P&gt;&lt;P&gt;2. If i were to output the main title as PDF TEXT , then the remainder of the report is coming just as PDF TEXT and not print PROC REPORT outputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be great if i can just publish the titles when the dataset is empty and move forward. Is there any such means? Or a better suggestion to generate the report in itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Vimal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 13:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207280#M13737</guid>
      <dc:creator>VimalKurup</dc:creator>
      <dc:date>2015-07-21T13:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Output just the title from PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207281#M13738</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; ODS PDF TEXT= does not trigger a title statement. Only a procedure will trigger a title statement. So you could do something like this instead of your current else branch (shown in pseudocode):&lt;/P&gt;&lt;P&gt;*** new else branch ***&lt;/P&gt;&lt;P&gt;data msg;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length msg $100;&lt;/P&gt;&lt;P&gt;&amp;nbsp; msg="no data found';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;title 'The title you want';&lt;/P&gt;&lt;P&gt;proc report data=msg nowd noheader;&lt;/P&gt;&lt;P&gt;&amp;nbsp; column msg;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;*** end new else branch ***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 23:11:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207281#M13738</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-07-21T23:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Output just the title from PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207282#M13739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cynthia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate the time you took in responding to my query. Issue is resolved. I used PROC REPORT more or less similar to the one in your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, Thanks !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vimal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:42:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207282#M13739</guid>
      <dc:creator>VimalKurup</dc:creator>
      <dc:date>2015-07-23T13:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Output just the title from PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207283#M13740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Cynthia has stated, just add a step to check this.&amp;nbsp; Myself I generally do something like:&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table TEST &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;a char(20),b num);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.vtable (where=(libname="WORK" and memname="TEST" and nobs=0));&lt;/P&gt;&lt;P&gt;&amp;nbsp; call execute('data test; msg="No data found"; output; run;');&amp;nbsp;&amp;nbsp; /* will only be called if the dataset has 0 observations */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207283#M13740</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-23T13:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Output just the title from PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207284#M13741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you RW9&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2015 13:43:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/207284#M13741</guid>
      <dc:creator>VimalKurup</dc:creator>
      <dc:date>2015-07-31T13:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Output just the title from PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/284375#M16345</link>
      <description>&lt;P&gt;I realize this is an old thread....would it be possible to see full example code for something like this?&amp;nbsp; I have an ODS RTF report file I am creating for ~50 projects by macro.&amp;nbsp; There are 10 tables in each RTF report.&amp;nbsp; All created in proc print statements and controlling for labels, header alignment, etc., and it works fine.&amp;nbsp; EXCEPT, when one of the proc prints with a "where" statement resolves to no observations.&amp;nbsp; I still want the proc print titles to appear but there wouldn't be any table below it.&amp;nbsp; How can I trigger the titles if no data is retrieved by proc print?&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 15:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/284375#M16345</guid>
      <dc:creator>NWV</dc:creator>
      <dc:date>2016-07-14T15:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Output just the title from PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/284662#M16349</link>
      <description>It doesn't matter whether you are talking about PROC REPORT or PROC PRINT, the code example shown in 2015 is the type of code you need to use. You cannot trigger just a title without SOMETHING else on the page. So making a dataset with an "error" message in the event of a WHERE that returns 0 obs is something you will have to code for. &lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Thu, 14 Jul 2016 19:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/284662#M16349</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-07-14T19:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Output just the title from PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/284805#M16353</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 11:50:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-just-the-title-from-PROC-REPORT/m-p/284805#M16353</guid>
      <dc:creator>NWV</dc:creator>
      <dc:date>2016-07-15T11:50:41Z</dc:date>
    </item>
  </channel>
</rss>

