Commits

aminiy  committed 3bf4963

+Report

  • Participants
  • Parent commits 14dd4c1

Comments (0)

Files changed (5)

File src/docbase.lps

     <PathDelim Value="\"/>
     <Version Value="9"/>
     <BuildModes Active="Default"/>
-    <Units Count="8">
+    <Units Count="11">
       <Unit0>
         <Filename Value="docbase.lpr"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="docbase"/>
-        <EditorIndex Value="6"/>
         <WindowIndex Value="0"/>
         <TopLine Value="1"/>
         <CursorPos X="1" Y="21"/>
-        <UsageCount Value="27"/>
-        <Loaded Value="True"/>
+        <UsageCount Value="54"/>
       </Unit0>
       <Unit1>
         <Filename Value="unit1.pas"/>
         <HasResources Value="True"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="Unit1"/>
-        <EditorIndex Value="2"/>
+        <EditorIndex Value="3"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="45"/>
-        <CursorPos X="5" Y="69"/>
-        <UsageCount Value="27"/>
+        <TopLine Value="100"/>
+        <CursorPos X="1" Y="103"/>
+        <UsageCount Value="54"/>
         <Loaded Value="True"/>
-        <LoadedDesigner Value="True"/>
       </Unit1>
       <Unit2>
         <Filename Value="unit2.pas"/>
         <HasResources Value="True"/>
         <ResourceBaseClass Value="DataModule"/>
         <UnitName Value="Unit2"/>
-        <IsVisibleTab Value="True"/>
         <EditorIndex Value="0"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="25"/>
-        <CursorPos X="18" Y="49"/>
-        <UsageCount Value="27"/>
+        <TopLine Value="63"/>
+        <CursorPos X="1" Y="78"/>
+        <UsageCount Value="54"/>
         <Loaded Value="True"/>
         <LoadedDesigner Value="True"/>
       </Unit2>
         <WindowIndex Value="0"/>
         <TopLine Value="34"/>
         <CursorPos X="26" Y="45"/>
-        <UsageCount Value="10"/>
+        <UsageCount Value="8"/>
       </Unit3>
       <Unit4>
         <Filename Value="C:\lazarus\lcl\extdlgs.pas"/>
         <UnitName Value="ExtDlgs"/>
-        <EditorIndex Value="3"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="208"/>
-        <CursorPos X="3" Y="201"/>
+        <TopLine Value="28"/>
+        <CursorPos X="1" Y="1"/>
         <UsageCount Value="12"/>
-        <Loaded Value="True"/>
       </Unit4>
       <Unit5>
         <Filename Value="C:\lazarus\lcl\dialogs.pp"/>
         <UnitName Value="Dialogs"/>
-        <EditorIndex Value="4"/>
         <WindowIndex Value="0"/>
         <TopLine Value="59"/>
         <CursorPos X="17" Y="85"/>
         <UsageCount Value="12"/>
-        <Loaded Value="True"/>
       </Unit5>
       <Unit6>
         <Filename Value="C:\lazarus\fpc\2.6.2\source\rtl\objpas\classes\classesh.inc"/>
-        <EditorIndex Value="5"/>
         <WindowIndex Value="0"/>
         <TopLine Value="1701"/>
         <CursorPos X="3" Y="1670"/>
         <UsageCount Value="12"/>
-        <Loaded Value="True"/>
       </Unit6>
       <Unit7>
         <Filename Value="C:\lazarus\components\ibx\runtime\IB.pas"/>
         <UnitName Value="IB"/>
         <EditorIndex Value="1"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="398"/>
-        <CursorPos X="1" Y="411"/>
+        <TopLine Value="349"/>
+        <CursorPos X="1" Y="364"/>
         <UsageCount Value="11"/>
         <Loaded Value="True"/>
       </Unit7>
+      <Unit8>
+        <Filename Value="C:\lazarus\components\lazreport\source\lr_class.pas"/>
+        <UnitName Value="LR_Class"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="136"/>
+        <CursorPos X="1" Y="1"/>
+        <UsageCount Value="8"/>
+      </Unit8>
+      <Unit9>
+        <Filename Value="C:\lazarus\fpc\2.6.2\source\packages\fcl-db\src\base\db.pas"/>
+        <UnitName Value="db"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="1613"/>
+        <CursorPos X="28" Y="1628"/>
+        <UsageCount Value="10"/>
+      </Unit9>
+      <Unit10>
+        <Filename Value="C:\lazarus\lcl\lresources.pp"/>
+        <UnitName Value="LResources"/>
+        <IsVisibleTab Value="True"/>
+        <EditorIndex Value="2"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="3096"/>
+        <CursorPos X="1" Y="3109"/>
+        <UsageCount Value="10"/>
+        <Loaded Value="True"/>
+      </Unit10>
     </Units>
     <General>
       <ActiveWindowIndexAtStart Value="0"/>
     </General>
