<?xml version="1.0" encoding="utf-8" standalone="no"?>
<TfrxReport Version="5.4.6" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.Author="unionsystem" ReportOptions.CreateDate="41561,8945570602" ReportOptions.Description.Text="" ReportOptions.Name="Venda por quadrante" ReportOptions.LastChange="43003,6587139931" ScriptLanguage="PascalScript" ScriptText.Text="&#13;&#10;function Ext1(Valor: Real): String;&#13;&#10;begin&#13;&#10;  // Linha 1&#13;&#10;&#13;&#10;  Result := Copy(Extenso(Valor), 0, 80);&#13;&#10;&#13;&#10;  while Length(Result) &#60;&#62; 80 do Result := Result + '*';&#13;&#10;end;&#13;&#10;&#13;&#10;function Ext2(Valor: Real): String;&#13;&#10;begin&#13;&#10;  // Linha 2&#13;&#10;&#13;&#10;  Result := Copy(Extenso(Valor), 81, 80);&#13;&#10;&#13;&#10;  while Length(Result) &#60;&#62; 80 do Result := Result + '*';&#13;&#10;end;&#13;&#10;&#13;&#10;function Ext3(Valor: Real): String;&#13;&#10;begin&#13;&#10;  // Linha 3&#13;&#10;&#13;&#10;  Result := Copy(Extenso(Valor), 162, 80);&#13;&#10;&#13;&#10;  while Length(Result) &#60;&#62; 80 do Result := Result + '*';&#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;function Extenso(Valor: Real): String;&#13;&#10;&#13;&#10;function Mini(Valor: String): String;&#13;&#10;var&#13;&#10;  Texto : array[0..36] of string = (['A','UM', 'DOIS', 'TRES', 'QUATRO', 'CINCO', 'SEIS', 'SETE',&#13;&#10;                                   'OITO', 'NOVE', 'DEZ', 'ONZE', 'DOZE', 'TREZE', 'CATORZE',&#13;&#10;                                   'QUINZE', 'DEZESSEIS', 'DEZESSETE', 'DEZOITO', 'DEZENOVE',&#13;&#10;                                   'VINTE', 'TRINTA', 'QUARENTA', 'CINQÜENTA', 'SESSENTA',&#13;&#10;                                   'SETENTA', 'OITENTA', 'NOVENTA', 'CENTO', 'DUZENTOS',&#13;&#10;                                   'TREZENTOS', 'QUATROCENTOS', 'QUINHENTOS', 'SEISCENTOS', 'SETECENTOS', 'OITOCENTOS', 'NOVECENTOS']);&#13;&#10;begin&#13;&#10;  // Mini extenso&#13;&#10;&#13;&#10;  Result := '';&#13;&#10;&#13;&#10;  if Valor &#60;&#62; '000' then&#13;&#10;  begin&#13;&#10;    if StrToInt(Valor) &#60;= 20 then&#13;&#10;    begin&#13;&#10;      Result := Result + Texto[StrToInt(Valor)];&#13;&#10;    end&#13;&#10;    else&#13;&#10;    if (StrToInt(Valor) &#62; 20) and (StrToInt(Valor) &#60; 100) then&#13;&#10;    begin&#13;&#10;      if Copy(Valor, 2, 1) = '2' then Result := Result + Texto[20];&#13;&#10;      if Copy(Valor, 2, 1) = '3' then Result := Result + Texto[21];&#13;&#10;      if Copy(Valor, 2, 1) = '4' then Result := Result + Texto[22];&#13;&#10;      if Copy(Valor, 2, 1) = '5' then Result := Result + Texto[23];&#13;&#10;      if Copy(Valor, 2, 1) = '6' then Result := Result + Texto[24];&#13;&#10;      if Copy(Valor, 2, 1) = '7' then Result := Result + Texto[25];&#13;&#10;      if Copy(Valor, 2, 1) = '8' then Result := Result + Texto[26];&#13;&#10;      if Copy(Valor, 2, 1) = '9' then Result := Result + Texto[27];&#13;&#10;&#13;&#10;      if Copy(Valor, 3, 1) &#60;&#62; '0' then Result := Result + ' E ' + Texto[StrToInt(Copy(Valor, 3, 1))];&#13;&#10;    end&#13;&#10;    else&#13;&#10;    if StrToInt(Valor) &#62; 99 then&#13;&#10;    begin&#13;&#10;      if Valor = '100' then Result := Result + 'CEM' else&#13;&#10;      begin&#13;&#10;        if Copy(Valor, 1, 1) = '1' then Result := Result + Texto[28];&#13;&#10;        if Copy(Valor, 1, 1) = '2' then Result := Result + Texto[29];&#13;&#10;        if Copy(Valor, 1, 1) = '3' then Result := Result + Texto[30];&#13;&#10;        if Copy(Valor, 1, 1) = '4' then Result := Result + Texto[31];&#13;&#10;        if Copy(Valor, 1, 1) = '5' then Result := Result + Texto[32];&#13;&#10;        if Copy(Valor, 1, 1) = '6' then Result := Result + Texto[33];&#13;&#10;        if Copy(Valor, 1, 1) = '7' then Result := Result + Texto[34];&#13;&#10;        if Copy(Valor, 1, 1) = '8' then Result := Result + Texto[35];&#13;&#10;        if Copy(Valor, 1, 1) = '9' then Result := Result + Texto[36];&#13;&#10;      end;&#13;&#10;&#13;&#10;      if (StrToInt(Copy(Valor, 2, 2)) &#60;= 20) and (StrToInt(Copy(Valor, 2, 2)) &#62; 0) then&#13;&#10;      begin&#13;&#10;        Result := Result + ' E ' + Texto[StrToInt(Copy(Valor, 2, 2))];&#13;&#10;      end&#13;&#10;      else&#13;&#10;      if StrToInt(Copy(Valor, 2, 2)) &#62; 20 then&#13;&#10;      begin&#13;&#10;        if Copy(Valor, 2, 1) = '2' then Result := Result + ' E ' + Texto[20];&#13;&#10;        if Copy(Valor, 2, 1) = '3' then Result := Result + ' E ' + Texto[21];&#13;&#10;        if Copy(Valor, 2, 1) = '4' then Result := Result + ' E ' + Texto[22];&#13;&#10;        if Copy(Valor, 2, 1) = '5' then Result := Result + ' E ' + Texto[23];&#13;&#10;        if Copy(Valor, 2, 1) = '6' then Result := Result + ' E ' + Texto[24];&#13;&#10;        if Copy(Valor, 2, 1) = '7' then Result := Result + ' E ' + Texto[25];&#13;&#10;        if Copy(Valor, 2, 1) = '8' then Result := Result + ' E ' + Texto[26];&#13;&#10;        if Copy(Valor, 2, 1) = '9' then Result := Result + ' E ' + Texto[27];&#13;&#10;&#13;&#10;        if Copy(Valor, 3, 1) &#60;&#62; '0' then Result := Result + ' E ' + Texto[StrToInt(Copy(Valor, 3, 1))];&#13;&#10;      end;&#13;&#10;    end;&#13;&#10;  end;&#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;var&#13;&#10;  ValorF: String;&#13;&#10;  Bilhao, Milhao, Milhar, Centena, Centavos: String;&#13;&#10;begin&#13;&#10;  // Verifico&#13;&#10;&#13;&#10;  if (Valor &#60; 0) or (Valor &#62; 999999999999.99) then&#13;&#10;  begin&#13;&#10;    Result := 'VALOR INVÁLIDO!!!';&#13;&#10;  end&#13;&#10;  else&#13;&#10;  begin&#13;&#10;    // Formato o valor e jogo numa variável&#13;&#10;&#13;&#10;    ValorF := FormatFloat('###,###,###,###,##000000000000.00', Valor);&#13;&#10;&#13;&#10;    // Divido o valor formatado e jogo em variáveis&#13;&#10;&#13;&#10;    Bilhao   := Copy(ValorF, 0, 3);&#13;&#10;    Milhao   := Copy(ValorF, 5, 3);&#13;&#10;    Milhar   := Copy(ValorF, 9, 3);&#13;&#10;    Centena  := Copy(ValorF, 13, 3);&#13;&#10;    Centavos := '0' + Copy(ValorF, 17, 2);&#13;&#10;&#13;&#10;    Result := '';&#13;&#10;&#13;&#10;    if Mini(Bilhao) &#60;&#62; '' then&#13;&#10;    begin&#13;&#10;      if StrToInt(Bilhao) = 1 then Result := Result + Mini(Bilhao) + ' ' + 'BILHAO' else Result := Result + Mini(Bilhao) + ' ' + 'BILHOES';&#13;&#10;    end;&#13;&#10;&#13;&#10;    if Mini(Milhao) &#60;&#62; '' then&#13;&#10;    begin&#13;&#10;      if Mini(Bilhao) &#60;&#62; '' then Result := Result + ', ';&#13;&#10;&#13;&#10;      if StrToInt(Milhao) = 1 then Result := Result + Mini(Milhao) + ' ' + 'MILHAO' else Result := Result + Mini(Milhao) + ' ' + 'MILHOES';&#13;&#10;    end;&#13;&#10;&#13;&#10;    if Mini(Milhar) &#60;&#62; '' then&#13;&#10;    begin&#13;&#10;      if (Mini(Bilhao) &#60;&#62; '') or (Mini(Milhao) &#60;&#62; '') then Result := Result + ', ';&#13;&#10;&#13;&#10;      Result := Result + Mini(Milhar) + ' ' + 'MIL';&#13;&#10;    end;&#13;&#10;&#13;&#10;    if Mini(Centena) &#60;&#62; '' then&#13;&#10;    begin&#13;&#10;      if (Mini(Bilhao) &#60;&#62; '') or (Mini(Milhao) &#60;&#62; '') or (Mini(Milhar) &#60;&#62; '') then Result := Result + ', ';&#13;&#10;&#13;&#10;      Result := Result + Mini(Centena);&#13;&#10;    end;&#13;&#10;&#13;&#10;    if Trunc(Valor) &#62; 1 then Result := Result + ' REAIS' else if Trunc(Valor) = 1 then Result := Result + ' REAL';&#13;&#10;&#13;&#10;    if Mini(Centavos) &#60;&#62; '' then&#13;&#10;    begin&#13;&#10;      if (Mini(Bilhao) &#60;&#62; '') or (Mini(Milhao) &#60;&#62; '') or (Mini(Milhar) &#60;&#62; '') or (Mini(Centena) &#60;&#62; '') then Result := Result + ' E ';&#13;&#10;&#13;&#10;      Result := Result + Mini(Centavos) + ' CENTAVOS';&#13;&#10;    end;&#13;&#10;  end;&#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;procedure Page1OnBeforePrint(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;    if &#60;Logo&#62; &#60;&#62; '' then&#13;&#10;      Picture1.picture.loadfromfile(&#60;Logo&#62;);&#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;begin&#13;&#10;&#13;&#10;end.">
  <Datasets>
    <item DataSet="dados" DataSetName="dados"/>
    <item DataSet="fparametros" DataSetName="parametros"/>
  </Datasets>
  <Variables>
    <item Name=" externas"/>
    <item Name="logo"/>
    <item Name="Produto"/>
    <item Name="Qtde"/>
  </Variables>
  <TfrxDataPage Name="frxDataPage1" Height="1000" Left="0" Top="0" Width="1000"/>
  <TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" PrintIfEmpty="False" HGuides.Text="" VGuides.Text="" OnBeforePrint="Page1OnBeforePrint">
    <TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="16,99134" Left="0" Top="313,70099" Width="718,1107" ColumnWidth="0" ColumnGap="0" DataSet="dados" DataSetName="dados" PrintIfDetailEmpty="True" RowCount="0">
      <TfrxMemoView Name="Memo7" Left="340,1577" Top="1,77953" Width="94,48800591" Height="15,11812" DataField="qtde" DataSet="dados" DataSetName="dados" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[dados.&#34;qtde&#34;]"/>
      <TfrxMemoView Name="Memo9" Left="548,03185" Top="1,77953" Width="94,48800591" Height="15,11812" DataSet="dados" DataSetName="dados" DisplayFormat.FormatStr="%2.2m" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" ParentFont="False" Text=""/>
      <TfrxMemoView Name="dadosnome" Left="0" Top="0" Width="325,03958" Height="18,89765" DataField="nome" DataSet="dados" DataSetName="dados" Text="[dados.&#34;nome&#34;]"/>
    </TfrxMasterData>
    <TfrxPageHeader Name="PageHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="23,89765" Left="0" Top="230,55133" Width="718,1107" PrintOnFirstPage="False">
      <TfrxMemoView Name="Memo2" Left="340,1577" Top="7,33859" Width="94,48825" Height="15,11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" HAlign="haRight" ParentFont="False" Text="Quantidade"/>
      <TfrxMemoView Name="Memo6" Left="548,03185" Top="7,33859" Width="94,48825" Height="15,11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" HAlign="haRight" ParentFont="False" Text="Preço médio"/>
      <TfrxMemoView Name="Memo1" Left="2,55906" Top="7,33859" Width="94,48825" Height="15,11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" ParentFont="False" Text="Bairro"/>
    </TfrxPageHeader>
    <TfrxFooter Name="Footer1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="238,11039" Left="0" Top="355,27582" Width="718,1107">
      <TfrxSysMemoView Name="SysMemo1" Left="340,1577" Top="11,33859" Width="94,48825" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="4" HAlign="haRight" ParentFont="False" Text="[SUM(&#60;dados.&#34;qtde&#34;&#62;,MasterData1)]"/>
    </TfrxFooter>
    <TfrxPageFooter Name="PageFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="18,89765" Left="0" Top="653,85869" Width="718,1107">
      <TfrxMemoView Name="Memo22" Align="baWidth" Left="0" Top="1,77953" Width="718,1107" Height="15,11812" Font.Charset="1" Font.Color="0" Font.Height="-9" Font.Name="Arial" Font.Style="0" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="unionsystem sistemas - www.unionsystem.com.br"/>
    </TfrxPageFooter>
    <TfrxReportTitle Name="ReportTitle1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="188,9765" Left="0" Top="18,89765" Width="718,1107">
      <TfrxPictureView Name="Picture1" Left="3,77953" Top="3,77953" Width="223,50402" Height="105,66141" DataSet="dados" DataSetName="dados" HightQuality="False" Transparent="False" TransparentColor="16777215"/>
      <TfrxMemoView Name="parametrosrazao" Align="baCenter" Left="229,91744" Top="82,62987" Width="258,27582" Height="26,45671" DataSet="fparametros" DataSetName="parametros" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="Arial" Font.Style="1" HAlign="haCenter" ParentFont="False" Text="Vendas por bairro"/>
      <TfrxLineView Name="Line1" Align="baWidth" Left="0" Top="117,16543" Width="718,1107" Height="0" Color="0" Frame.Typ="4"/>
      <TfrxMemoView Name="Memo4" Left="544,25232" Top="27,01577" Width="166,29932" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" ParentFont="False" Text="Página [Page] de [TotalPages#]"/>
      <TfrxMemoView Name="Memo5" Left="545,47279" Top="3,77953" Width="166,29932" Height="18,89765" DisplayFormat.FormatStr="dd mmmm yyyy" DisplayFormat.Kind="fkDateTime" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[Date]"/>
      <TfrxMemoView Name="Memo3" Left="2,55906" Top="136,06308" Width="408,18924" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" ParentFont="False" Text="Produto: [Produto]"/>
      <TfrxMemoView Name="Memo8" Left="2,55906" Top="162,51979" Width="408,18924" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" ParentFont="False" Text="Quantidade: [Qtde]"/>
    </TfrxReportTitle>
  </TfrxReportPage>
  <TfrxReportPage Name="Page2" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
    <TfrxPageHeader Name="PageHeader2" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="956,22109" Left="0" Top="18,89765" Width="718,1107">
      <TfrxChartView Name="Chart1" Align="baClient" Left="0" Top="0" Width="718,1107" Height="956,22109" HighlightColor="0" PropData="0543686172740A66040000545046300654436861727405436861727410416C69676E576974684D617267696E7309044C656674020003546F7002000557696474680390010648656967687403FA00144261636B57616C6C2E50656E2E56697369626C6508104C6567656E642E416C69676E6D656E7407086C61426F74746F6D0B4178697356697369626C65080D4672616D652E56697369626C6508175669657733444F7074696F6E732E456C65766174696F6E033B01185669657733444F7074696F6E732E4F7274686F676F6E616C08195669657733444F7074696F6E732E50657273706563746976650200165669657733444F7074696F6E732E526F746174696F6E0368010B56696577334457616C6C73080A426576656C4F75746572070662764E6F6E6505436F6C6F720707636C57686974650D44656661756C7443616E766173060E54474449506C757343616E76617311436F6C6F7250616C65747465496E646578020D000A545069655365726965730753657269657331055469746C65061156656E64617320706F722062616972726F0B56616C7565466F726D6174060223300D5856616C7565732E4F72646572070B6C6F417363656E64696E670C5956616C7565732E4E616D6506035069650D5956616C7565732E4F7264657207066C6F4E6F6E651A4672616D652E496E6E657242727573682E4261636B436F6C6F720705636C526564224672616D652E496E6E657242727573682E4772616469656E742E456E64436F6C6F720706636C47726179224672616D652E496E6E657242727573682E4772616469656E742E4D6964436F6C6F720707636C5768697465244672616D652E496E6E657242727573682E4772616469656E742E5374617274436F6C6F720440404000214672616D652E496E6E657242727573682E4772616469656E742E56697369626C65091B4672616D652E4D6964646C6542727573682E4261636B436F6C6F720708636C59656C6C6F77234672616D652E4D6964646C6542727573682E4772616469656E742E456E64436F6C6F720482828200234672616D652E4D6964646C6542727573682E4772616469656E742E4D6964436F6C6F720707636C5768697465254672616D652E4D6964646C6542727573682E4772616469656E742E5374617274436F6C6F720706636C47726179224672616D652E4D6964646C6542727573682E4772616469656E742E56697369626C65091A4672616D652E4F7574657242727573682E4261636B436F6C6F720707636C477265656E224672616D652E4F7574657242727573682E4772616469656E742E456E64436F6C6F720440404000224672616D652E4F7574657242727573682E4772616469656E742E4D6964436F6C6F720707636C5768697465244672616D652E4F7574657242727573682E4772616469656E742E5374617274436F6C6F720708636C53696C766572214672616D652E4F7574657242727573682E4772616469656E742E56697369626C65090B4672616D652E57696474680204194F74686572536C6963652E4C6567656E642E56697369626C65080000000E4368617274456C65766174696F6E033B010A5365726965734461746101010C0401000020496E686572697465644E616D653D22546672785365726965734974656D32222044617461547970653D2264744442446174612220446174615365743D226461646F732220446174615365744E616D653D226461646F732220536F72744F726465723D22736F417363656E64696E672220546F704E3D2230222058547970653D227874546578742220536F75726365313D226461646F732E262333343B6E6F6D65262333343B2220536F75726365323D226461646F732E262333343B71746465262333343B222058536F757263653D226461646F732E262333343B6E6F6D65262333343B222059536F757263653D226461646F732E262333343B71746465262333343B220000"/>
    </TfrxPageHeader>
    <TfrxPageFooter Name="PageFooter2" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="22,67718" Left="0" Top="1035,59122" Width="718,1107">
      <TfrxMemoView Name="Memo10" Align="baWidth" Left="0" Top="3,77953" Width="718,1107" Height="15,11812" Font.Charset="1" Font.Color="0" Font.Height="-9" Font.Name="Arial" Font.Style="0" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="unionsystem sistemas - www.unionsystem.com.br"/>
    </TfrxPageFooter>
  </TfrxReportPage>
</TfrxReport>
