object fmFindOrganization: TfmFilter
  Left = 305
  Top = 83
  DisableColor = clInactiveCaption
  BorderIcons = [biSystemMenu]
  BorderStyle = bsSingle
  Caption = 'Условия запроса'
  ClientHeight = 544
  ClientWidth = 594
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = [fsBold]
  OldCreateOrder = False
  Position = poScreenCenter
  OnDestroy = FormDestroy
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object pcFilter: TPageControl
    Left = 0
    Top = 0
    Width = 594
    Height = 503
    ActivePage = tsDocument
    Align = alClient
    TabOrder = 0
    OnChange = pcFilterChange
    object tsDocument: TTabSheet
      Caption = 'Документ 1'
      TabVisible = False
      object sbxDocument: TScrollBox
        Left = 0
        Top = 0
        Width = 586
        Height = 493
        Align = alClient
        TabOrder = 0
        object Label100: TLabel
          Left = 8
          Top = 8
          Width = 134
          Height = 13
          Hint = 'РАВНО'
          Caption = 'Номер законопроекта'
          ParentShowHint = False
          PopupMenu = pmFilter
          ShowHint = True
          Visible = False
          OnClick = Label100Click
        end
        object lbFl_Object_Name: TLabel
          Tag = 1
          Hint = 'РАВНО'
          Left = 8
          Top = 8
          Width = 89
          Height = 13
          Caption = 'Наименование'
          FocusControl = edFl_Object_Name
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label8: TLabel
          Tag = 1
          Left = 8
          Top = 25
          Width = 87
          Height = 26
          Caption = 'Краткое'#13#10'наименование'
          FocusControl = edSh_Object_Name
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label9: TLabel
          Tag = 1
          Left = 56
          Top = 62
          Width = 41
          Height = 13
          Caption = 'Статус'
          FocusControl = rdlcSTAT_ORG
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label10: TLabel
          Tag = 1
          Left = 56
          Top = 88
          Width = 37
          Height = 13
          Caption = 'Район'
          FocusControl = rdlcDISTRICT
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label4: TLabel
          Tag = 1
          Left = 48
          Top = 107
          Width = 56
          Height = 26
          Caption = 'Вид нас.'#13#10'пункта'
          FocusControl = rdlcPREF_TOWN
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label7: TLabel
          Tag = 1
          Left = 56
          Top = 160
          Width = 38
          Height = 13
          Caption = 'Улица'
          FocusControl = deSTREET
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label2: TLabel
          Tag = 1
          Left = 40
          Top = 187
          Width = 57
          Height = 13
          Caption = 'Эл. почта'
          FocusControl = deEMAIL
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label14: TLabel
          Tag = 1
          Left = 56
          Top = 211
          Width = 45
          Height = 13
          Caption = 'Индекс'
          FocusControl = dsPOSTINDEX
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label1: TLabel
          Tag = 1
          Left = 16
          Top = 232
          Width = 84
          Height = 13
          Caption = 'Руководитель'
          FocusControl = deLEADER
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label6: TLabel
          Tag = 1
          Left = 48
          Top = 280
          Width = 53
          Height = 13
          Caption = 'Телефон'
          FocusControl = dePHONE
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label5: TLabel
          Tag = 1
          Left = 32
          Top = 260
          Width = 68
          Height = 13
          Caption = 'Должность'
          FocusControl = deLEADER_POS
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label11: TLabel
          Tag = 1
          Left = 0
          Top = 296
          Width = 102
          Height = 26
          Caption = 'Переименовано/'#13#10'реорганизовано'
          FocusControl = rdlcREBUILD 
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label12: TLabel
          Tag = 1
          Left = 24
          Top = 328
          Width = 74
          Height = 13
          Caption = 'Примечания'
          FocusControl = edADD_REBUILD
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label13: TLabel
          Tag = 1
          Left = 8
          Top = 344
          Width = 91
          Height = 26
          Caption = 'Дата '#13#10'реорганизации'
          FocusControl = deDT_REBUILD
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label15: TLabel
          Tag = 1
          Left = 24
          Top = 376
          Width = 69
          Height = 13
          Caption = 'Документы'
          FocusControl = rdlcDOCS
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label16: TLabel
          Tag = 1
          Left = 8
          Top = 400
          Width = 99
          Height = 13
          Caption = 'Крайние даты с '
          FocusControl = deBEGIN_DATE
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label17: TLabel
          Tag = 1
          Left = 240
          Top = 400
          Width = 15
          Height = 13
          Caption = 'по'
          FocusControl = deEND_DATE
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label18: TLabel
          Tag = 1
          Left = 16
          Top = 424
          Width = 74
          Height = 13
          Caption = 'Примечания'
          FocusControl = edADD_INFO_DOCS
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
        object Label20: TLabel
          Tag = 1
          Left = 8
          Top = 136
          Width = 89
          Height = 13
          Caption = 'Наименование'#13#10'нас. пункта'
          FocusControl = rdlcTOWN
          PopupMenu = pmFilter
          OnClick = Label100Click
        end
	object Label21: TLabel
          Tag = 1
          Left = 0
          Top = 448
          Width = 74
          Height = 13
          Caption = 'Организации,'#13#10'хран. документы'
          FocusControl = rdlcCHILD_ORG
          PopupMenu = pmFilter
          OnClick = Label100Click
        end


        object rdlcDISTRICT: TRxDBLookupCombo
          Tag = 1
          Left = 104
          Top = 83
          Width = 345
          Height = 23
          Hint = 'ORGANIZATION.ID_DISTRICT'
          DropDownCount = 8
          DataField = 'DISTRICT'
          LookupField = 'ID'
          LookupDisplay = 'DISTRICT'
          LookupSource = dmDaic.dsDistrict
          TabOrder = 0
        end
        object rdlcSTAT_ORG: TRxDBLookupCombo
          Tag = 1
          Left = 104
          Top = 57
          Width = 177
          Height = 23
          Hint = 'ORGANIZATION.ID_STAT_ORG'
          DropDownCount = 8
          DataField = 'STAT_ORG'
          LookupField = 'ID'
          LookupDisplay = 'STAT_ORG'
          LookupSource = dmDaic.dsStat_org
          TabOrder = 1
        end
        object rdlcPREF_TOWN: TRxDBLookupCombo
          Tag = 1
          Left = 104
          Top = 109
          Width = 209
          Height = 23
          Hint = 'ORGANIZATION.ID_PREF_TOWN'
          DropDownCount = 8
          DataField = 'PREF_TOWN'
          LookupField = 'ID'
          LookupDisplay = 'PREF_TOWN'
          LookupSource = dmDaic.dsPref_Town
          TabOrder = 2
        end
        object rdlcTOWN: TRxDBLookupCombo
          Tag = 1
          Left = 104
          Top = 135
          Width = 393
          Height = 23
          Hint = 'ORGANIZATION.ID_TOWN'
          DropDownCount = 8
          DataField = 'TOWN'
          LookupField = 'ID'
          LookupDisplay = 'TOWN'
          LookupSource = dmDaic.dsTown_a
          TabOrder = 3
        end
        object edFl_Object_Name: TEdit
          Tag = 1
          Left = 104
          Top = 8
          Width = 465
          Height = 21
          Hint = 'ORGANIZATION.FL_OBJECT_NAME'
          TabOrder = 4
        end
        object edSh_Object_Name: TEdit
          Tag = 1
          Left = 104
          Top = 32
          Width = 465
          Height = 21
          Hint = 'ORGANIZATION.SH_OBJECT_NAME'
          TabOrder = 5
        end
        object deSTREET: TEdit
          Tag = 1
          Left = 104
          Top = 160
          Width = 265
          Height = 21
          Hint = 'ORGANIZATION.STREET'
          TabOrder = 6
        end
        object dsPOSTINDEX: TEdit
          Tag = 1
          Left = 104
          Top = 208
          Width = 65
          Height = 21
          Hint = 'ORGANIZATION.POSTINDEX'
          TabOrder = 7
        end
        object deEMAIL: TEdit 
          Tag = 1
          Left = 104
          Top = 184
          Width = 265
          Height = 21
          Hint = 'ORGANIZATION.EMAIL'
          TabOrder = 8
        end
        object deLEADER: TEdit 
          Tag = 1
          Left = 104
          Top = 232
          Width = 217
          Height = 21
          Hint = 'ORGANIZATION.LEADER'
          TabOrder = 9
        end
        object deLEADER_POS: TEdit
          Tag = 1
          Left = 104
          Top = 256
          Width = 121
          Height = 21
          Hint = 'ORGANIZATION.LEADER_POS'
          TabOrder = 10
        end
        object dePHONE: TEdit
          Tag = 1
          Left = 104
          Top = 280
          Width = 121
          Height = 21
          Hint = 'ORGANIZATION.PHONE'
          TabOrder = 11
        end
        object rdlcREBUILD: TRxDBLookupCombo
          Tag = 1
          Left = 104
          Top = 304
          Width = 465
          Height = 21
          Hint = 'rebuild_org.ID_REBUILD'
          DropDownCount = 8
          LookupField = 'ID'
          LookupDisplay = 'FL_OBJECT_NAME'
          LookupSource = dmDaic.dsOrganization     
          TabOrder = 12
        end
        object edADD_REBUILD: TEdit
          Tag = 1
          Left = 104
          Top = 328
          Width = 273
          Height = 21
          Hint = 'REBUILD_ORG.ADD_INFO'
          TabOrder = 13
        end
        object deDT_REBUILD: TDateEdit
          Tag = 1
          Left = 104
          Top = 352
          Width = 121
          Height = 21
          Hint = 'REBUILD_ORG.DT_REBUILD'
          NumGlyphs = 2
          TabOrder = 14
        end
        object deBEGIN_DATE: TDateEdit
          Tag = 1
          Left = 104
          Top = 400
          Width = 121
          Height = 21
          Hint = 'ORG_DOCS.BEGIN_DATE'
          NumGlyphs = 2
          TabOrder = 15
        end
        object deEND_DATE: TDateEdit
          Tag = 3        
          Left = 272
          Top = 400
          Width = 121
          Height = 21
          Hint = 'ORG_DOCS.END_DATE'
          NumGlyphs = 2
          TabOrder = 16
        end
        object rdlcDOCS: TRxDBLookupCombo
          Tag = 1
          Left = 104
          Top = 376
          Width = 273
          Height = 21
          Hint = 'ORG_DOCS.ID_DOCS'
          DropDownCount = 8
          LookupField = 'ID'
          LookupDisplay = 'KIND_DOCS'
          LookupSource = dmDaic.dsKind_Docs  
          TabOrder = 17
        end

	object rdlcCHILD_ORG: TRxDBLookupCombo
          Tag = 1
          Left = 104
          Top = 448
          Width = 465
          Height = 21
          Hint = 'ORG_DOCS.ID_CHILD_ORG'
          DropDownCount = 8
          LookupField = 'ID'
          LookupDisplay = 'FL_OBJECT_NAME'
          LookupSource = dmDaic.dsOrganization  
          TabOrder = 17
        end
        object edADD_INFO_DOCS: TEdit
          Tag = 1
          Left = 104
          Top = 424
          Width = 465
          Height = 21
          Hint = 'ORG_DOCS.ADD_INFO'
          TabOrder = 18
        end
      end
    end
  end
  object pnButtons: TPanel
    Left = 0
    Top = 503
    Width = 594
    Height = 41
    Align = alBottom
    TabOrder = 1
    DesignSize = (
      594
      41)
    object bbtnBuildSQL: TBitBtn
      Left = 11
      Top = 8
      Width = 100
      Height = 25
      Anchors = []
      Caption = 'Построить'
      Default = True
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ModalResult = 1
      ParentFont = False
      TabOrder = 0
      OnClick = bbtnBuildSQLClick
      Glyph.Data = {
        EE000000424DEE0000000000000076000000280000000F0000000F0000000100
        0400000000007800000000000000000000001000000000000000000000000000
        8000008000000080800080000000800080008080000080808000C0C0C0000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFFFFFFFFFFF
        FFF000000FFFFF0000000F000FFFFF0F00000F000FFFFF0F00000000000F0000
        000000F000000F00000000F000F00F00000000F000F00F000000F00000000000
        00F0FF0F000F0F000FF0FF00000F00000FF0FFF000FFF000FFF0FFF0F0FFF0F0
        FFF0FFF000FFF000FFF0FFFFFFFFFFFFFFF0}
    end
    object bbtnExit: TBitBtn
      Left = 118
      Top = 8
      Width = 100
      Height = 25
      Anchors = []
      Cancel = True
      Caption = 'Отмена'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ModalResult = 2
      ParentFont = False
      TabOrder = 1
      Glyph.Data = {
        66010000424D6601000000000000760000002800000014000000140000000100
        040000000000F000000000000000000000001000000000000000000000000000
        8000008000000080800080000000800080008080000080808000C0C0C0000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00888888888888
        8888888800008888888888888888888800008888888888888888888800008888
        888888888000888800008888888888888C8E088800008888888888888C8E0888
        000080000000008888C8E08800008CEEEEEE088888C8E08800008C8888E08888
        888C8E0800008CF88E088888888C8E0800008CFF88E08888888C8E0800008CFF
        008E0888888C8E0800008CF08C08E008888C8E0800008C0888C08EE0000E8E08
        00008C88888CC08EEEE8E0880000888888888CC000000888000088888888888C
        CCCC888800008888888888888888888800008888888888888888888800008888
        88888888888888880000}
    end
    object bbtnClearAllEdits: TBitBtn
      Left = 224
      Top = 8
      Width = 89
      Height = 25
      Caption = 'Очистить'
      TabOrder = 2
      OnClick = bbtnClearAllEditsClick
      Glyph.Data = {
        26050000424D26050000000000003604000028000000100000000F0000000100
        080000000000F000000000000000000000000001000000000000000000000000
        80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA
        A6000020400000206000002080000020A0000020C0000020E000004000000040
        20000040400000406000004080000040A0000040C0000040E000006000000060
        20000060400000606000006080000060A0000060C0000060E000008000000080
        20000080400000806000008080000080A0000080C0000080E00000A0000000A0
        200000A0400000A0600000A0800000A0A00000A0C00000A0E00000C0000000C0
        200000C0400000C0600000C0800000C0A00000C0C00000C0E00000E0000000E0
        200000E0400000E0600000E0800000E0A00000E0C00000E0E000400000004000
        20004000400040006000400080004000A0004000C0004000E000402000004020
        20004020400040206000402080004020A0004020C0004020E000404000004040
        20004040400040406000404080004040A0004040C0004040E000406000004060
        20004060400040606000406080004060A0004060C0004060E000408000004080
        20004080400040806000408080004080A0004080C0004080E00040A0000040A0
        200040A0400040A0600040A0800040A0A00040A0C00040A0E00040C0000040C0
        200040C0400040C0600040C0800040C0A00040C0C00040C0E00040E0000040E0
        200040E0400040E0600040E0800040E0A00040E0C00040E0E000800000008000
        20008000400080006000800080008000A0008000C0008000E000802000008020
        20008020400080206000802080008020A0008020C0008020E000804000008040
        20008040400080406000804080008040A0008040C0008040E000806000008060
        20008060400080606000806080008060A0008060C0008060E000808000008080
        20008080400080806000808080008080A0008080C0008080E00080A0000080A0
        200080A0400080A0600080A0800080A0A00080A0C00080A0E00080C0000080C0
        200080C0400080C0600080C0800080C0A00080C0C00080C0E00080E0000080E0
        200080E0400080E0600080E0800080E0A00080E0C00080E0E000C0000000C000
        2000C0004000C0006000C0008000C000A000C000C000C000E000C0200000C020
        2000C0204000C0206000C0208000C020A000C020C000C020E000C0400000C040
        2000C0404000C0406000C0408000C040A000C040C000C040E000C0600000C060
        2000C0604000C0606000C0608000C060A000C060C000C060E000C0800000C080
        2000C0804000C0806000C0808000C080A000C080C000C080E000C0A00000C0A0
        2000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0E000C0C00000C0C0
        2000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0A000808080000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0007FFFBFFFB07
        070707070707070707070707070707FBFF070707070707070707070707070707
        00000007070707070707070707070700FFFBFF000707070707070707070700FF
        00FFFBFF00070707070707070700FF00FF0700FBFF0007070707070700FF00FF
        0700FBFFFB00000707070700FF00FF0700FBFFFB000707000707000000FF0700
        FBFFFB000707070007070707070000FBFFFB0007070700070707070707070700
        FB00070707000400070707070707070700070707000404040007070707070707
        0700000007000404040007070707070707070707070700040400070707070707
        07070707070707000007}
    end
    object cbFilterMode: TComboBox
      Left = 320
      Top = 8
      Width = 265
      Height = 21
      Style = csDropDownList
      ItemHeight = 13
      TabOrder = 3
      Visible = false
    end
  end
  object Memo1: TMemo
    Left = 8
    Top = 480
    Width = 569
    Height = 17
    Hint = 'Основной запрос'
    Lines.Strings = (
      'select * '
      ' from organization /*, rebuild_org*//*, org_docs*/'
      'where'
      '1=1'
      '[/AND $$edFl_Object_Name$$/]'
      '[/AND $$edSh_Object_Name$$/]'
      '[/AND $$rdlcSTAT_ORG$$/]'
      '[/AND $$rdlcDISTRICT$$/]'
      '[/AND $$rdlcPREF_TOWN$$/]'
      '[/AND $$rdlcTOWN$$/]'
      '[/AND $$deSTREET$$/]'
      '[/AND $$deEMAIL$$/]'
      '[/AND $$dsPOSTINDEX$$/]'
      '[/AND $$deLEADER$$/]'
      '[/AND $$deLEADER_POS$$/]'
      '[/AND $$dePHONE$$/]'
      '[/ AND (select count(*) from  rebuild_org  where rebuild_org.ID_ORG=organization.ID AND $$rdlcREBUILD$$)>0/]'
      '[/ AND (select count(*) from  rebuild_org  where rebuild_org.ID_ORG=organization.ID AND $$edADD_REBUILD$$)>0 /]'
      '[/ AND (select count(*) from  rebuild_org  where rebuild_org.ID_ORG=organization.ID AND $$deDT_REBUILD$$)>0 /]'
      '[/ AND (select count(*) from  org_docs where org_docs.ID_ORG=organization.ID AND $$rdlcDOCS$$)>0/]'
      '[/ AND (select count(*) from  org_docs where org_docs.ID_ORG=organization.ID AND $$deBEGIN_DATE$$)>0/]'
      '[/ AND (select count(*) from  org_docs where org_docs.ID_ORG=organization.ID AND $$deEND_DATE$$)>0/]'
      '[/ AND (select count(*) from  org_docs where org_docs.ID_ORG=organization.ID AND $$edADD_INFO_DOCS$$)>0/]'            
      '[/ AND (select count(*) from  org_docs where org_docs.ID_ORG=organization.ID AND $$rdlcCHILD_ORG$$)>0/]'      
    )
    TabOrder = 2
    Visible = False
  end
  object pmFilter: TPopupMenu
    AutoPopup = False
    Left = 320
    Top = 376
    object mnTurnOff: TMenuItem
      Caption = 'Выключить'
      OnClick = mnTurnOffClick
    end
    object mnTurnOn: TMenuItem
      Caption = 'Включить'
      OnClick = mnTurnOnClick
    end
    object mnDelm: TMenuItem
      Caption = '-'
    end
    object mnEqv: TMenuItem
      Caption = 'Равно'
      OnClick = mnEqvClick
    end
    object mnNotEqv: TMenuItem
      Caption = 'Не равно'
      OnClick = mnNotEqvClick
    end
    object mnIsNull: TMenuItem
      Caption = 'Пусто'
      OnClick = mnIsNullClick
    end
    object mnNotNull: TMenuItem
      Caption = 'Не пусто'
      OnClick = mnNotNullClick
    end
  end
end