-    <JumpHistory Count="30" HistoryIndex="29">
+    <JumpHistory Count="25" HistoryIndex="24">
       <Position1>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="55" Column="33" TopLine="31"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="60" Column="6" TopLine="36"/>
       </Position1>
       <Position2>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="56" Column="33" TopLine="32"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="61" Column="6" TopLine="37"/>
       </Position2>
       <Position3>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="57" Column="33" TopLine="33"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="62" Column="6" TopLine="38"/>
       </Position3>
       <Position4>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="58" Column="33" TopLine="34"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="63" Column="6" TopLine="39"/>
       </Position4>
       <Position5>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="59" Column="33" TopLine="35"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="64" Column="6" TopLine="40"/>
       </Position5>
       <Position6>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="60" Column="33" TopLine="36"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="65" Column="6" TopLine="41"/>
       </Position6>
       <Position7>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="61" Column="33" TopLine="16"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="66" Column="6" TopLine="42"/>
       </Position7>
       <Position8>
-        <Filename Value="C:\lazarus\lcl\dialogs.pp"/>
-        <Caret Line="85" Column="17" TopLine="59"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="67" Column="6" TopLine="43"/>
       </Position8>
       <Position9>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="61" Column="33" TopLine="16"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="68" Column="6" TopLine="44"/>
       </Position9>
       <Position10>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="60" Column="33" TopLine="32"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="69" Column="6" TopLine="45"/>
       </Position10>
       <Position11>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="59" Column="33" TopLine="31"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="70" Column="6" TopLine="46"/>
       </Position11>
       <Position12>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="58" Column="33" TopLine="30"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="71" Column="6" TopLine="47"/>
       </Position12>
       <Position13>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="57" Column="33" TopLine="29"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="72" Column="6" TopLine="48"/>
       </Position13>
       <Position14>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="56" Column="33" TopLine="28"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="73" Column="6" TopLine="49"/>
       </Position14>
       <Position15>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="55" Column="33" TopLine="27"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="74" Column="6" TopLine="50"/>
       </Position15>
       <Position16>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="54" Column="33" TopLine="26"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="75" Column="6" TopLine="51"/>
       </Position16>
       <Position17>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="9" Column="16" TopLine="1"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="44" Column="25" TopLine="32"/>
       </Position17>
       <Position18>
         <Filename Value="unit2.pas"/>
-        <Caret Line="1" Column="1" TopLine="1"/>
+        <Caret Line="82" Column="12" TopLine="58"/>
       </Position18>
       <Position19>
         <Filename Value="unit1.pas"/>
-        <Caret Line="9" Column="3" TopLine="1"/>
+        <Caret Line="127" Column="41" TopLine="102"/>
       </Position19>
       <Position20>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="8" Column="39" TopLine="1"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="86" Column="23" TopLine="58"/>
       </Position20>
       <Position21>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="9" Column="3" TopLine="1"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="45" Column="7" TopLine="38"/>
       </Position21>
       <Position22>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="8" Column="67" TopLine="1"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="82" Column="36" TopLine="62"/>
       </Position22>
       <Position23>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="38" Column="38" TopLine="7"/>
+        <Filename Value="unit2.pas"/>
+        <Caret Line="85" Column="21" TopLine="62"/>
       </Position23>
       <Position24>
         <Filename Value="unit2.pas"/>
-        <Caret Line="1" Column="1" TopLine="1"/>
+        <Caret Line="78" Column="1" TopLine="63"/>
       </Position24>
       <Position25>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="40" Column="38" TopLine="12"/>
+        <Filename Value="C:\lazarus\components\ibx\runtime\IB.pas"/>
+        <Caret Line="364" Column="1" TopLine="349"/>
       </Position25>
-      <Position26>
-        <Filename Value="unit2.pas"/>
-        <Caret Line="1" Column="1" TopLine="1"/>
-      </Position26>
-      <Position27>
-        <Filename Value="unit2.pas"/>
-        <Caret Line="49" Column="18" TopLine="25"/>
-      </Position27>
-      <Position28>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="61" Column="5" TopLine="37"/>
-      </Position28>
-      <Position29>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="63" Column="5" TopLine="39"/>
-      </Position29>
-      <Position30>
-        <Filename Value="unit1.pas"/>
-        <Caret Line="68" Column="5" TopLine="44"/>
-      </Position30>
     </JumpHistory>
   </ProjectSession>
 </CONFIG>

File src/unit1.lfm

         BorderStyle = bsNone
         Color = clWindow
         Columns = <>
+        DataSource = DataModule1.dsCONTRACT
         TabOrder = 0
       end
       object Panel2: TPanel
         object Label16: TLabel
           Left = 332
           Height = 14
-          Top = 12
+          Top = 9
           Width = 77
           Caption = 'Срок действия'
           ParentColor = False
         end
