object RptPedidosProveedor: TRptPedidosProveedor
  OldCreateOrder = True
  OnCreate = DataModuleCreate
  Height = 405
  Width = 447
  object DADataCabecera: TDADataSource
    DataTable = tbl_Cabecera
    Left = 264
    Top = 72
  end
  object DADataDetalles: TDADataSource
    DataTable = tbl_Detalles
    Left = 344
    Top = 72
  end
  object tbl_Cabecera: TDACDSDataTable
    RemoteUpdatesOptions = []
    Fields = <>
    Params = <>
    MasterMappingMode = mmDataRequest
    LogChanges = False
    StreamingOptions = [soDisableEventsWhileStreaming]
    RemoteFetchEnabled = False
    SchemaCall.Params = <>
    DataRequestCall.Params = <>
    DataUpdateCall.Params = <>
    ScriptCall.Params = <>
    ReadOnly = False
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    IndexDefs = <>
    Left = 264
    Top = 128
  end
  object tbl_Detalles: TDACDSDataTable
    RemoteUpdatesOptions = []
    Fields = <>
    Params = <>
    MasterMappingMode = mmDataRequest
    LogChanges = False
    StreamingOptions = [soDisableEventsWhileStreaming]
    RemoteFetchEnabled = False
    SchemaCall.Params = <>
    DataRequestCall.Params = <>
    DataUpdateCall.Params = <>
    ScriptCall.Params = <>
    ReadOnly = False
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    IndexDefs = <>
    Left = 344
    Top = 128
  end
  object DABINAdapter: TDABINAdapter
    Left = 48
    Top = 80
  end
  object frxRichObject1: TfrxRichObject
    Left = 48
    Top = 296
  end
  object frxBarCodeObject1: TfrxBarCodeObject
    Left = 144
    Top = 296
  end
  object frxOLEObject1: TfrxOLEObject
    Left = 48
    Top = 344
  end
  object frxCrossObject1: TfrxCrossObject
    Left = 144
    Top = 344
  end
  object frxCheckBoxObject1: TfrxCheckBoxObject
    Left = 256
    Top = 296
  end
  object frxGradientObject1: TfrxGradientObject
    Left = 360
    Top = 296
  end
  object frxChartObject1: TfrxChartObject
    Left = 256
    Top = 344
  end
  object schReport: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = DataDictionary
    Datasets = <
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = '33'
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR'
            SQL = 
              'SELECT'#10'  V_PEDIDOS_PROVEEDOR.ID,'#10'  V_PEDIDOS_PROVEEDOR.ID_EMPRES' +
              'A,'#10'  V_PEDIDOS_PROVEEDOR.REFERENCIA,'#10'  V_PEDIDOS_PROVEEDOR.FECHA' +
              '_PEDIDO,'#10'  V_PEDIDOS_PROVEEDOR.OBSERVACIONES,'#10'  V_PROVEEDORES.NO' +
              'MBRE,'#10'  V_PROVEEDORES.FAX,'#10'  ALMACENES.NOMBRE AS NOMBRE_ALMACEN,' +
              #10#10'  CASE WHEN (ALMACENES.ID > 0)'#10'            THEN ALMACENES.CALL' +
              'E'#10'            ELSE V_PEDIDOS_PROVEEDOR.CALLE'#10'  END as CALLE,'#10#10'  ' +
              'CASE WHEN (ALMACENES.ID > 0)'#10'            THEN ALMACENES.POBLACIO' +
              'N'#10'            ELSE V_PEDIDOS_PROVEEDOR.POBLACION'#10'  END as POBLAC' +
              'ION,'#10#10'  CASE WHEN (ALMACENES.ID > 0)'#10'            THEN ALMACENES.' +
              'PROVINCIA'#10'            ELSE V_PEDIDOS_PROVEEDOR.PROVINCIA'#10'  END a' +
              's PROVINCIA,'#10#10'  CASE WHEN (ALMACENES.ID > 0)'#10'            THEN AL' +
              'MACENES.CODIGO_POSTAL'#10'            ELSE V_PEDIDOS_PROVEEDOR.CODIG' +
              'O_POSTAL'#10'  END as CODIGO_POSTAL,'#10#10'  CASE WHEN (ALMACENES.ID > 0)' +
              #10'            THEN ALMACENES.PERSONA_CONTACTO'#10'            ELSE V_' +
              'PEDIDOS_PROVEEDOR.PERSONA_CONTACTO'#10'  END as PERSONA_CONTACTO,'#10#10' ' +
              ' CASE WHEN (ALMACENES.ID > 0)'#10'            THEN ALMACENES.TELEFON' +
              'O'#10'            ELSE V_PEDIDOS_PROVEEDOR.TELEFONO'#10'  END as TELEFON' +
              'O,'#10#10'  EMPRESAS.NIF_CIF AS NIF_CIF_EMPRESA,'#10'  EMPRESAS.NOMBRE AS ' +
              'NOMBRE_EMPRESA,'#10'  EMPRESAS.RAZON_SOCIAL AS RAZON_SOCIAL_EMPRESA,' +
              #10'  EMPRESAS.TELEFONO_1 AS TELEFONO_1_EMPRESA,'#10'  EMPRESAS.FAX AS ' +
              'FAX_EMPRESA,'#10'  EMPRESAS.MOVIL_1 AS MOVIL_1_EMPRESA,'#10'  EMPRESAS.E' +
              'MAIL_1 AS EMAIL_1_EMPRESA,'#10'  EMPRESAS.PAGINA_WEB AS PAGINA_WEB_E' +
              'MPRESA'#10'FROM'#10'  V_PEDIDOS_PROVEEDOR'#10'  LEFT OUTER JOIN V_PROVEEDORE' +
              'S ON (V_PROVEEDORES.ID = V_PEDIDOS_PROVEEDOR.ID_PROVEEDOR)'#10'  LEF' +
              'T OUTER JOIN ALMACENES ON (ALMACENES.ID = V_PEDIDOS_PROVEEDOR.ID' +
              '_ALMACEN)'#10'  LEFT OUTER JOIN EMPRESAS ON (EMPRESAS.ID = V_PEDIDOS' +
              '_PROVEEDOR.ID_EMPRESA)'#10'WHERE V_PEDIDOS_PROVEEDOR.ID = :ID'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'CODIGO_POSTAL'
                TableField = 'CODIGO_POSTAL'
              end
              item
                DatasetField = 'FECHA_PEDIDO'
                TableField = 'FECHA_PEDIDO'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'PERSONA_CONTACTO'
                TableField = 'PERSONA_CONTACTO'
              end
              item
                DatasetField = 'TELEFONO'
                TableField = 'TELEFONO'
              end
              item
                DatasetField = 'NOMBRE_EMPRESA'
                TableField = 'NOMBRE_EMPRESA'
              end
              item
                DatasetField = 'NIF_CIF_EMPRESA'
                TableField = 'NIF_CIF_EMPRESA'
              end
              item
                DatasetField = 'RAZON_SOCIAL_EMPRESA'
                TableField = 'RAZON_SOCIAL_EMPRESA'
              end
              item
                DatasetField = 'TELEFONO_1_EMPRESA'
                TableField = 'TELEFONO_1_EMPRESA'
              end
              item
                DatasetField = 'FAX_EMPRESA'
                TableField = 'FAX_EMPRESA'
              end
              item
                DatasetField = 'MOVIL_1_EMPRESA'
                TableField = 'MOVIL_1_EMPRESA'
              end
              item
                DatasetField = 'EMAIL_1_EMPRESA'
                TableField = 'EMAIL_1_EMPRESA'
              end
              item
                DatasetField = 'PAGINA_WEB_EMPRESA'
                TableField = 'PAGINA_WEB_EMPRESA'
              end
              item
                DatasetField = 'NOMBRE_ALMACEN'
                TableField = 'NOMBRE_ALMACEN'
              end
              item
                DatasetField = 'FAX'
                TableField = 'FAX'
              end>
          end>
        Name = 'Informe_Cabecera'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_PEDIDO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FAX'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PERSONA_CONTACTO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TELEFONO'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_ALMACEN'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NIF_CIF_EMPRESA'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_EMPRESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'RAZON_SOCIAL_EMPRESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TELEFONO_1_EMPRESA'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FAX_EMPRESA'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'MOVIL_1_EMPRESA'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'EMAIL_1_EMPRESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PAGINA_WEB_EMPRESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID_PEDIDO'
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR_DETALLES'
            SQL = 
              'SELECT PEDIDOS_PROVEEDOR_DETALLES.ID, PEDIDOS_PROVEEDOR_DETALLES' +
              '.ID_PEDIDO,'#10'       PEDIDOS_PROVEEDOR_DETALLES.POSICION, PEDIDOS_' +
              'PROVEEDOR_DETALLES.TIPO_DETALLE,'#10'       PEDIDOS_PROVEEDOR_DETALL' +
              'ES.CONCEPTO, PEDIDOS_PROVEEDOR_DETALLES.CANTIDAD,'#10'       PEDIDOS' +
              '_PROVEEDOR_DETALLES.IMPORTE_UNIDAD, PEDIDOS_PROVEEDOR_DETALLES.I' +
              'MPORTE_TOTAL,'#10'       ARTICULOS.REFERENCIA, ARTICULOS.FAMILIA, AR' +
              'TICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR'#10#10'FROM PEDIDOS_PR' +
              'OVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ON (PEDIDOS_PROVEEDOR_DETAL' +
              'LES.ID_ARTICULO = ARTICULOS.ID)'#10'WHERE ID_PEDIDO = :ID_PEDIDO'#10'ORD' +
              'ER BY POSICION'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CANTIDAD'
                TableField = 'CANTIDAD'
              end
              item
                DatasetField = 'POSICION'
                TableField = 'POSICION'
              end
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'TIPO_DETALLE'
                TableField = 'TIPO_DETALLE'
              end
              item
                DatasetField = 'CONCEPTO'
                TableField = 'CONCEPTO'
              end
              item
                DatasetField = 'IMPORTE_UNIDAD'
                TableField = 'IMPORTE_UNIDAD'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'ID_PEDIDO'
                TableField = 'ID_PEDIDO'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'FAMILIA'
                TableField = 'FAMILIA'
              end
              item
                DatasetField = 'REFERENCIA_PROVEEDOR'
                TableField = 'REFERENCIA_PROVEEDOR'
              end>
          end>
        Name = 'Informe_Detalles'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FAMILIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end>
    Commands = <>
    RelationShips = <>
    UpdateRules = <>
    Left = 48
    Top = 16
  end
  object DataDictionary: TDADataDictionary
    Fields = <>
    Left = 46
    Top = 158
  end
  object frxReport: TfrxReport
    Version = '3.23.7'
    DotMatrixReport = False
    EngineOptions.DoublePass = True
    IniFile = '\Software\Fast Reports'
    PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
    PreviewOptions.Zoom = 1.000000000000000000
    PrintOptions.Printer = 'Por defecto'
    ReportOptions.CreateDate = 39065.872423495400000000
    ReportOptions.LastChange = 39352.784043865740000000
    ScriptLanguage = 'PascalScript'
    ScriptText.Strings = (
      ''
      'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);'
      'var'
      '  Cadena: String;'
      'begin'
      '  DatosEmpresa.Lines.Clear;'
      '  if (<frxDBCabecera."TELEFONO_1_EMPRESA"> <> '#39#39') then'
      '       Cadena := '#39'TLF: '#39' + <frxDBCabecera."TELEFONO_1_EMPRESA">;'
      '  if (<frxDBCabecera."FAX_EMPRESA"> <> '#39#39') then'
      
        '       Cadena := Cadena + '#39' FAX: '#39' + <frxDBCabecera."FAX_EMPRESA' +
        '">;'
      '  DatosEmpresa.Lines.Add(Cadena);'
      'end;'
      ''
      'procedure NombreEmpresaOnBeforePrint(Sender: TfrxComponent);'
      'begin'
      '  NombreEmpresa.Lines.Clear;'
      '  NombreEmpresa.Lines.Add(<frxDBCabecera."NOMBRE_EMPRESA">);'
      'end;'
      ''
      'procedure DireccionEnvioOnBeforePrint(Sender: TfrxComponent);'
      'var'
      '  ACadena : String;'
      'begin'
      '  ACadena := '#39#39';'
      '  DireccionEnvio.Lines.Clear;'
      ''
      '  if (<frxDBCabecera."NOMBRE_ALMACEN"> <> '#39#39') then'
      
        '       DireccionEnvio.Lines.Add(<frxDBCabecera."NOMBRE_ALMACEN">' +
        ');'
      ''
      '  if (<frxDBCabecera."PERSONA_CONTACTO"> <> '#39#39') then'
      
        '     DireccionEnvio.Lines.Add(<frxDBCabecera."PERSONA_CONTACTO">' +
        ');'
      ''
      '  DireccionEnvio.Lines.Add(<frxDBCabecera."CALLE">);'
      ''
      '  if (<frxDBCabecera."CODIGO_POSTAL"> <> '#39#39') then'
      '     ACadena := <frxDBCabecera."CODIGO_POSTAL"> + '#39' '#39';'
      '  if (<frxDBCabecera."POBLACION"> <> '#39#39') then'
      '     ACadena := ACadena + <frxDBCabecera."POBLACION">;'
      ''
      '  if (ACadena <> '#39#39') then'
      '       DireccionEnvio.Lines.Add(ACadena);'
      ''
      '  if (<frxDBCabecera."PROVINCIA"> <> '#39#39') then'
      '       DireccionEnvio.Lines.Add(<frxDBCabecera."PROVINCIA">);'
      ''
      '  if (<frxDBCabecera."TELEFONO"> <> '#39#39') then'
      '       DireccionEnvio.Lines.Add(<frxDBCabecera."TELEFONO">);'
      'end;'
      ''
      'procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);'
      'begin'
      '    if not Engine.FinalPass then'
      '     Set('#39'TotalPaginas'#39', (<TotalPaginas> + 1));'
      ''
      '  if Engine.FinalPass then'
      '     Set('#39'Pagina'#39', (<Pagina> + 1));'
      'end;'
      ''
      'procedure frxReportOnStartReport(Sender: TfrxComponent);'
      'begin'
      '  Set('#39'Pagina'#39', 0);'
      '  Set('#39'TotalPaginas'#39', 0);'
      'end;'
      ''
      'begin'
      ''
      'end.')
    ShowProgress = False
    StoreInDFM = False
    OnStartReport = 'frxReportOnStartReport'
    Left = 169
    Top = 16
    Datasets = <
      item
        DataSet = frxDBCabecera
        DataSetName = 'frxDBCabecera'
      end
      item
        DataSet = frxDBDetalles
        DataSetName = 'frxDBDetalles'
      end>
    Variables = <
      item
        Name = ' Paginacion'
        Value = Null
      end
      item
        Name = 'TotalPaginas'
        Value = Null
      end
      item
        Name = 'Pagina'
        Value = Null
      end>
    Style = <>
  end
  object frxDBCabecera: TfrxDBDataset
    UserName = 'frxDBCabecera'
    CloseDataSource = False
    DataSource = DADataCabecera
    Left = 264
    Top = 16
  end
  object frxDBDetalles: TfrxDBDataset
    UserName = 'frxDBDetalles'
    CloseDataSource = False
    DataSource = DADataDetalles
    Left = 344
    Top = 16
  end
end
