<?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: logical statement into Proc Report ods in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431557#M68673</link>
    <description>I think there is a EURO format that will put the symbol in for you. You would use that format instead of the COMMAX. Not sure whether it is EURO or EUROX, but you should be able to find it in the doc.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
    <pubDate>Sat, 27 Jan 2018 20:23:53 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2018-01-27T20:23:53Z</dc:date>
    <item>
      <title>logical statement into Proc Report ods</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431528#M68668</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data base with invoices, taxes and costumer information and I need to get a pdf file for each invoice. I'm&amp;nbsp;trying&amp;nbsp;to get a pdf file with a Proc Report statement but i have a bug with the logical statement (IF.First facture&amp;nbsp;THEN do). I need help to know where i should place it (i'm a new sas's user). I would be very grateful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attach the code and the result expecting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lucia&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 11:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431528#M68668</guid>
      <dc:creator>luciacossaro</dc:creator>
      <dc:date>2018-01-27T11:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: logical statement into Proc Report ods</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431536#M68669</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The type of report you show can be done; however, not the way you have coded.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="not_work_report.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18149i8D5B478C17D2B6B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="not_work_report.png" alt="not_work_report.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For starters, you can only have 1 COLUMN statement in PROC REPORT. While you could control the COLUMN statement for each customer in a Macro program, I do not think you need one here. I would write the name, address in a COMPUTE before block and then instead of calculating TOTAL yourself, let PROC REPORT generate the total. Something like this. I didn't bother with Monospace style or fonts because the font looked OK to me. Also, I'm not sure where you got your 31,12 for the line under the summary, because I did not see it in your data.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example_invoice.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18150i8435A53FB917997F/image-size/large?v=v2&amp;amp;px=999" role="button" title="example_invoice.png" alt="example_invoice.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code I used. I did a bit of data manipulation on your TABLEFINAL data, everything else was the same as you posted in your example code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
title; footnote;
data final2;
  length namestr $300;
  set tablefinal;
  fullname = catx(' ',Cvl,Prenom,Nom);
  fullcity = catx(' -- ',Code_postal,Ville);
  namestr=catx('^{newline 1}',fullname,Adresse,fullcity);
run;

options nodate nonumber orientation=portrait 
        nobyline leftmargin=2in rightmargin=1.25in;
ods escapechar='^';
ods pdf file='c:\temp\aaa.pdf' style=journal notoc;
title j=l 'Societe MEE' j=r "&amp;amp;sysdate9" ;
title2 j=l "Material d'experts economiques";
title3;
title4 j=l 'Facture numero #byval1';
  

proc report data=final2 nowd
     style(report)={frame=void width=100%};
  by Facture;
  column Facture namestr Produit Descriptif Prix_HT TVA  Q  TTC ;
  define Facture / order f=12. page noprint;
  define namestr / order noprint;
  define Produit / order 'Produit' style(header)={just=r};
  define Descriptif / display 'Description';
  define Prix_HT / display 'Prix_HT' style(header)={just=r};
  define TVA / display  'TVA'style(header)={just=r};
  define Q / display 'Quantité' style(header)={just=r};
  define TTC / sum 'TTC' style(header)={just=r} f=commax12.2;
  break after facture / summarize page;
  compute before _page_ / style=SystemTitle{just=r};
     line namestr $varying300.;
  endcomp;
  compute after facture / style=Header{just=l};
    length aftline $200;
    aftline = catx(' ','Total arrete a', put(TTC.sum, commax12.2),'toutes taxes comprises, incluant 31,12 de TVA.');
    line aftline $varying200.; 
    line ' ';
    line 'En votre aimable relement par retour de courrier.';
  endcomp;

RUN ;
ods pdf close;
 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 27 Jan 2018 14:54:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431536#M68669</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-01-27T14:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: logical statement into Proc Report ods</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431540#M68670</link>
      <description>&lt;P&gt;Thanks you very much for you&amp;nbsp;clarifying and complete answer, it help me so much. The 31.12 is a variable too, i get it&amp;nbsp;multiplying "TVA" for "q" for each product and&amp;nbsp;adding the result for each invoice. I going to include this varaible in the tablefinal data&amp;nbsp; and i going to includ it into the attributes of "aftline=".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 15:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431540#M68670</guid>
      <dc:creator>luciacossaro</dc:creator>
      <dc:date>2018-01-27T15:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: logical statement into Proc Report ods</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431543#M68671</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Ah, that makes sense. So my approach, since you need a DATA step anyway to make NAMESTR is to just add a new variable there. Something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