+        object SpeedButton1: TSpeedButton
+          Left = 608
+          Height = 20
+          Top = 9
+          Width = 20
+          AutoSize = True
+          Flat = True
+          Glyph.Data = {
+            36040000424D3604000000000000360000002800000010000000100000000100
+            2000000000000004000064000000640000000000000000000000000000000000
+            0000000000000000000000000023000000330000003300000033000000330000
+            0033000000330000002300000000000000000000000000000000868686008686
+            860082868900C28C5200AB7E4CBFB5844EFFB3824BFFB3814BFFB3814BFFB382
+            4BFFB5844EFFAB7E4CBFC28C5200828689008686860086868600000000230000
+            00330000003300000033BA854BFFFFFFFCFFFFFFF5FFFFFFF4FFFFFFF4FFFFFF
+            F5FFFFFFFCFFBA854BFF00000033000000330000003300000023797979C08181
+            81FF818182FF7F8386FFBD8546FFFFFFF7FFFFF3DAFFFFF2D9FFFFF2D9FFFFF3
+            DAFFFFFFF7FFBD8546FF7F8386FF818182FF818181FF797979C0818181FFD5D2
+            D1FFCBC9C9FF7D7C7CFF676768FFA8A6A8FFA4A2A4FFA3A2A3FFA3A2A3FFA4A2
+            A4FFA8A6A8FF676768FF7D7C7CFFCBC9C9FFD5D2D1FF818181FF7F7F7FFFDAD7
+            D6FFC2BFBEFFC8C5C4FFAFACACFFAFACABFFADAAAAFFADAAAAFFADAAAAFFADAA
+            AAFFAFACABFFAFACACFFC8C5C4FFC2BFBEFFDAD7D6FF7F7F7FFF7E7E7EFFE1E0
+            DFFFBDBBB9FF92908EFF7B7977FF7D7B78FF7D7B78FF7D7B78FF7D7B78FF7D7B
+            78FF7D7B78FF7B7977FF92908EFFBDBBB9FFE1E0DFFF7E7E7EFF7D7D7DFFEDEB
+            EBFFB8B5B3FF646261FF6B6968FF6C6A69FF6C6A69FF6C6A69FF6C6A69FF6C6A
+            69FF6C6A69FF6B6968FF646261FFB8B5B3FFEDEBEBFF7D7D7DFF7C7C7DFFF9F8
+            F8FFF3F4F2FF949190FF9B9897FF9C9998FF9C9998FF9C9998FF9C9998FF9C99
+            98FF9C9998FF9B9897FF949190FFF3F4F2FFF9F8F8FF7C7C7DFF7C7C7DFFF4F3
+            F2FFD3D1D0FF827F7EFF888685FF898686FF898685FF898685FF898685FF8986
+            85FF898686FF888685FF827F7EFFD3D1D0FFF4F3F2FF7C7C7DFF7E7E7EFFFFFF
+            FFFFFFFFFFFF6D6B6AFF706F6FFF6C6B6BFF6A6867FF6A6867FF6A6867FF6A68
+            67FF6C6B6BFF706F6FFF6D6B6AFFFFFFFFFFFFFFFFFF7E7E7EFF838383B07F7F
+            7FFF7F7F80FF808387FFBF8648FFFFFFF8FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+            FFFFFFFFF8FFBF8648FF808387FF7F7F80FF7F7F7FFF838383B0868686008485
+            85008485870075777AFFBA8347FFFFFFF3FFFFF0DDFFFFEFDCFFFFEFDCFFFFF0
+            DDFFFFFFF3FFBA8347FF75777AFF848587008485850086868600868686008486
+            880082868B0071777D00B78349FFFFFFF4FFFFE1C0FFFFE0BFFFFFE0BFFFFFE1
+            C0FFFFFFF4FFB78349FF71777D0082868B008486880086868600848688008085
+            8C00C28D5300BE8C5400B7854EFFFFFFFDFFFFFFF5FFFFFEF4FFFFFEF4FFFFFF
+            F5FFFFFFFDFFB7854EFFBE8C5400C28D530080858C008486880082868900C28D
+            5200BD8C5700BA8C5800B88955B0B5844FFFB3824BFFB3814BFFB3814BFFB382
+            4BFFB5844FFFB88955B0BA8C5800BD8C5700C28D520082868900
+          }
+          NumGlyphs = 0
+          OnClick = SpeedButton1Click
+        end
+        object SpeedButton2: TSpeedButton
+          Left = 508
+          Height = 20
+          Top = 33
+          Width = 20
+          AutoSize = True
+          Flat = True
+          Glyph.Data = {
+            36040000424D3604000000000000360000002800000010000000100000000100
+            2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000300000
+            0033000000330000003300000033000000330000003300000033000000330000
+            0033000000330000003300000033000000330000003300000023B6A494F2B5A2
+            92FFB3A08FFFB39F8FFFB39F8FFFB4A090FFB4A090FFB4A08FFFB39F8FFFB39F
+            8FFFB39F8FFFB39F8FFFB39F8FFFB3A08FFFB5A292FFA9988AC0B5A292FFFFFF
+            FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+            FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB5A292FFB4A090FFFFFF
+            FFFFFFFFFCFFFFFFFDFFFFFFFFFFD1D1CFFF7D7E7FFFFFFEFBFFFCF9F7FFFBF9
+            F6FFFBF9F6FFFBF9F6FFFBF9F6FFFCFAF7FFFFFFFEFFB4A090FFB5A191FFFFFC
+            F8FFBDB9B7FF8C8886FF8E8A88FF858687FFD0CCCAFFFBF6F2FFF7F2EEFFF6F1
+            EDFFF6F1EDFFF6F1EDFFF6F1EDFFF7F2EFFFFBF8F3FFB4A090FFB5A292FFFBF6
+            F1FF8A8682FFFAF3EDFFFBF4EDFF8D8884FFFDF6EFFFF6EFE8FFF3ECE6FFF3EC
+            E6FFF3ECE6FFF3ECE6FFF3ECE6FFF4EEE8FFF4EFEBFFB4A191FFB6A393FFF5EF
+            E8FF89837FFFF6EEE6FFF6EEE6FF88837EFFF8EEE7FFF2E9E2FFF0E7E0FFF0E7
+            E0FFF0E7E0FFF0E7E0FFF0E7E0FFF2E9E2FFEFE8E1FFB5A292FFB7A394FFEDE5
+            DFFFB8B0A7FF86817CFF86817BFFB6AEA6FFF4E8DFFFF0E4DBFFEFE4DBFFEFE4
+            DBFFEFE4DBFFEFE4DBFFEFE4DBFFF0E5DCFFE9E0DAFFB6A393FFB7A595FFE2DC
+            D6FFE2DBD5FFE3DCD6FFE3DCD6FFE1DBD4FFDED8D1FFDDD6D0FFDDD6D0FFDDD6
+            D0FFDDD6D0FFDDD6D0FFDDD6D0FFDDD7D1FFE0DAD4FFB7A595FFB9A797EFB8A5
+            95FFB7A494FFB7A494FFB7A494FFB7A494FFB7A394FFB6A393FFB6A393FFB6A3
+            93FFB6A393FFB6A393FFB6A393FFB6A394FFB7A595FFB9A797B0FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+            FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
+          }
+          NumGlyphs = 0
+          Visible = False
+        end
+      end
+      object DBNavigator1: TDBNavigator
+        Left = 508
+        Height = 20
+        Top = 9
+        Width = 100
+        AutoSize = True
+        BevelOuter = bvNone
+        ChildSizing.EnlargeHorizontal = crsScaleChilds
+        ChildSizing.EnlargeVertical = crsScaleChilds
+        ChildSizing.ShrinkHorizontal = crsScaleChilds
+        ChildSizing.ShrinkVertical = crsScaleChilds
+        ChildSizing.Layout = cclLeftToRightThenTopToBottom
+        ChildSizing.ControlsPerLine = 100
+        ClientHeight = 20
+        ClientWidth = 100
+        DataSource = DataModule1.dsCONTRACT
+        Flat = True
+        Options = []
+        TabOrder = 2
+        VisibleButtons = [nbInsert, nbDelete, nbEdit, nbPost, nbCancel]
       end
     end
     object TabSheet3: TTabSheet

