<?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: SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241616#M55709</link>
    <description>hello RW9 HNY, &lt;BR /&gt;macro to generate report in PDF,RTF,EXCEL FROM INPUT DATASET.....&lt;BR /&gt;Parameters to be used &lt;BR /&gt;1)	indsn – Input Dataset&lt;BR /&gt;2)	varlist – List of Variables to be printed. If none then print all variables in the dataset&lt;BR /&gt;3)	report_type – PDF or Excel or RTF. You need to use appropriate ODS statements.&lt;BR /&gt;4)	title1 – Title1 of the report&lt;BR /&gt;5)	footnote1 – Footnote1 of the report&lt;BR /&gt;6)	report_location – Physical location of the report.&lt;BR /&gt;this is my question..&lt;BR /&gt;am working on....&lt;BR /&gt;%macro reportgen(indsn=,varlist=, report_type=, title1=, footnote=, report_location=);&lt;BR /&gt;%local i nextword;&lt;BR /&gt;%let dsid =%sysfunc(open(&amp;amp;indsn));&lt;BR /&gt;%do i=1 %to %sysfunc(countw(&amp;amp;varlist));&lt;BR /&gt;%let nextword = %scan(&amp;amp;varlist, &amp;amp;i);&lt;BR /&gt;%if %sysfunc(varnum(&amp;amp;dsid,&amp;amp;nextword))&amp;gt; 0 %then %do;&lt;BR /&gt;%put Variable &amp;amp;nextword exists!;&lt;BR /&gt;    %end;&lt;BR /&gt;%mend reportgen;&lt;BR /&gt;%macro reportgen(indsn=work.test, varlist=var1,var2,var4,report_type=,title,footnote,report_location);&lt;BR /&gt;&lt;BR /&gt;am stuck here....reading d varlist but how can i incorporate rest of the variables if varlist empty &amp;amp; incorporate rest of the parameters in the code logic....</description>
    <pubDate>Mon, 04 Jan 2016 10:27:04 GMT</pubDate>
    <dc:creator>RTelang</dc:creator>
    <dc:date>2016-01-04T10:27:04Z</dc:date>
    <item>
      <title>SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241595#M55706</link>
      <description>&lt;P&gt;SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset..,indsn – Input Dataset, varlist – List of Variables to be printed. If none then print all variables in the dataset, &amp;nbsp;report_type – PDF or Excel or RTF, title1 – Title1 of the report&amp;nbsp;footnote1 – Footnote1 of the report&amp;nbsp;report_location – Physical location of the report....&lt;/P&gt;