title; footnote;
data final2;
  length namestr $300;
  set tablefinal;
  fullname = catx(' ',Cvl,Prenom,Nom);
  fullcity = catx(' -- ',Code_postal,Ville);
  namestr=catx('^{newline 1}',fullname,Adresse,fullcity);
  tout_tax = q*tva;
run;

options nodate nonumber orientation=portrait 
        nobyline leftmargin=2in rightmargin=1.25in;
ods escapechar='^';
ods pdf file='c:\temp\aaa.pdf' style=journal notoc;
title j=l 'Societe MEE' j=r "&amp;amp;sysdate9" ;
title2 j=l "Material d'experts economiques";
title3;
title4 j=l 'Facture numero #byval1';
  

proc report data=final2 nowd
     style(report)={frame=void width=100%};
  by Facture;
  column Facture namestr Produit Descriptif Prix_HT TVA  Q  TTC tout_tax;
  define Facture / order f=12. page noprint;
  define namestr / order noprint;
  define Produit / order 'Produit' style(header)={just=r};
  define Descriptif / display 'Description';
  define Prix_HT / display 'Prix_HT' style(header)={just=r};
  define TVA / display  'TVA' style(header)={just=r};
  define Q / display 'Quantité' style(header)={just=r};
  define TTC / sum 'TTC' style(header)={just=r} f=commax12.2;
  define tout_tax / sum f=commax12.2 noprint;
  break after facture / summarize page;
  compute before _page_ / style=SystemTitle{just=r};
     line namestr $varying300.;
  endcomp;
  compute after facture / style=Header{just=l};
    length aftline $200;
    aftline = catx(' ','Total arrete a', put(TTC.sum, commax12.2),'toutes taxes comprises, incluant', put(tout_tax.sum,commax12.2), 'de TVA.');
    line aftline $varying200.; 
    line ' ';
    line 'En votre aimable relement par retour de courrier.';
  endcomp;

RUN ;
ods pdf close;
 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I used the Journal style because it is a very nice, clean style.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 17:08:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431543#M68671</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-01-27T17:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: logical statement into Proc Report ods</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431545#M68672</link>
      <description>&lt;P&gt;Thanks you very much! I've added the TVA variable in the bottom of report. It's possible to add the Euro symbol after the numbers in the column TTC ? K&lt;/P&gt;&lt;P&gt;I'added it in&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;aftline &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;catx&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;' '&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'Total arrete a'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;put&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;TTC&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;sum&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; commax12&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;2&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'toutes taxes comprises, incluant'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;put&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;tout_tax&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;sum&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;commax12&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;2&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'&lt;SPAN&gt;€ &lt;/SPAN&gt;de TVA.'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but the&amp;nbsp;&lt;SPAN&gt;€ overwtrites the number if i put&amp;nbsp;€ in the defines, i get the bugs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm agree hhe journal style is very nice.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Lucia&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 18:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431545#M68672</guid>
      <dc:creator>luciacossaro</dc:creator>
      <dc:date>2018-01-27T18:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: logical statement into Proc Report ods</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431557#M68673</link>
      <description>I think there is a EURO format that will put the symbol in for you. You would use that format instead of the COMMAX. Not sure whether it is EURO or EUROX, but you should be able to find it in the doc.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Sat, 27 Jan 2018 20:23:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431557#M68673</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-01-27T20:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: logical statement into Proc Report ods</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431558#M68674</link>
      <description>&lt;P&gt;Excellent! thanks you very much for all.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Lucia&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 20:26:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431558#M68674</guid>
      <dc:creator>luciacossaro</dc:creator>
      <dc:date>2018-01-27T20:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: logical statement into Proc Report ods</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431560#M68675</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The EUROX format worked for me, as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="use_eurox.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18152iAA9E3FFCA230B54B/image-size/large?v=v2&amp;amp;px=999" role="button" title="use_eurox.png" alt="use_eurox.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although this Tech Support note &lt;A href="http://support.sas.com/kb/56/238.html" target="_blank"&gt;http://support.sas.com/kb/56/238.html&lt;/A&gt; mentions another format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 20:41:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431560#M68675</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-01-27T20:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: logical statement into Proc Report ods</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431708#M68685</link>
      <description>&lt;P&gt;It's works. Thanks you very much for all answer, you've helped me so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a excellent journey!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 09:25:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/logical-statement-into-Proc-Report-ods/m-p/431708#M68685</guid>
      <dc:creator>luciacossaro</dc:creator>
      <dc:date>2018-01-29T09:25:37Z</dc:date>
    </item>
  </channel>
</rss>