File src/unit1.pas

 uses
   Forms, Classes, SysUtils, FileUtil, LR_DBSet, Controls, Graphics, Dialogs,
   StdCtrls, ComCtrls, ActnList, DBGrids, ExtCtrls, DbCtrls, Buttons, ExtDlgs,
-  MaskEdit, LR_DSet, LR_Class;
+  MaskEdit, DBActns, LR_DSet, LR_Class;
 
 type
 
       DBGrid2: TDBGrid;
       DBLCMFO: TDBLookupComboBox;
       DBLookupComboBox1: TDBLookupComboBox;
+      DBNavigator1: TDBNavigator;
       ImageList1: TImageList;
       Label1: TLabel;
       Label10: TLabel;
       PageControl1: TPageControl;
       Panel1: TPanel;
       Panel2: TPanel;
+      SpeedButton1: TSpeedButton;
+      SpeedButton2: TSpeedButton;
       TabSheet1: TTabSheet;
       TabSheet2: TTabSheet;
       TabSheet3: TTabSheet;
       procedure FormCreate(Sender: TObject);
       procedure FormShow(Sender: TObject);
       procedure frDBDataSet1CheckEOF(Sender: TObject; var Eof: Boolean);
+      procedure SpeedButton1Click(Sender: TObject);
       procedure ToolButton1Click(Sender: TObject);
   private
     { private declarations }
 
 implementation
 
+uses Unit2;
+
 {$R *.lfm}
 
 { TForm1 }
 
 end;
 
+procedure TForm1.SpeedButton1Click(Sender: TObject);
+begin
+     DataModule1.frRpCONTRACT.ShowReport;
+end;
+
 end.
 

File src/unit2.lfm

 object DataModule1: TDataModule1
   OnCreate = DataModuleCreate
   OldCreateOrder = False
-  Height = 369
-  HorizontalOffset = 1260
-  VerticalOffset = 481
-  Width = 290
+  Height = 413
+  HorizontalOffset = 1217
+  VerticalOffset = 115
+  Width = 311
   object IBDatabase1: TIBDatabase
     Connected = False
     AllowStreamedConnected = False
     left = 112
     top = 16
   end
