procedure Start;
Begin
End;

Procedure Finish;
Begin
End;

Function ReadFilter(Var F: String): Boolean;
Begin
  F:= '';
  Result:= True;
End;

Function ReadSQL(W: String): String;
Begin
  Result:= 'Select '#13 +
		'   STOKKODU, CINSI, KOD1 AS MARKA, B.EN, B.BOY, EN * BOY / 10000 AS M2, R.KOD AS RENK, D.KOD AS DESEN, M.BARKOD '#13 +
		' from TBLBIRIMMUADILKOD M '#13 +
		' LEFT OUTER JOIN TBLBIRIMLEREX B ON M.BIRIMKARTNO = B.KARTNO '#13 +
		' LEFT OUTER JOIN TBLSTOKLAR S ON S.KARTNO = B.STOKID '#13 +
		' LEFT OUTER JOIN TBLRENKLER R ON R.ID = M.RENK '#13 +
		' LEFT OUTER JOIN TBLHALIDESENLER D ON D.ID = M.DESEN ' + 
		' WHERE ISNULL(B.KARTNO, 0) <> 0 ';
End;

Function RaporDefaultSQL: String;
Begin
  Result:= ReadSQL('');
End;

Function RaporFileName: String;
Begin
  Result:= '';
End;

procedure Execute;
Var
  IDS: String;
Begin
  if ReadFilter(IDS) Then
  Begin    
    CreateReport(IDS, ReadSQL(IDS), 
     'STOKKODU;CINSI;MARKA;RENK;DESEN;EN;BOY;M2;BARKOD', 
	 'Stok Kodu;Cinsi;Marka;Renk;Desen;En;Boy;Adet M2;Barkod', 
	  0);
    CreateSummary('STOKKODU', skCount);
  End;
End;

Begin
End.
