object RptComisiones: TRptComisiones
  OldCreateOrder = True
  OnCreate = DataModuleCreate
  Height = 405
  Width = 447
  object DADataCabecera: TDADataSource
    DataTable = tbl_Comisiones
    Left = 264
    Top = 72
  end
  object tbl_Comisiones: 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 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 = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_AGENTES_COMISIONES_DET_FAC'
            SQL = 
              'select'#10'       COMISIONES_LIQUIDADAS.FECHA AS FECHA_COMISION,'#10'   ' +
              '    COMISIONES_LIQUIDADAS.REFERENCIA AS REFERENCIA_COMISION,'#10'   ' +
              '    COMISIONES_LIQUIDADAS.DESCRIPCION,'#10'       COMISIONES_LIQUIDA' +
              'DAS.IMPORTE_TOTAL,'#10#10'       V_AGENTES_COMISIONES_DET_FAC.ID_EMPRE' +
              'SA, EMPRESAS.NIF_CIF as NIF_CIF_EMPRESA, COALESCE(EMPRESAS.RAZON' +
              '_SOCIAL, EMPRESAS.NOMBRE) as RAZON_SOCIAL,'#10'       EMPRESAS.CALLE' +
              ' as CALLE_EMPRESA, EMPRESAS.POBLACION as POBLACION_EMPRESA,'#10'    ' +
              '   EMPRESAS.PROVINCIA as PROVINCIA_EMPRESA, EMPRESAS.CODIGO_POST' +
              'AL as CODIGO_POSTAL_EMPRESA,'#10'       EMPRESAS.TELEFONO_1, EMPRESA' +
              'S.FAX, EMPRESAS.MOVIL_1, EMPRESAS.EMAIL_1,'#10'       EMPRESAS.PAGIN' +
              'A_WEB, EMPRESAS.REGISTRO_MERCANTIL,'#10#10'       V_AGENTES_COMISIONES' +
              '_DET_FAC.ID_AGENTE, CONTACTOS1.NOMBRE as AGENTE,'#10'       V_AGENTE' +
              'S_COMISIONES_DET_FAC.ID_FACTURA,'#10'       V_AGENTES_COMISIONES_DET' +
              '_FAC.ID_COMISION_LIQUIDADA,'#10'       V_AGENTES_COMISIONES_DET_FAC.' +
              'FECHA,'#10'       V_AGENTES_COMISIONES_DET_FAC.REFERENCIA,'#10'       V_' +
              'AGENTES_COMISIONES_DET_FAC.SITUACION,'#10'       V_AGENTES_COMISIONE' +
              'S_DET_FAC.ID_CLIENTE,'#10'       CONTACTOS2.NOMBRE as CLIENTE,'#10#10'    ' +
              '   SUM(V_AGENTES_COMISIONES_DET_FAC.IMPORTE_TOTAL) as IMPORTE_CO' +
              'MISIONABLE,'#10'       SUM(V_AGENTES_COMISIONES_DET_FAC.IMPORTE_COMI' +
              'SION) as IMPORTE_COMISION'#10#10#10'from V_AGENTES_COMISIONES_DET_FAC'#10'LE' +
              'FT JOIN COMISIONES_LIQUIDADAS ON (COMISIONES_LIQUIDADAS.ID = V_A' +
              'GENTES_COMISIONES_DET_FAC.ID_COMISION_LIQUIDADA)'#10'LEFT JOIN EMPRE' +
              'SAS ON EMPRESAS.ID = V_AGENTES_COMISIONES_DET_FAC.ID_EMPRESA'#10'LEF' +
              'T JOIN CONTACTOS CONTACTOS1 ON (CONTACTOS1.ID = V_AGENTES_COMISI' +
              'ONES_DET_FAC.ID_AGENTE)'#10'LEFT JOIN CONTACTOS CONTACTOS2 ON (CONTA' +
              'CTOS2.ID = V_AGENTES_COMISIONES_DET_FAC.ID_CLIENTE)'#10'LEFT JOIN CO' +
              'NTACTOS CONTACTOS3 ON (CONTACTOS3.ID = V_AGENTES_COMISIONES_DET_' +
              'FAC.ID_PROVEEDOR)'#10'WHERE (V_AGENTES_COMISIONES_DET_FAC.ID_COMISIO' +
              'N_LIQUIDADA IS NOT NULL)'#10'GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,' +
              ' 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26'#10 +
              'ORDER BY 1'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'ID_CLIENTE'
                TableField = 'ID_CLIENTE'
              end
              item
                DatasetField = 'REFERENCIA_COMISION'
                TableField = 'REFERENCIA_COMISION'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'ID_AGENTE'
                TableField = 'ID_AGENTE'
              end
              item
                DatasetField = 'AGENTE'
                TableField = 'AGENTE'
              end
              item
                DatasetField = 'ID_FACTURA'
                TableField = 'ID_FACTURA'
              end
              item
                DatasetField = 'ID_COMISION_LIQUIDADA'
                TableField = 'ID_COMISION_LIQUIDADA'
              end
              item
                DatasetField = 'FECHA'
                TableField = 'FECHA'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'CLIENTE'
                TableField = 'CLIENTE'
              end
              item
                DatasetField = 'IMPORTE_COMISIONABLE'
                TableField = 'IMPORTE_COMISIONABLE'
              end
              item
                DatasetField = 'IMPORTE_COMISION'
                TableField = 'IMPORTE_COMISION'
              end
              item
                DatasetField = 'FECHA_COMISION'
                TableField = 'FECHA_COMISION'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'NIF_CIF_EMPRESA'
                TableField = 'NIF_CIF_EMPRESA'
              end
              item
                DatasetField = 'RAZON_SOCIAL'
                TableField = 'RAZON_SOCIAL'
              end
              item
                DatasetField = 'CALLE_EMPRESA'
                TableField = 'CALLE_EMPRESA'
              end
              item
                DatasetField = 'POBLACION_EMPRESA'
                TableField = 'POBLACION_EMPRESA'
              end
              item
                DatasetField = 'PROVINCIA_EMPRESA'
                TableField = 'PROVINCIA_EMPRESA'
              end
              item
                DatasetField = 'CODIGO_POSTAL_EMPRESA'
                TableField = 'CODIGO_POSTAL_EMPRESA'
              end
              item
                DatasetField = 'TELEFONO_1'
                TableField = 'TELEFONO_1'
              end
              item
                DatasetField = 'FAX'
                TableField = 'FAX'
              end
              item
                DatasetField = 'MOVIL_1'
                TableField = 'MOVIL_1'
              end
              item
                DatasetField = 'EMAIL_1'
                TableField = 'EMAIL_1'
              end
              item
                DatasetField = 'PAGINA_WEB'
                TableField = 'PAGINA_WEB'
              end
              item
                DatasetField = 'REGISTRO_MERCANTIL'
                TableField = 'REGISTRO_MERCANTIL'
              end>
          end>
        Name = 'InformeComisiones'
        Fields = <
          item
            Name = 'FECHA_COMISION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_COMISION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            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 = 'ID_EMPRESA'
            DataType = datInteger
            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 = 'RAZON_SOCIAL'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE_EMPRESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION_EMPRESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA_EMPRESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGO_POSTAL_EMPRESA'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TELEFONO_1'
            DataType = datString
            Size = 25
            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 = 'MOVIL_1'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'EMAIL_1'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PAGINA_WEB'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REGISTRO_MERCANTIL'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_AGENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'AGENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_COMISION_LIQUIDADA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            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 = 'SITUACION'
            DataType = datString
            Size = 19
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CLIENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_COMISIONABLE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_COMISION'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_AGENTES_COMISIONES_DET_FAC'
            SQL = 
              'select'#10'       COMISIONES_LIQUIDADAS.FECHA AS FECHA_COMISION,'#10'   ' +
              '    COMISIONES_LIQUIDADAS.REFERENCIA AS REFERENCIA_COMISION,'#10'   ' +
              '    COMISIONES_LIQUIDADAS.DESCRIPCION,'#10'       COMISIONES_LIQUIDA' +
              'DAS.IMPORTE_TOTAL,'#10#10'       V_AGENTES_COMISIONES_DET_FAC.ID_EMPRE' +
              'SA, EMPRESAS.NIF_CIF as NIF_CIF_EMPRESA, COALESCE(EMPRESAS.RAZON' +
              '_SOCIAL, EMPRESAS.NOMBRE) as RAZON_SOCIAL,'#10'       EMPRESAS.CALLE' +
              ' as CALLE_EMPRESA, EMPRESAS.POBLACION as POBLACION_EMPRESA,'#10'    ' +
              '   EMPRESAS.PROVINCIA as PROVINCIA_EMPRESA, EMPRESAS.CODIGO_POST' +
              'AL as CODIGO_POSTAL_EMPRESA,'#10'       EMPRESAS.TELEFONO_1, EMPRESA' +
              'S.FAX, EMPRESAS.MOVIL_1, EMPRESAS.EMAIL_1,'#10'       EMPRESAS.PAGIN' +
              'A_WEB, EMPRESAS.REGISTRO_MERCANTIL,'#10#10'       V_AGENTES_COMISIONES' +
              '_DET_FAC.ID_AGENTE, CONTACTOS1.NOMBRE as AGENTE,'#10'       V_AGENTE' +
              'S_COMISIONES_DET_FAC.ID_FACTURA,'#10'       V_AGENTES_COMISIONES_DET' +
              '_FAC.ID_COMISION_LIQUIDADA,'#10'       V_AGENTES_COMISIONES_DET_FAC.' +
              'FECHA,'#10'       V_AGENTES_COMISIONES_DET_FAC.REFERENCIA,'#10'       V_' +
              'AGENTES_COMISIONES_DET_FAC.SITUACION,'#10'       V_AGENTES_COMISIONE' +
              'S_DET_FAC.ID_CLIENTE,'#10'       CONTACTOS2.NOMBRE as CLIENTE,'#10'     ' +
              '  V_AGENTES_COMISIONES_DET_FAC.ID_PROVEEDOR,'#10'       CONTACTOS3.N' +
              'OMBRE as PROVEEDOR,'#10'       V_AGENTES_COMISIONES_DET_FAC.COMISION' +
              ','#10#10'       SUM(V_AGENTES_COMISIONES_DET_FAC.IMPORTE_TOTAL) as IMP' +
              'ORTE_COMISIONABLE,'#10'       SUM(V_AGENTES_COMISIONES_DET_FAC.IMPOR' +
              'TE_COMISION) as IMPORTE_COMISION'#10#10#10'from V_AGENTES_COMISIONES_DET' +
              '_FAC'#10'LEFT JOIN COMISIONES_LIQUIDADAS ON (COMISIONES_LIQUIDADAS.I' +
              'D = V_AGENTES_COMISIONES_DET_FAC.ID_COMISION_LIQUIDADA)'#10'LEFT JOI' +
              'N EMPRESAS ON EMPRESAS.ID = V_AGENTES_COMISIONES_DET_FAC.ID_EMPR' +
              'ESA'#10'LEFT JOIN CONTACTOS CONTACTOS1 ON (CONTACTOS1.ID = V_AGENTES' +
              '_COMISIONES_DET_FAC.ID_AGENTE)'#10'LEFT JOIN CONTACTOS CONTACTOS2 ON' +
              ' (CONTACTOS2.ID = V_AGENTES_COMISIONES_DET_FAC.ID_CLIENTE)'#10'LEFT ' +
              'JOIN CONTACTOS CONTACTOS3 ON (CONTACTOS3.ID = V_AGENTES_COMISION' +
              'ES_DET_FAC.ID_PROVEEDOR)'#10'WHERE (V_AGENTES_COMISIONES_DET_FAC.ID_' +
              'COMISION_LIQUIDADA IS NOT NULL)'#10'GROUP BY 1, 2, 3, 4, 5, 6, 7, 8,' +
              ' 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ' +
              '25, 26, 27, 28, 29'#10'ORDER BY 1'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'ID_CLIENTE'
                TableField = 'ID_CLIENTE'
              end
              item
                DatasetField = 'REFERENCIA_COMISION'
                TableField = 'REFERENCIA_COMISION'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'ID_AGENTE'
                TableField = 'ID_AGENTE'
              end
              item
                DatasetField = 'AGENTE'
                TableField = 'AGENTE'
              end
              item
                DatasetField = 'ID_FACTURA'
                TableField = 'ID_FACTURA'
              end
              item
                DatasetField = 'ID_COMISION_LIQUIDADA'
                TableField = 'ID_COMISION_LIQUIDADA'
              end
              item
                DatasetField = 'FECHA'
                TableField = 'FECHA'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'CLIENTE'
                TableField = 'CLIENTE'
              end
              item
                DatasetField = 'ID_PROVEEDOR'
                TableField = 'ID_PROVEEDOR'
              end
              item
                DatasetField = 'PROVEEDOR'
                TableField = 'PROVEEDOR'
              end
              item
                DatasetField = 'COMISION'
                TableField = 'COMISION'
              end
              item
                DatasetField = 'IMPORTE_COMISIONABLE'
                TableField = 'IMPORTE_COMISIONABLE'
              end
              item
                DatasetField = 'IMPORTE_COMISION'
                TableField = 'IMPORTE_COMISION'
              end
              item
                DatasetField = 'FECHA_COMISION'
                TableField = 'FECHA_COMISION'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'NIF_CIF_EMPRESA'
                TableField = 'NIF_CIF_EMPRESA'
              end
              item
                DatasetField = 'RAZON_SOCIAL'
                TableField = 'RAZON_SOCIAL'
              end
              item
                DatasetField = 'CALLE_EMPRESA'
                TableField = 'CALLE_EMPRESA'
              end
              item
                DatasetField = 'POBLACION_EMPRESA'
                TableField = 'POBLACION_EMPRESA'
              end
              item
                DatasetField = 'PROVINCIA_EMPRESA'
                TableField = 'PROVINCIA_EMPRESA'
              end
              item
                DatasetField = 'CODIGO_POSTAL_EMPRESA'
                TableField = 'CODIGO_POSTAL_EMPRESA'
              end
              item
                DatasetField = 'TELEFONO_1'
                TableField = 'TELEFONO_1'
              end
              item
                DatasetField = 'FAX'
                TableField = 'FAX'
              end
              item
                DatasetField = 'MOVIL_1'
                TableField = 'MOVIL_1'
              end
              item
                DatasetField = 'EMAIL_1'
                TableField = 'EMAIL_1'
              end
              item
                DatasetField = 'PAGINA_WEB'
                TableField = 'PAGINA_WEB'
              end
              item
                DatasetField = 'REGISTRO_MERCANTIL'
                TableField = 'REGISTRO_MERCANTIL'
              end>
          end>
        Name = 'InformeComisionesDesglosado'
        Fields = <
          item
            Name = 'FECHA_COMISION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_COMISION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            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 = 'ID_EMPRESA'
            DataType = datInteger
            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 = 'RAZON_SOCIAL'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE_EMPRESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION_EMPRESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA_EMPRESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGO_POSTAL_EMPRESA'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TELEFONO_1'
            DataType = datString
            Size = 25
            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 = 'MOVIL_1'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'EMAIL_1'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PAGINA_WEB'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REGISTRO_MERCANTIL'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_AGENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'AGENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_COMISION_LIQUIDADA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            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 = 'SITUACION'
            DataType = datString
            Size = 19
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CLIENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'COMISION'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_COMISIONABLE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_COMISION'
            DataType = datFloat
            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 = <
      item
        Name = 'FacturasCliente_ID'
        DataType = datAutoInc
        BlobType = dabtUnknown
        Required = True
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_ID_EMPRESA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_EMPRESA'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_ID_CONTRATO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_CONTRATO'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_FECHA_FACTURA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Fecha de las factura'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_VENCIMIENTO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Vencimiento'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_SITUACION'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Situaci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_BASE_IMPONIBLE'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Base imponible'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_IMPORTE_DESCUENTO'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe dto.'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_IMPORTE_IVA'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe IVA'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_IMPORTE_TOTAL'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe total'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_FORMA_PAGO'
        DataType = datMemo
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Forma de pago'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_ID_CLIENTE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_CLIENTE'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_NIF_CIF'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'NIF/CIF'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_CODIGO_POSTAL'
        DataType = datString
        Size = 10
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'C'#243'd. postal'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_FECHA_ALTA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_ALTA'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_FECHA_MODIFICACION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_MODIFICACION'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_OBSERVACIONES'
        DataType = datMemo
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Observaciones'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_NOMBRE'
        DataType = datString
        Size = 100
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Cliente'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_CALLE'
        DataType = datString
        Size = 150
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Direcci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_PROVINCIA'
        DataType = datString
        Size = 30
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Provincia'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_POBLACION'
        DataType = datString
        Size = 150
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Poblaci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_IVA'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'IVA'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_USUARIO'
        DataType = datString
        Size = 100
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'USUARIO'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_REFERENCIA'
        DataType = datString
        Size = 20
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Referencia'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_DESCUENTO'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Dto.'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_ID'
        DataType = datAutoInc
        BlobType = dabtUnknown
        Required = True
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_ID_FACTURA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_FACTURA'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_TIPO_DETALLE'
        DataType = datString
        Size = 10
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Tipo detalle'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_CONCEPTO'
        DataType = datString
        Size = 2000
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Concepto'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_IMPORTE_UNIDAD'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe unidad'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_Detalles_IMPORTE_TOTAL'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe total'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_Detalles_VISIBLE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = #191'Visible?'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_POSICION'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Posici'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_CANTIDAD'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Cantidad'
        Alignment = taLeftJustify
      end>
    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.OutlineWidth = 180
    PreviewOptions.Zoom = 1.000000000000000000
    PrintOptions.Printer = 'Default'
    ReportOptions.CreateDate = 37871.995398692100000000
    ReportOptions.LastChange = 39266.688905347220000000
    ReportOptions.VersionBuild = '1'
    ReportOptions.VersionMajor = '12'
    ReportOptions.VersionMinor = '13'
    ReportOptions.VersionRelease = '1'
    ScriptLanguage = 'PascalScript'
    ScriptText.Strings = (
      'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);'
      'var'
      '  Cadena: String;'
      'begin'
      '  DatosEmpresa.Lines.Clear;'
      '  DatosEmpresa.Lines.Add(<frxDBCabecera."RAZON_SOCIAL">);'
      '  DatosEmpresa.Lines.Add(<frxDBCabecera."CALLE_EMPRESA">);'
      ''
      '  Cadena := '#39#39';'
      '  if (<frxDBCabecera."TELEFONO_1"> <> '#39#39') then'
      '       Cadena := '#39'TLF: '#39' + <frxDBCabecera."TELEFONO_1">;'
      '  if (<frxDBCabecera."FAX"> <> '#39#39') then'
      '       Cadena := Cadena + '#39' FAX: '#39' + <frxDBCabecera."FAX">;'
      '  DatosEmpresa.Lines.Add(Cadena);'
      ''
      '  Cadena := '#39#39';'
      '  if (<frxDBCabecera."CODIGO_POSTAL_EMPRESA"> <> '#39#39') then'
      '       Cadena := <frxDBCabecera."CODIGO_POSTAL_EMPRESA">;'
      '  if (<frxDBCabecera."POBLACION_EMPRESA"> <> '#39#39') then'
      
        '       Cadena := Cadena + '#39' '#39' + <frxDBCabecera."POBLACION_EMPRES' +
        'A">;'
      '  if (<frxDBCabecera."PROVINCIA_EMPRESA"> <> '#39#39') then'
      
        '       Cadena := Cadena + '#39' - '#39' + <frxDBCabecera."PROVINCIA_EMPR' +
        'ESA">;'
      '  DatosEmpresa.Lines.Add(Cadena);'
      'end;'
      ''
      'procedure Memo26OnBeforePrint(Sender: TfrxComponent);'
      'begin'
      '  if (<FechaIni> <> '#39#39') then'
      '     Memo31.Visible := True'
      '  else'
      '     Memo31.Visible := False;'
      'end;'
      ''
      'BEGIN'
      ''
      'END.')
    ShowProgress = False
    StoreInDFM = False
    Left = 169
    Top = 16
    Datasets = <
      item
        DataSet = frxDBCabecera
        DataSetName = 'frxDBCabecera'
      end>
    Variables = <
      item
        Name = ' Fechas'
        Value = Null
      end
      item
        Name = 'FechaIni'
        Value = Null
      end
      item
        Name = 'FechaFin'
        Value = Null
      end>
    Style = <
      item
        Name = 'Concepto normal'
        Color = clNone
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -12
        Font.Name = 'Tahoma'
        Font.Style = []
      end
      item
        Name = 'Concepto subtotal'
        Color = clNone
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -12
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
      end
      item
        Name = 'Cabecera de columna'
        Color = 15790320
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -12
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
      end
      item
        Name = 'Concepto titulo'
        Color = clNone
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
      end>
  end
  object frxDBCabecera: TfrxDBDataset
    UserName = 'frxDBCabecera'
    CloseDataSource = False
    DataSource = DADataCabecera
    Left = 264
    Top = 16
  end
end