-  object IBTblClients: TIBTable
+  object IBTblCLIENTS: TIBTable
     Database = IBDatabase1
     Transaction = IBTransaction1
+    AfterPost = IBTblCLIENTSAfterPost
     BufferChunks = 1000
     CachedUpdates = False
     TableName = 'CLIENTS'
     left = 32
     top = 72
-    object IBTblClientsID: TIntegerField
+    object IBTblCLIENTSID: TIntegerField
       DisplayWidth = 10
       FieldKind = fkData
       FieldName = 'ID'
       Required = True
       Visible = False
     end
-    object IBTblClientsNAME: TIBStringField
+    object IBTblCLIENTSNAME: TIBStringField
       DisplayWidth = 50
       FieldKind = fkData
       FieldName = 'NAME'
       Required = False
       Size = 80
     end
-    object IBTblClientsDIRECTOR: TIBStringField
+    object IBTblCLIENTSDIRECTOR: TIBStringField
       DisplayWidth = 30
       FieldKind = fkData
       FieldName = 'DIRECTOR'
       Visible = False
       Size = 80
     end
-    object IBTblClientsTEL: TIBStringField
+    object IBTblCLIENTSTEL: TIBStringField
       DisplayWidth = 15
       FieldKind = fkData
       FieldName = 'TEL'
       Required = False
       Size = 15
     end
-    object IBTblClientsFAX: TIBStringField
+    object IBTblCLIENTSFAX: TIBStringField
       DisplayWidth = 15
       FieldKind = fkData
       FieldName = 'FAX'
       Visible = False
       Size = 15
     end
-    object IBTblClientsADDRESS: TIBStringField
+    object IBTblCLIENTSADDRESS: TIBStringField
       DisplayWidth = 40
       FieldKind = fkData
       FieldName = 'ADDRESS'
       Visible = False
       Size = 80
     end
-    object IBTblClientsINN: TIBStringField
+    object IBTblCLIENTSINN: TIBStringField
       DisplayWidth = 9
       FieldKind = fkData
       FieldName = 'INN'
       Required = False
       Size = 9
     end
-    object IBTblClientsMFO: TIBStringField
+    object IBTblCLIENTSMFO: TIBStringField
       DisplayWidth = 5
       FieldKind = fkData
       FieldName = 'MFO'
       Required = False
       Size = 5
     end
-    object IBTblClientsACCOUNT: TIBStringField
+    object IBTblCLIENTSACCOUNT: TIBStringField
       DisplayWidth = 20
       FieldKind = fkData
       FieldName = 'ACCOUNT'
       ReadOnly = False
       Required = False
     end
-    object IBTblClientsOKONX: TIBStringField
+    object IBTblCLIENTSOKONX: TIBStringField
       DisplayWidth = 5
       FieldKind = fkData
       FieldName = 'OKONX'
       Visible = False
       Size = 5
     end
-    object IBTblClientsE_MAIL: TIBStringField
+    object IBTblCLIENTSE_MAIL: TIBStringField
       DisplayWidth = 15
       FieldKind = fkData
       FieldName = 'E_MAIL'
       Required = False
       Size = 40
     end
-    object IBTblClientsBASIS: TIBStringField
+    object IBTblCLIENTSBASIS: TIBStringField
       DisplayWidth = 20
       FieldKind = fkData
       FieldName = 'BASIS'
     end
   end
   object dsClients: TDatasource
-    DataSet = IBTblClients
+    DataSet = IBTblCLIENTS
     left = 32
     top = 128
   end
-  object frDBClients: TfrDBDataSet
-    DataSet = IBTblClients
-    left = 33
-    top = 184
+  object frDBCONTRACT: TfrDBDataSet
+    DataSet = IBQCONTRACT
+    OpenDataSource = False
+    left = 32
+    top = 288
   end
-  object frRpClients: TfrReport
-    Dataset = frDBClients
+  object frRpCONTRACT: TfrReport
+    Dataset = frDBCONTRACT
     InitialZoom = pzDefault
     Options = []
     PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbHelp, pbExit]
+    StoreInDFM = True
     DataType = dtDataSet
     left = 32
