I have a ASPxGridview
(Normally 21 column but i just want process 4 column).
Every column has a decimal value.
MV_EDDIE
column is empty.
What i want is, calculating programmaticly ,MV_EDDIE
columns is RISK_EUR - (IPOTEK + MV_BERND)
only in GroupSummary
and TotalSummary
.
For example; If
RISK_EUR = 100
IPOTEK = 40
MV_BERND = 50
Then MV_EDDIE
column should be 100 - (40 + 50) = 10
How can i do that?
NOTE: I have a Sql
like this
SELECT A.HESAP_NO, A.TEKLIF_NO1 || '/' || A.TEKLIF_NO2 AS TEKLIF,
A.MUS_K_ISIM, A.RISK,
(CASE WHEN A.DOVIZ_KOD = 21 THEN 'EUR' WHEN A.DOVIZ_KOD = 2 THEN 'USD' WHEN A.DOVIZ_KOD = 1 THEN 'TL' END) AS DOVIZ,
ROUND(KRISK_CV(A.TEKLIF_NO1, A.TEKLIF_NO2,A.DOVIZ_KOD,:TAR),2) AS RISK_EUR,
NVL(IPOTEK(A.HESAP_NO, :TAR),0) AS IPOTEK,
ROUND(SUM(M_V(A.TEKLIF_NO1, A.TEKLIF_NO2,:TAR)),2) AS MV_BERND,
ROUND(SUM(MV_EX(A.TEKLIF_NO1, A.TEKLIF_NO2,:TAR)),2) AS MV_EDDIE,
(CASE WHEN ROUND(SUM(MV_K(A.TEKLIF_NO1, A.TEKLIF_NO2,:TAR)),2) < 0 THEN
ROUND(SUM(MV_EX(A.TEKLIF_NO1, A.TEKLIF_NO2,:TAR)),2) ELSE
ROUND(SUM(MV_K(A.TEKLIF_NO1, A.TEKLIF_NO2,:TAR)),2) END) AS MV_KASKO,
B.TARIH, GGUNK(A.TEKLIF_NO1,A.TEKLIF_NO2,:TAR) AS GUN
FROM S_TEKLIF A, TMP_TAKIP B
WHERE A.HESAP_NO = B.HESAP
--AND A.HESAP_NO = 316
AND A.RISK > 0
GROUP BY B.TARIH, A.HESAP_NO, A.TEKLIF_NO1 || '/' || A.TEKLIF_NO2 ,
A.MUS_K_ISIM, GGUNK(A.TEKLIF_NO1,A.TEKLIF_NO2,:TAR),
A.RISK, A.DOVIZ_KOD,KRISK_CV(A.TEKLIF_NO1, A.TEKLIF_NO2,A.DOVIZ_KOD,:TAR)
ORDER BY 3
NOTE 2: I can solve this problem changing my sql query, but i don't want it. My query is complicated already. I don't want change it. Because of that, i want to solve it programmaticly ..
EDIT: I want calculate it only GroupSummary
and TotalSummary
. Not other row.
If anyone consider the answer i found it.