object RptWordAlbaranCliente: TRptWordAlbaranCliente
  OldCreateOrder = False
  Height = 262
  Width = 374
  object schReport: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = DataDictionary
    Datasets = <
      item
        Params = <
          item
            Name = 'ID'
            Value = '2'
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            SQL = 
              'SELECT'#10'  V_ALBARANES_CLIENTE.ID, V_ALBARANES_CLIENTE.ID_EMPRESA,' +
              #10'  V_ALBARANES_CLIENTE.ID_CLIENTE,'#10'  V_ALBARANES_CLIENTE.FECHA_A' +
              'LBARAN,'#10'  V_ALBARANES_CLIENTE.REFERENCIA,'#10'  V_ALBARANES_CLIENTE.' +
              'REFERENCIA_CLIENTE,'#10'  V_ALBARANES_CLIENTE.ID_PEDIDO,'#10'  V_ALBARAN' +
              'ES_CLIENTE.REF_PEDIDO,'#10'  V_ALBARANES_CLIENTE.OBSERVACIONES,'#10'  V_' +
              'ALBARANES_CLIENTE.IMPORTE_TOTAL,'#10'  V_CLIENTES.NIF_CIF, V_CLIENTE' +
              'S.NOMBRE,'#10'  V_CLIENTES.PERSONA_CONTACTO, V_CLIENTES.CALLE, V_CLI' +
              'ENTES.POBLACION,'#10'  V_CLIENTES.PROVINCIA, V_CLIENTES.CODIGO_POSTA' +
              'L'#10'FROM'#10'  V_ALBARANES_CLIENTE'#10'  INNER JOIN V_CLIENTES ON (V_CLIEN' +
              'TES.ID = V_ALBARANES_CLIENTE.ID_CLIENTE)'#10'WHERE V_ALBARANES_CLIEN' +
              'TE.ID = :ID'#10#10
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'ID_CLIENTE'
                TableField = 'ID_CLIENTE'
              end
              item
                DatasetField = 'REFERENCIA_CLIENTE'
                TableField = 'REFERENCIA_CLIENTE'
              end
              item
                DatasetField = 'NIF_CIF'
                TableField = 'NIF_CIF'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'PERSONA_CONTACTO'
                TableField = 'PERSONA_CONTACTO'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'CODIGO_POSTAL'
                TableField = 'CODIGO_POSTAL'
              end
              item
                DatasetField = 'FECHA_ALBARAN'
                TableField = 'FECHA_ALBARAN'
              end
              item
                DatasetField = 'ID_PEDIDO'
                TableField = 'ID_PEDIDO'
              end
              item
                DatasetField = 'REF_PEDIDO'
                TableField = 'REF_PEDIDO'
              end>
          end>
        Name = 'Informe_Cabecera'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            Required = True
            InPrimaryKey = True
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
          end
          item
            Name = 'ID_CLIENTE'
            DataType = datInteger
          end
          item
            Name = 'FECHA_ALBARAN'
            DataType = datDateTime
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
          end
          item
            Name = 'REFERENCIA_CLIENTE'
            DataType = datString
            Size = 255
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
          end
          item
            Name = 'REF_PEDIDO'
            DataType = datString
            Size = 255
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
          end
          item
            Name = 'NIF_CIF'
            DataType = datString
            Size = 15
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 255
          end
          item
            Name = 'PERSONA_CONTACTO'
            DataType = datString
            Size = 255
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
          end>
        ReadOnly = True
      end
      item
        Params = <
          item
            Name = 'ID_ALBARAN'
            Value = '2'
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            ConnectionType = 'Interbase'
            Default = True
            SQL = 
              'SELECT ALBARANES_CLIENTE_DETALLES.ID, ALBARANES_CLIENTE_DETALLES' +
              '.ID_ALBARAN,'#10'       ALBARANES_CLIENTE_DETALLES.POSICION, ALBARAN' +
              'ES_CLIENTE_DETALLES.TIPO_DETALLE,'#10'       F_RTFTOTEXT(ALBARANES_C' +
              'LIENTE_DETALLES.CONCEPTO) as CONCEPTO, ALBARANES_CLIENTE_DETALLE' +
              'S.CANTIDAD,'#10'       ALBARANES_CLIENTE_DETALLES.UNIDAD_MEDIDA,'#10'   ' +
              '    ALBARANES_CLIENTE_DETALLES.IMPORTE_UNIDAD, ALBARANES_CLIENTE' +
              '_DETALLES.IMPORTE_TOTAL,'#10'       ARTICULOS.REFERENCIA'#10'FROM ALBARA' +
              'NES_CLIENTE_DETALLES'#10'     LEFT JOIN ARTICULOS ON (ALBARANES_CLIE' +
              'NTE_DETALLES.ID_ARTICULO = ARTICULOS.ID)'#10'  WHERE {Where}'#10'    AND' +
              ' (VISIBLE) <> 0'#10'    AND (ID_ALBARAN = :ID_ALBARAN)'#10'  ORDER BY ID' +
              '_ALBARAN, POSICION'#10
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_ALBARAN'
                TableField = 'ID_ALBARAN'
              end
              item
                DatasetField = 'POSICION'
                TableField = 'POSICION'
              end
              item
                DatasetField = 'TIPO_DETALLE'
                TableField = 'TIPO_DETALLE'
              end
              item
                DatasetField = 'CONCEPTO'
                TableField = 'CONCEPTO'
              end
              item
                DatasetField = 'CANTIDAD'
                TableField = 'CANTIDAD'
              end
              item
                DatasetField = 'UNIDAD_MEDIDA'
                TableField = 'UNIDAD_MEDIDA'
              end
              item
                DatasetField = 'IMPORTE_UNIDAD'
                TableField = 'IMPORTE_UNIDAD'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end>
          end>
        Name = 'Informe_Detalles'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            InPrimaryKey = True
          end
          item
            Name = 'ID_ALBARAN'
            DataType = datInteger
          end
          item
            Name = 'POSICION'
            DataType = datInteger
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 25
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 254
          end
          item
            Name = 'CANTIDAD'
            DataType = datInteger
          end
          item
            Name = 'UNIDAD_MEDIDA'
            DataType = datString
            Size = 255
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datCurrency
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
          end>
        ReadOnly = True
      end>
    JoinDataTables = <>
    UnionDataTables = <>
    Commands = <>
    RelationShips = <>
    UpdateRules = <>
    Version = 0
    Left = 48
    Top = 16
  end
  object DataDictionary: TDADataDictionary
    Fields = <>
    Left = 46
    Top = 142
  end
  object DABin2DataStreamer: TDABin2DataStreamer
    Left = 48
    Top = 80
  end
  object tbl_Cabecera: TDAMemDataTable
    RemoteUpdatesOptions = []
    Fields = <
      item
        Name = 'ID'
        DataType = datInteger
        Required = True
        InPrimaryKey = True
      end
      item
        Name = 'ID_EMPRESA'
        DataType = datInteger
      end
      item
        Name = 'ID_CLIENTE'
        DataType = datInteger
      end
      item
        Name = 'FECHA_ALBARAN'
        DataType = datDateTime
      end
      item
        Name = 'REFERENCIA'
        DataType = datString
        Size = 255
      end
      item
        Name = 'REFERENCIA_CLIENTE'
        DataType = datString
        Size = 255
      end
      item
        Name = 'ID_PEDIDO'
        DataType = datInteger
      end
      item
        Name = 'REF_PEDIDO'
        DataType = datString
        Size = 255
      end
      item
        Name = 'OBSERVACIONES'
        DataType = datMemo
      end
      item
        Name = 'IMPORTE_TOTAL'
        DataType = datCurrency
      end
      item
        Name = 'NIF_CIF'
        DataType = datString
        Size = 15
      end
      item
        Name = 'NOMBRE'
        DataType = datString
        Size = 255
      end
      item
        Name = 'PERSONA_CONTACTO'
        DataType = datString
        Size = 255
      end
      item
        Name = 'CALLE'
        DataType = datString
        Size = 255
      end
      item
        Name = 'POBLACION'
        DataType = datString
        Size = 255
      end
      item
        Name = 'PROVINCIA'
        DataType = datString
        Size = 255
      end
      item
        Name = 'CODIGO_POSTAL'
        DataType = datString
        Size = 10
      end>
    Params = <
      item
        Name = 'ID'
        Value = '2'
        ParamType = daptInput
      end>
    LogChanges = False
    StreamingOptions = [soDisableEventsWhileStreaming]
    RemoteFetchEnabled = False
    LocalSchema = schReport
    LocalDataStreamer = DABin2DataStreamer
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    LogicalName = 'Informe_Cabecera'
    IndexDefs = <>
    Left = 168
    Top = 16
  end
  object tbl_Detalles: TDAMemDataTable
    RemoteUpdatesOptions = []
    Fields = <
      item
        Name = 'ID'
        DataType = datInteger
        InPrimaryKey = True
      end
      item
        Name = 'ID_ALBARAN'
        DataType = datInteger
      end
      item
        Name = 'POSICION'
        DataType = datInteger
      end
      item
        Name = 'TIPO_DETALLE'
        DataType = datString
        Size = 25
      end
      item
        Name = 'CONCEPTO'
        DataType = datString
        Size = 254
      end
      item
        Name = 'CANTIDAD'
        DataType = datInteger
      end
      item
        Name = 'UNIDAD_MEDIDA'
        DataType = datString
        Size = 255
      end
      item
        Name = 'IMPORTE_UNIDAD'
        DataType = datCurrency
      end
      item
        Name = 'IMPORTE_TOTAL'
        DataType = datCurrency
      end
      item
        Name = 'REFERENCIA'
        DataType = datString
        Size = 255
      end>
    Params = <
      item
        Name = 'ID_ALBARAN'
        Value = '2'
        ParamType = daptInput
      end>
    MasterParamsMappings.Strings = (
      'ID_PRESUPUESTO=ID_PRESUPUESTO')
    LogChanges = False
    StreamingOptions = [soDisableEventsWhileStreaming]
    RemoteFetchEnabled = False
    LocalSchema = schReport
    LocalDataStreamer = DABin2DataStreamer
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    LogicalName = 'Informe_Detalles'
    IndexDefs = <>
    Left = 264
    Top = 16
  end
  object tbl_Empresa: TDAMemDataTable
    RemoteUpdatesOptions = []
    Fields = <>
    Params = <
      item
        Name = 'ID'
        Value = '31'
        ParamType = daptInput
      end>
    LogChanges = False
    StreamingOptions = [soDisableEventsWhileStreaming]
    RemoteFetchEnabled = False
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    LogicalName = 'Empresa'
    IndexDefs = <>
    Left = 168
    Top = 80
  end
end