-    top = 248
+    top = 344
     ReportForm = {
-      19000000
+      190000002808000019000000000D0043616E6F6E204C42503239303000FF0D00
+      546672506167655265706F727400090000000100000001000000000000000000
+      00000000000000000000000000FFFF0000000000000000000000000000000000
+      0005004D656D6F3100120000000F000000300000001200000003000000803F00
+      0000000000000000000000FFFFFF1F2C020000000000010014005B494251434F
+      4E54524143542E224E414D45225D000000000100000000000500417269616C00
+      0A0000000000000000000000020000000000FFFFFF0000000000000000000000
+      0000000005004D656D6F32001200000025000000300000001200000003000000
+      803F000000000000000000000000FFFFFF1F2C020000000000010018005B4942
+      51434F4E54524143542E224449524543544F52225D0000000001000000000005
+      00417269616C000A0000000000000000000000020000000000FFFFFF00000000
+      000000000000000000000005004D656D6F3300120000003B0000008002000012
+      00000003000000803F000000000000000000000000FFFFFF1F2C020000000000
+      010015005B494251434F4E54524143542E224241534953225D00000000010000
+      0000000500417269616C000A0000000000000000000000020000000000FFFFFF
+      00000000000000000000000000000005004D656D6F3400120000005100000030
+      0000001200000003000000803F000000000000000000000000FFFFFF1F2C0200
+      00000000010017005B494251434F4E54524143542E2241444452455353225D00
+      0000000100000000000500417269616C000A0000000000000000000000020000
+      000000FFFFFF00000000000000000000000000000005004D656D6F3500120000
+      0067000000800200001200000003000000803F000000000000000000000000FF
+      FFFF1F2C020000000000010017005B494251434F4E54524143542E224143434F
+      554E54225D000000000100000000000500417269616C000A0000000000000000
+      000000020000000000FFFFFF00000000000000000000000000000005004D656D
+      6F3600120000007D000000A00000001200000003000000803F00000000000000
+      0000000000FFFFFF1F2C020000000000010013005B494251434F4E5452414354
+      2E224D464F225D000000000100000000000500417269616C000A000000000000
+      0000000000020000000000FFFFFF00000000000000000000000000000005004D
+      656D6F37001200000093000000200100001200000003000000803F0000000000
+      00000000000000FFFFFF1F2C020000000000010013005B494251434F4E545241
+      43542E22494E4E225D000000000100000000000500417269616C000A00000000
+      00000000000000020000000000FFFFFF00000000000000000000000000000005
+      004D656D6F380012000000A9000000A00000001200000003000000803F000000
+      000000000000000000FFFFFF1F2C020000000000010015005B494251434F4E54
+      524143542E224F4B4F4E58225D000000000100000000000500417269616C000A
+      0000000000000000000000020000000000FFFFFF000000000000000000000000
+      00000005004D656D6F390012000000BF000000E0010000120000000300000080
+      3F000000000000000000000000FFFFFF1F2C020000000000010013005B494251
+      434F4E54524143542E2254454C225D000000000100000000000500417269616C
+      000A0000000000000000000000020000000000FFFFFF00000000000000000000
+      000000000006004D656D6F31300012000000D5000000E0010000120000000300
+      0000803F000000000000000000000000FFFFFF1F2C020000000000010013005B
+      494251434F4E54524143542E22464158225D0000000001000000000005004172
+      69616C000A0000000000000000000000020000000000FFFFFF00000000000000
+      000000000000000006004D656D6F31310012000000EB00000000050000120000
+      0003000000803F000000000000000000000000FFFFFF1F2C0200000000000100
+      16005B494251434F4E54524143542E22455F4D41494C225D0000000001000000
+      00000500417269616C000A0000000000000000000000020000000000FFFFFF00
+      000000000000000000000000000006004D656D6F313200120000000101000040
+      0100001200000003000000803F000000000000000000000000FFFFFF1F2C0200
+      00000000010016005B494251434F4E54524143542E224E554D424552225D0000
+      00000100000000000500417269616C000A000000000000000000000002000000
+      0000FFFFFF00000000000000000000000000000006004D656D6F313300120000
+      0017010000500000001200000003000000803F000000000000000000000000FF
+      FFFF1F2C020000000000010016005B494251434F4E54524143542E22565F4441
+      5445225D000000000100000000000500417269616C000A000000000000000000
+      0000020000000000FFFFFF00000000000000000000000000000006004D656D6F
+      313400120000002D010000500000001200000003000000803F00000000000000
+      0000000000FFFFFF1F2C02000000000001001A005B494251434F4E5452414354
+      2E22434C49454E54535F4944225D000000000100000000000500417269616C00
+      0A0000000000000000000000020000000000FFFFFF0000000000000000000000
+      0000000006004D656D6F31350012000000430100005000000012000000030000
+      00803F000000000000000000000000FFFFFF1F2C020000000000010016005B49
+      4251434F4E54524143542E22445F44415445225D000000000100000000000500
+      417269616C000A0000000000000000000000020000000000FFFFFF0000000000
+      0000000000000000FE00000000000000
     }
   end
   object IBTblMFO: TIBTable
     Database = IBDatabase1
     Transaction = IBTransaction1
+    AfterPost = IBTblCLIENTSAfterPost
     BufferChunks = 1000
     CachedUpdates = False
     TableName = 'MFO'
     left = 112
     top = 128
   end
