Pomogite chainiku, please...
ganzorig_1
mongolia
Privet vsem! Pomogite chainiku reshit problemu...
Est dve tablitsy. Structura takova:
Table1: ID, ContractNo, ... (ID-autoincrement)
Table2: ID, ContractNo, Date, Debet, Kredit, ... (ID-autoincrement)
svyaz odin ko mnogomu, (table 1) 1: N (table2) po 'ContractNo'-u.
Report s DialogPage-m. Na nem dve DateEditControl. Pust DateEdit1, DateEdit2.
Nuzhno pokazat' report tipa:
_______________________________________
ContractNo....Sum of Debet....Sum of Kredit
1................................200....................300
2................................250....................200
3................................400....................370
_______________________________________
Ya postavil na DialogPage DBEQuery.
DBEQuery.Master:=Table1
DBEQuery.MasterFields:='ContractNo=ContractNo'
SQL:='SELECT ContractNo, Debet, Kredit FROM Table1 WHERE Date>=:d1 AND Date<=:d2'
Params:
d1...............DateEdit1.Date
d2...............DateEdit2.Date
Na Page1 postavil MasterData i DetailData. DetailData.Visible:=False;
Memo1......................Memo2
[Table1."ContractNo"] [SUM(<BDEQuery1."Debet">, DetailData1)]
Na vtorom memo nichego ne pechataetsya. Pomogite...
Est dve tablitsy. Structura takova:
Table1: ID, ContractNo, ... (ID-autoincrement)
Table2: ID, ContractNo, Date, Debet, Kredit, ... (ID-autoincrement)
svyaz odin ko mnogomu, (table 1) 1: N (table2) po 'ContractNo'-u.
Report s DialogPage-m. Na nem dve DateEditControl. Pust DateEdit1, DateEdit2.
Nuzhno pokazat' report tipa:
_______________________________________
ContractNo....Sum of Debet....Sum of Kredit
1................................200....................300
2................................250....................200
3................................400....................370
_______________________________________
Ya postavil na DialogPage DBEQuery.
DBEQuery.Master:=Table1
DBEQuery.MasterFields:='ContractNo=ContractNo'
SQL:='SELECT ContractNo, Debet, Kredit FROM Table1 WHERE Date>=:d1 AND Date<=:d2'
Params:
d1...............DateEdit1.Date
d2...............DateEdit2.Date
Na Page1 postavil MasterData i DetailData. DetailData.Visible:=False;
Memo1......................Memo2
[Table1."ContractNo"] [SUM(<BDEQuery1."Debet">, DetailData1)]
Na vtorom memo nichego ne pechataetsya. Pomogite...
Комментарии