&lt;P&gt;can u help me in building logic for this...?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 07:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241595#M55706</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-01-04T07:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241598#M55707</link>
      <description>&lt;BR /&gt;Parameters to be used &lt;BR /&gt;1)	indsn – Input Dataset&lt;BR /&gt;2)	varlist – List of Variables to be printed. If none then print all variables in the dataset&lt;BR /&gt;3)	report_type – PDF or Excel or RTF. You need to use appropriate ODS statements.&lt;BR /&gt;4)	title1 – Title1 of the report&lt;BR /&gt;5)	footnote1 – Footnote1 of the report&lt;BR /&gt;6)	report_location – Physical location of the report &lt;BR /&gt;</description>
      <pubDate>Mon, 04 Jan 2016 07:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241598#M55707</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-01-04T07:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241614#M55708</link>
      <description>&lt;P&gt;So what is it "you" have done towards this, what is the "question" you are stuck on. &amp;nbsp;Much like the other posts, this is just a request for someone else to write the program for you.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 10:18:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241614#M55708</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-01-04T10:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241616#M55709</link>
      <description>hello RW9 HNY, &lt;BR /&gt;macro to generate report in PDF,RTF,EXCEL FROM INPUT DATASET.....&lt;BR /&gt;Parameters to be used &lt;BR /&gt;1)	indsn – Input Dataset&lt;BR /&gt;2)	varlist – List of Variables to be printed. If none then print all variables in the dataset&lt;BR /&gt;3)	report_type – PDF or Excel or RTF. You need to use appropriate ODS statements.&lt;BR /&gt;4)	title1 – Title1 of the report&lt;BR /&gt;5)	footnote1 – Footnote1 of the report&lt;BR /&gt;6)	report_location – Physical location of the report.&lt;BR /&gt;this is my question..&lt;BR /&gt;am working on....&lt;BR /&gt;%macro reportgen(indsn=,varlist=, report_type=, title1=, footnote=, report_location=);&lt;BR /&gt;%local i nextword;&lt;BR /&gt;%let dsid =%sysfunc(open(&amp;amp;indsn));&lt;BR /&gt;%do i=1 %to %sysfunc(countw(&amp;amp;varlist));&lt;BR /&gt;%let nextword = %scan(&amp;amp;varlist, &amp;amp;i);&lt;BR /&gt;%if %sysfunc(varnum(&amp;amp;dsid,&amp;amp;nextword))&amp;gt; 0 %then %do;&lt;BR /&gt;%put Variable &amp;amp;nextword exists!;&lt;BR /&gt;    %end;&lt;BR /&gt;%mend reportgen;&lt;BR /&gt;%macro reportgen(indsn=work.test, varlist=var1,var2,var4,report_type=,title,footnote,report_location);&lt;BR /&gt;&lt;BR /&gt;am stuck here....reading d varlist but how can i incorporate rest of the variables if varlist empty &amp;amp; incorporate rest of the parameters in the code logic....</description>
      <pubDate>Mon, 04 Jan 2016 10:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241616#M55709</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-01-04T10:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241617#M55710</link>
      <description>indirectly need a generic macro to generate the PDF/Excel/RTF reports from the input SAS dataset???</description>
      <pubDate>Mon, 04 Jan 2016 10:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241617#M55710</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-01-04T10:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241669#M55712</link>
      <description>Why do you need to loop through the variable list? If you're using proc print you can use the macro variable directly. Otherwise, if it's empty you don't need a VAR statement because you're printing all the variables.  Use that in your logic. I also don't see your report code, which is where you should start off from.</description>
      <pubDate>Mon, 04 Jan 2016 15:35:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241669#M55712</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-04T15:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241781#M55732</link>
      <description>hi reeza, i am using varlist to o/p only particular variables if the varlist is empty then all d variables from the dataset will be used in d report. &amp;amp; am not able to incorporate the ods code with my above mentioned macro so am asking for lil help... i went through various PDFS but no avail...</description>
      <pubDate>Tue, 05 Jan 2016 05:27:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241781#M55732</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-01-05T05:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241783#M55733</link>
      <description>how do i logic PDF/EXCEL/RTF ODS type in a generic macro.. so if report-type= pdf,rtf,excel.. i need to choose any one in my parameter &amp;amp; the report should b generated according to option..</description>
      <pubDate>Tue, 05 Jan 2016 05:33:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241783#M55733</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-01-05T05:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241815#M55735</link>
      <description>&lt;P&gt;You can use the below logic to check the VAR Listed under VARS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%Macro ReportGen (indsn=DatasetName, Vars=);
	Proc print data = &amp;amp;DatasetName;
	%if &amp;amp;vars ne %then %do;
	VAR &amp;amp;Vars;
	%end;
	%else %do;
	%put no var specified !!;
	%End;
	Run;

%Mend ReportGen;

%ReportGen(Admit,)
%ReportGen(Admit, Name Gender)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Jan 2016 12:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241815#M55735</guid>
      <dc:creator>varunk</dc:creator>
      <dc:date>2016-01-05T12:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro to generate the PDF/Excel/RTF report from the input SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241840#M55737</link>
      <description>&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/34605947/sas-macro-which-will-generate-the-pdf-excel-rtf-report-from-the-input-sas-datase" target="_blank"&gt;http://stackoverflow.com/questions/34605947/sas-macro-which-will-generate-the-pdf-excel-rtf-report-from-the-input-sas-datase&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 15:26:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-macro-to-generate-the-PDF-Excel-RTF-report-from-the-input/m-p/241840#M55737</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-05T15:26:28Z</dc:date>
    </item>
  </channel>
</rss>