+  object IBTblCONTRACT: TIBTable
+    Database = IBDatabase1
+    Transaction = IBTransaction1
+    AfterPost = IBTblCLIENTSAfterPost
+    BufferChunks = 1000
+    CachedUpdates = False
+    TableName = 'CONTRACT'
+    left = 184
+    top = 72
+    object IBTblCONTRACTID: TIntegerField
+      DisplayWidth = 10
+      FieldKind = fkData
+      FieldName = 'ID'
+      Index = 0
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = True
+    end
+    object IBTblCONTRACTNUMBER: TIBStringField
+      DisplayWidth = 40
+      FieldKind = fkData
+      FieldName = 'NUMBER'
+      Index = 1
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 40
+    end
+    object IBTblCONTRACTV_DATE: TDateField
+      DisplayWidth = 10
+      FieldKind = fkData
+      FieldName = 'V_DATE'
+      Index = 2
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = True
+    end
+    object IBTblCONTRACTCLIENTS_ID: TIntegerField
+      DisplayWidth = 10
+      FieldKind = fkData
+      FieldName = 'CLIENTS_ID'
+      Index = 3
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = True
+    end
+    object IBTblCONTRACTD_DATE: TDateField
+      DisplayWidth = 10
+      FieldKind = fkData
+      FieldName = 'D_DATE'
+      Index = 4
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+    end
+  end
+  object dsCONTRACT: TDatasource
+    DataSet = IBTblCONTRACT
+    left = 184
+    top = 128
+  end
+  object IBQCONTRACT: TIBQuery
+    Database = IBDatabase1
+    Transaction = IBTransaction1
+    BufferChunks = 1000
+    CachedUpdates = False
+    DataSource = dsCONTRACT
+    GeneratorField.ApplyOnEvent = gaeOnNewRecord
+    SQL.Strings = (
+      'SELECT '
+      '    CLIENTS.NAME,'
+      '    CLIENTS.DIRECTOR,'
+      '    CLIENTS.BASIS,'
+      '    CLIENTS.ADDRESS,'
+      '    CLIENTS.ACCOUNT,'
+      '    CLIENTS.MFO,'
+      '    CLIENTS.INN,'
+      '    CLIENTS.OKONX,'
+      '    CLIENTS.TEL,'
+      '    CLIENTS.FAX,'
+      '    CLIENTS.E_MAIL,'
+      '    CONTRACT.NUMBER,'
+      '    CONTRACT.V_DATE,'
+      '    CONTRACT.CLIENTS_ID,'
+      '    CONTRACT.D_DATE'
+      'FROM CONTRACT'
+      '   INNER JOIN CLIENTS ON (CONTRACT.CLIENTS_ID = CLIENTS.ID)'
+      'WHERE '
+      '   ('
+      '      (CONTRACT.ID = :ID)'
+      '   )'
+    )
+    Params = <    
+      item
+        DataType = ftInteger
+        Name = 'ID'
+        ParamType = ptInput
+        Size = 4
+      end>
+    left = 32
+    top = 224
+    ParamData = <    
+      item
+        DataType = ftInteger
+        Name = 'ID'
+        ParamType = ptInput
+        Size = 4
+      end>
+    object IBQCONTRACTNAME: TIBStringField
+      DisplayWidth = 320
+      FieldKind = fkData
+      FieldName = 'NAME'
+      Index = 0
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 320
+    end
+    object IBQCONTRACTDIRECTOR: TIBStringField
+      DisplayWidth = 320
+      FieldKind = fkData
+      FieldName = 'DIRECTOR'
+      Index = 1
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 320
+    end
+    object IBQCONTRACTBASIS: TIBStringField
+      DisplayWidth = 80
+      FieldKind = fkData
+      FieldName = 'BASIS'
+      Index = 2
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 80
+    end
+    object IBQCONTRACTADDRESS: TIBStringField
+      DisplayWidth = 320
+      FieldKind = fkData
+      FieldName = 'ADDRESS'
+      Index = 3
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 320
+    end
+    object IBQCONTRACTACCOUNT: TIBStringField
+      DisplayWidth = 80
+      FieldKind = fkData
+      FieldName = 'ACCOUNT'
+      Index = 4
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 80
+    end
+    object IBQCONTRACTMFO: TIBStringField
+      DisplayWidth = 20
+      FieldKind = fkData
+      FieldName = 'MFO'
+      Index = 5
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+    end
+    object IBQCONTRACTINN: TIBStringField
+      DisplayWidth = 36
+      FieldKind = fkData
+      FieldName = 'INN'
+      Index = 6
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 36
+    end
+    object IBQCONTRACTOKONX: TIBStringField
+      DisplayWidth = 20
+      FieldKind = fkData
+      FieldName = 'OKONX'
+      Index = 7
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+    end
+    object IBQCONTRACTTEL: TIBStringField
+      DisplayWidth = 60
+      FieldKind = fkData
+      FieldName = 'TEL'
+      Index = 8
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 60
+    end
+    object IBQCONTRACTFAX: TIBStringField
+      DisplayWidth = 60
+      FieldKind = fkData
+      FieldName = 'FAX'
+      Index = 9
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 60
+    end
+    object IBQCONTRACTE_MAIL: TIBStringField
+      DisplayWidth = 160
+      FieldKind = fkData
+      FieldName = 'E_MAIL'
+      Index = 10
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 160
+    end
+    object IBQCONTRACTNUMBER: TIBStringField
+      DisplayWidth = 40
+      FieldKind = fkData
+      FieldName = 'NUMBER'
+      Index = 11
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+      Size = 40
+    end
+    object IBQCONTRACTV_DATE: TDateField
+      DisplayWidth = 10
+      FieldKind = fkData
+      FieldName = 'V_DATE'
+      Index = 12
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = True
+    end
+    object IBQCONTRACTCLIENTS_ID: TIntegerField
+      DisplayWidth = 10
+      FieldKind = fkData
+      FieldName = 'CLIENTS_ID'
+      Index = 13
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = True
+    end
+    object IBQCONTRACTD_DATE: TDateField
+      DisplayWidth = 10
+      FieldKind = fkData
+      FieldName = 'D_DATE'
+      Index = 14
+      LookupCache = False
+      ProviderFlags = [pfInUpdate, pfInWhere]
+      ReadOnly = False
+      Required = False
+    end
+  end
 end

