<?xml version="1.0" encoding="utf-8" standalone="no"?>
<TfrxReport Version="4.8.27" DotMatrixReport="False" EngineOptions.MaxMemSize="20" EngineOptions.SilentMode="True" EngineOptions.NewSilentMode="simSilent" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="40602,6690597801" ReportOptions.Description.Text="" ReportOptions.LastChange="42523,7374394097" ScriptLanguage="PascalScript" ScriptText.Text="{&#13;&#10;========================================================================                                                                          &#13;&#10;Relatório Padrão Simples&#13;&#10;&#13;&#10;  Não exclua os Objetos das Bands: &#34;TituloRelatorio&#34; (Filtros = opcional),   &#13;&#10;  &#34;Rodape Pagina&#34; e nem os bjs &#34;QPrincipal&#34; e &#34;QEmpresa&#34;.&#13;&#10;  Use a QPrincipal para o SQL principal, pois a checagem abaixo é para&#13;&#10;  verificar se há registros na mesma.&#13;&#10;  O cabeçalho já esta pronto, não esqueça de alterar o objeto &#34;Título&#34; &#13;&#10;  e/ou &#34;Referencia&#34; (opcional) e de alimentar a variavel  &#34;CodEmpresa&#34; &#13;&#10;  (pelo programa) para que o nome da empresa seja mostrado e tbm a &#13;&#10;  variável &#34;Filtros&#34; (opcional, mas lembre-se de passar por aspas os &#13;&#10;  valores do filtro)&#13;&#10;  Procure passar todos os valores para o filtros do SQL (cláusula WHERE)&#13;&#10;  por variavéis (componente TfrxVariables) pelo programa.&#13;&#10;  Mantenha os objetos alinhados sem deixar espeços entre eles (sujestão.:&#13;&#10;  use propriedade Align)                                                            &#13;&#10;&#13;&#10;&#13;&#10;  por Jaime P.Jr em 15/04/2013&#13;&#10;========================================================================}&#13;&#10;  var Aux:string;  &#13;&#10;  &#13;&#10;begin&#13;&#10;{//testes&#13;&#10;  Set('RelReferencia','''????''');&#13;&#10;  Set('CodEmpresa','1');                                                  &#13;&#10;}    &#13;&#10;{Checagem de dados - Não remova as linhas abaixo}                                                &#13;&#10;  QPrincipal.Open;&#13;&#10;                    &#13;&#10;  if QPrincipal.IsEmpty then&#13;&#10;  begin              &#13;&#10;    CreateError('Não exitem registros para os filtros selecionados.');&#13;&#10;  end;&#13;&#10;      &#13;&#10;  if &#60;OrderBy&#62;&#60;&#62;3 then&#13;&#10;  begin&#13;&#10;     Aux:=Aux+'Ordem: ';                         &#13;&#10;        &#13;&#10;     if &#60;OrderBy&#62;=0 then&#13;&#10;        Aux:=Aux+'Descrição';&#13;&#10;     if &#60;OrderBy&#62;=1 then&#13;&#10;        Aux:=Aux+'Cod. Barras';                              &#13;&#10;  end;&#13;&#10;&#13;&#10;  if &#60;Situacao&#62;&#60;&#62;3 then&#13;&#10;  begin&#13;&#10;     Aux:=Aux+' - Situação: ';                         &#13;&#10;        &#13;&#10;     if &#60;Situacao&#62;=0 then&#13;&#10;        Aux:=Aux+'Ativos';&#13;&#10;     if &#60;Situacao&#62;=1 then&#13;&#10;        Aux:=Aux+'Inativos';&#13;&#10;     if &#60;Situacao&#62;=2 then&#13;&#10;        Aux:=Aux+'Todos';            &#13;&#10;  end;&#13;&#10;&#13;&#10;  Set('Filtros',''''+Aux+'''');      &#13;&#10;     &#13;&#10;{fim}&#13;&#10;&#13;&#10;  &#13;&#10;end." StoreInDFM="False" PropData="044C65667403D80203546F7002100844617461736574730101062A20446174615365743D2251456D70726573612220446174615365744E616D653D2251456D7072657361220001062E20446174615365743D22515072696E636970616C2220446174615365744E616D653D22515072696E636970616C220000095661726961626C65730101061C204E616D653D22436F64456D7072657361222056616C75653D2231220001061A204E616D653D2246696C74726F73222056616C75653D2227272200010624204E616D653D2252656C5265666572656E636961222056616C75653D22273248303027220001061A204E616D653D22536974756163616F222056616C75653D22312200010619204E616D653D224F726465724279222056616C75653D2230220000055374796C650100">
  <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000">
    <TfrxADOQuery Name="QPrincipal" UserName="QPrincipal" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="declare @Situacao int = :Situacao,&#13;&#10;        @OrderBy  int = :OrderBy        &#13;&#10;        &#13;&#10;        &#13;&#10;        &#13;&#10;        &#13;&#10;Select ITE_CODIGO, CBR_CODBAR,ITE_DESCRI, ITE_ATIVO_, ITE_REFERE,ITE_CSTRIB,  ITE_UNIDAD, ITE_NFENCM, 'NCM em Branco' as ALERTA  &#13;&#10;from cadite &#13;&#10;left join cadcbr on cbr_codite = ITE_CODIGO&#13;&#10;where ITE_NFENCM = '' and  	         &#13;&#10;     (@Situacao = ITE_ATIVO_) 	     &#13;&#10;UNION &#13;&#10;select ITE_CODIGO, CBR_CODBAR, ITE_DESCRI,ITE_ATIVO_, ITE_REFERE,ITE_CSTRIB,  ITE_UNIDAD, ITE_NFENCM, 'NCM Inválido' as ALERTA  from cadite &#13;&#10;left join cadcbr on cbr_codite = ITE_CODIGO&#13;&#10;where ITE_NFENCM  not in (select IBP_N_C_M_ from tabela_ibpt)&#13;&#10;     and (ITE_ATIVO_=@Situacao)	&#13;&#10;UNION &#13;&#10;select ITE_CODIGO, CBR_CODBAR,ITE_DESCRI, ITE_ATIVO_, ITE_REFERE, ITE_CSTRIB, ITE_UNIDAD, ITE_NFENCM, 'Unidade em Branco' as ALERTA  from cadite &#13;&#10;left join cadcbr on cbr_codite = ITE_CODIGO&#13;&#10;where ITE_UNIDAD = ''&#13;&#10;     and (ITE_ATIVO_=@Situacao)   &#13;&#10;UNION &#13;&#10;select ITE_CODIGO, CBR_CODBAR, ITE_DESCRI,ITE_ATIVO_, ITE_REFERE,ITE_CSTRIB,  ITE_UNIDAD, ITE_NFENCM, 'CST/CSOSN em Branco' as ALERTA  from cadite &#13;&#10;left join cadcbr on cbr_codite = ITE_CODIGO&#13;&#10;where ITE_CSTRIB is null&#13;&#10;     and (ITE_ATIVO_=@Situacao)    	&#13;&#10;UNION &#13;&#10;select ITE_CODIGO, CBR_CODBAR, ITE_DESCRI,ITE_ATIVO_, ITE_REFERE,ITE_CSTRIB,  ITE_UNIDAD, ITE_NFENCM, 'CST/CSOSN Inválido' as ALERTA  from cadite &#13;&#10;left join cadcbr on cbr_codite = ITE_CODIGO&#13;&#10;where ITE_CSTRIB not IN  ('000','040','041','050','051', '400', '300', '060', '500', '101', '102', '103', '010', '020', '070', '090')&#13;&#10;     and (ITE_ATIVO_=@Situacao)  	&#13;&#10;    &#13;&#10;ORDER BY 3&#13;&#10;        " CommandTimeout="1800" LockType="ltReadOnly" PropData="05704C65667402200470546F70021C0A506172616D657465727301010646204E616D653D22536974756163616F222044617461547970653D226674496E7465676572222045787072657373696F6E3D22262336303B536974756163616F262336323B202200010643204E616D653D224F726465724279222044617461547970653D226674496E7465676572222045787072657373696F6E3D22262336303B4F726465726279262336323B220000"/>
    <TfrxADOQuery Name="QEmpresa" UserName="QEmpresa" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="select emp_nomemp &#13;&#10;from cademp &#13;&#10;where EMP_CODIGO=:CodEmpresa" CommandTimeout="1800" LockType="ltReadOnly" PropData="05704C656674025C0470546F70021C0A506172616D657465727301010649204E616D653D22436F64456D7072657361222044617461547970653D226674496E7465676572222045787072657373696F6E3D22262336303B436F64456D7072657361262336323B220000"/>
  </TfrxDataPage>
  <TfrxReportPage Name="Relatorio1" Orientation="poLandscape" PaperWidth="297" PaperHeight="210" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
    <TfrxReportTitle Name="TituloRelatorio" Height="61,35436" Left="0" Top="16" Width="1046,92981" Stretched="True">
      <TfrxMemoView Name="Titulo" Align="baWidth" Left="0" Top="18,8976378" Width="846,61472" Height="18,89765" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-15" Font.Name="Courier New" Font.Style="1" ParentFont="False" VAlign="vaCenter" Text="Produtos com ausência de dados fiscais (NCM-CST-UNIDADE)"/>
      <TfrxMemoView Name="RelReferencia" Align="baRight" Left="846,61472" Top="19" Width="200,31509" Height="18,89765" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Courier New" Font.Style="0" HAlign="haRight" ParentFont="False" VAlign="vaCenter" Text="[IIF(&#60;RelReferencia&#62;='','','(Ref.:'+&#60;RelReferencia&#62;+')')]"/>
      <TfrxMemoView Name="NomeEmpresa" Align="baWidth" Left="0" Top="0" Width="846,61472" Height="18,89765" ShowHint="False" DataField="EMP_NOMEMP" DataSet="QEmpresa" DataSetName="QEmpresa" Font.Charset="0" Font.Color="0" Font.Height="-13" Font.Name="Courier New" Font.Style="0" ParentFont="False" Text="[QEmpresa.&#34;EMP_NOMEMP&#34;]"/>
      <TfrxMemoView Name="Emissao" Align="baRight" Left="846,61472" Top="0" Width="200,31509" Height="15,11812" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Courier New" Font.Style="0" HAlign="haRight" ParentFont="False" Text="Emissão: [DATE] [Time]"/>
      <TfrxMemoView Name="Filtros" Align="baWidth" Left="56,69295" Top="37,7953" Width="789,92177" Height="18,89765" ShowHint="False" StretchMode="smMaxHeight" Font.Charset="0" Font.Color="0" Font.Height="-11" Font.Name="Courier New" Font.Style="0" ParentFont="False" Text="[&#60;Filtros&#62;]"/>
      <TfrxMemoView Name="LblFiltros" Align="baLeft" Left="0" Top="37,7953" Width="56,69295" Height="18,89765" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Courier New" Font.Style="0" ParentFont="False" Text="Filtros:"/>
    </TfrxReportTitle>
    <TfrxReportSummary Name="ResumoRelatorio" Height="18,89765" Left="0" Top="176" Width="1046,92981">
      <TfrxMemoView Name="Memo15" Align="baWidth" Left="0" Top="0" Width="941,10297" Height="18,89765" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Courier New" Font.Style="1" Frame.Typ="4" HAlign="haRight" ParentFont="False" VAlign="vaCenter" Text="Total de Produtos:"/>
      <TfrxMemoView Name="Memo19" Align="baRight" Left="941,10297" Top="0" Width="105,82684" Height="18,89765" ShowHint="False" DataSetName="QTotais" DisplayFormat.FormatStr="%2.2f" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Courier New" Font.Style="1" Frame.Typ="4" HAlign="haRight" ParentFont="False" Text="[COUNT(MDPrincipal)]"/>
    </TfrxReportSummary>
    <TfrxPageFooter Name="RodapePagina" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Arial" Font.Style="0" Height="15,11812" Left="0" ParentFont="False" Top="216" Width="1046,92981">
      <TfrxSysMemoView Name="TotalPaginas" Align="baRight" Left="941,10297" Top="0,13385827" Width="105,82684" Height="15,11812" ShowHint="False" Font.Charset="0" Font.Color="0" Font.Height="-12" Font.Name="Courier New" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[PAGE#]/[TOTALPAGES#]"/>
    </TfrxPageFooter>
    <TfrxMasterData Name="MDPrincipal" Height="18,8976378" Left="0" Top="136" Width="1046,92981" ColumnWidth="0" ColumnGap="0" DataSet="QPrincipal" DataSetName="QPrincipal" RowCount="0">
      <TfrxMemoView Name="Memo3" Left="0" Top="0" Width="118,95021667" Height="18,89765" ShowHint="False" DataSet="QPrincipal" DataSetName="QPrincipal" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Courier New" Font.Style="0" ParentFont="False" Text="[QPrincipal.&#34;CBR_CODBAR&#34;]"/>
      <TfrxMemoView Name="Memo1" Left="121,61688333" Top="0" Width="407,55937" Height="18,89765" ShowHint="False" DataField="ite_descri" DataSet="QPrincipal" DataSetName="QPrincipal" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Courier New" Font.Style="0" ParentFont="False" Text="[QPrincipal.&#34;ite_descri&#34;]"/>
      <TfrxMemoView Name="Memo7" Left="635,41775" Top="1,33333333" Width="56,69295" Height="18,89765" ShowHint="False" DataSet="QPrincipal" DataSetName="QPrincipal" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Courier New" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="[QPrincipal.&#34;ITE_UNIDAD&#34;]"/>
      <TfrxMemoView Name="Memo9" Left="538,84292" Top="0" Width="84,26778" Height="18,89765" ShowHint="False" DataField="ITE_NFENCM" DataSet="QPrincipal" DataSetName="QPrincipal" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Courier New" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="[QPrincipal.&#34;ITE_NFENCM&#34;]"/>
      <TfrxMemoView Name="Memo12" Left="805,33333334" Top="0,66666667" Width="240,02628333" Height="18,89765" ShowHint="False" DataSet="QPrincipal" DataSetName="QPrincipal" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Courier New" Font.Style="0" ParentFont="False" Text="[QPrincipal.&#34;ALERTA&#34;]"/>
      <TfrxMemoView Name="Memo11" Left="717" Top="4,68769333" Width="81,35961667" Height="18,89765" ShowHint="False" DataSet="QPrincipal" DataSetName="QPrincipal" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Courier New" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="[QPrincipal.&#34;ITE_CSTRIB&#34;]"/>
    </TfrxMasterData>
    <TfrxPageHeader Name="PageHeader1" Height="18,89765" Left="0" Top="96" Width="1046,92981">
      <TfrxMemoView Name="Memo5" Left="0" Top="0" Width="119,61688333" Height="18,8976378" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Courier New" Font.Style="0" Frame.Typ="12" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="Código de Barras"/>
      <TfrxMemoView Name="Memo2" Left="122,00000001" Top="0" Width="405,44403333" Height="18,89765" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Courier New" Font.Style="0" Frame.Typ="12" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="Descrição"/>
      <TfrxMemoView Name="Memo8" Left="636,05813333" Top="0" Width="59,35961667" Height="18,8976378" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Courier New" Font.Style="0" Frame.Typ="12" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="Unidade"/>
      <TfrxMemoView Name="Memo4" Align="baRight" Left="810,90352667" Top="0" Width="236,02628333" Height="18,8976378" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Courier New" Font.Style="0" Frame.Typ="12" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="Alerta"/>
      <TfrxMemoView Name="Memo6" Left="720,39146667" Top="0" Width="80,69295" Height="18,8976378" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Courier New" Font.Style="0" Frame.Typ="12" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="CST/CSOSN"/>
      <TfrxMemoView Name="Memo10" Left="548,14997001" Top="0" Width="68,93444666" Height="16,8976378" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Courier New" Font.Style="0" Frame.Typ="12" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="NCM"/>
    </TfrxPageHeader>
  </TfrxReportPage>
</TfrxReport>
