Function ReadSQL(W: String): String;
Begin
  Result:=  'Set DateFormat DMY '#13#10 +
			' Select '#13#10 +
			'   SUM(CAST(BRUT - DARA AS REAL)) AS NETKG, CAST(Count(*) AS INT) AS CUVAL, R.KOD AS RENKKODU, R.ACIKLAMA AS RENKADI, S.CINSI, S.STOKKODU '#13#10 +
			' from TBLIPLIKCUVAL C '#13#10 +
			' LEFT OUTER JOIN TBLSTOKLAR S WITH(INDEX=TBLSTOKLAR_KARTNO) ON S.KARTNO = C.STOKID '#13#10 +
			' LEFT OUTER JOIN TBLRENKLER R ON R.ID = C.RENKID '#13#10 +
			' WHERE C.OKUNDU = 0 '#13#10 +
			' GROUP BY R.KOD, R.ACIKLAMA, S.CINSI, S.STOKKODU ';
End;

procedure RaporLoad;
Begin
End;

Function RaporFileName: String;
Begin
End;

Function RaporDefaultSQL: String;
Begin
End;

procedure Start;
Begin
End;

Procedure Finish;
Begin
End;

Function ReadFilter(Var F: String): Boolean;
Begin
End;

procedure Execute;
Begin
	CreateReport('', ReadSQL(''), 
     'STOKKODU:0;CINSI;RENKKODU;RENKADI:0;CUVAL;NETKG', 
	 'Stok Kodu;Cinsi;Renk Kodu;Renk Adı;Çuval Sayısı;Net KG', 
	  0);
	
	CreateSummary('NETKG', skSum); 
	CreateSummary('CUVAL', skSum); 
	CreateSummary('CINSI', skCount); 
End;

Begin
End.