File src/unit2.pas

 
 uses
   Classes, SysUtils, db, FileUtil, LR_DBSet, LR_Class, IBDatabase, IBTable,
-  IBCustomDataSet;
+  IBCustomDataSet, IBQuery;
 
 type
 
   { TDataModule1 }
 
   TDataModule1 = class(TDataModule)
+      dsCONTRACT: TDatasource;
       dsMFO: TDatasource;
       dsClients: TDatasource;
-      frDBClients: TfrDBDataSet;
-      frRpClients: TfrReport;
+      frDBCONTRACT: TfrDBDataSet;
+      frRpCONTRACT: TfrReport;
       IBDatabase1: TIBDatabase;
+      IBQCONTRACT: TIBQuery;
+      IBQCONTRACTACCOUNT: TIBStringField;
+      IBQCONTRACTADDRESS: TIBStringField;
+      IBQCONTRACTBASIS: TIBStringField;
+      IBQCONTRACTCLIENTS_ID: TIntegerField;
+      IBQCONTRACTDIRECTOR: TIBStringField;
+      IBQCONTRACTD_DATE: TDateField;
+      IBQCONTRACTE_MAIL: TIBStringField;
+      IBQCONTRACTFAX: TIBStringField;
+      IBQCONTRACTINN: TIBStringField;
+      IBQCONTRACTMFO: TIBStringField;
+      IBQCONTRACTNAME: TIBStringField;
+      IBQCONTRACTNUMBER: TIBStringField;
+      IBQCONTRACTOKONX: TIBStringField;
+      IBQCONTRACTTEL: TIBStringField;
+      IBQCONTRACTV_DATE: TDateField;
+      IBTblCONTRACT: TIBTable;
+      IBTblCONTRACTCLIENTS_ID: TIntegerField;
+      IBTblCONTRACTD_DATE: TDateField;
+      IBTblCONTRACTID: TIntegerField;
+      IBTblCONTRACTNUMBER: TIBStringField;
+      IBTblCONTRACTV_DATE: TDateField;
       IBTblMFO: TIBTable;
-      IBTblClients: TIBTable;
-      IBTblClientsACCOUNT: TIBStringField;
-      IBTblClientsADDRESS: TIBStringField;
-      IBTblClientsBASIS: TIBStringField;
-      IBTblClientsDIRECTOR: TIBStringField;
-      IBTblClientsE_MAIL: TIBStringField;
-      IBTblClientsFAX: TIBStringField;
-      IBTblClientsID: TIntegerField;
-      IBTblClientsINN: TIBStringField;
-      IBTblClientsMFO: TIBStringField;
-      IBTblClientsNAME: TIBStringField;
-      IBTblClientsOKONX: TIBStringField;
-      IBTblClientsTEL: TIBStringField;
+      IBTblCLIENTS: TIBTable;
+      IBTblCLIENTSACCOUNT: TIBStringField;
+      IBTblCLIENTSADDRESS: TIBStringField;
+      IBTblCLIENTSBASIS: TIBStringField;
+      IBTblCLIENTSDIRECTOR: TIBStringField;
+      IBTblCLIENTSE_MAIL: TIBStringField;
+      IBTblCLIENTSFAX: TIBStringField;
+      IBTblCLIENTSID: TIntegerField;
+      IBTblCLIENTSINN: TIBStringField;
+      IBTblCLIENTSMFO: TIBStringField;
+      IBTblCLIENTSNAME: TIBStringField;
+      IBTblCLIENTSOKONX: TIBStringField;
+      IBTblCLIENTSTEL: TIBStringField;
       IBTransaction1: TIBTransaction;
       procedure DataModuleCreate(Sender: TObject);
+      procedure IBTblCLIENTSAfterPost(DataSet: TDataSet);
   private
     { private declarations }
   public
 
 procedure TDataModule1.DataModuleCreate(Sender: TObject);
 begin
-    IBTblClients.Open;
+    {IBTblMFO.Open;
+    IBTblCLIENTS.Open;
+    IBTblCONTRACT.Open;}
+end;
+
+procedure TDataModule1.IBTblCLIENTSAfterPost(DataSet: TDataSet);
+var no:Longint;
+begin
+    no:=DataSet.RecNo;
+    DataSet.Refresh;
+    DataSet.RecNo:=no;
 end;
 
 end.