03-11-16, 12:05 AM
05-11-16, 09:48 AM
(03-11-16, 12:05 AM)السيد الجوهري كتب : [ -> ]كيف استخرج الرصيد التراكمى داخل view SQL
ارجو الافادة
05-11-16, 11:06 AM
اخي العزيز الرجاء توضيح سؤالك لتجد الجواب المناسب
05-11-16, 12:31 PM
مدين دائن الرصيد
500 0 500
350 0 850
0 100 750
كشف حساب
500 0 500
350 0 850
0 100 750
كشف حساب
05-11-16, 08:58 PM
اذا تريده بالداتا غريد فيو
اعمل جملة تكرار وحدد الشرط الذي تريده
وهذا هو الكود
اعمل جملة تكرار وحدد الشرط الذي تريده
وهذا هو الكود
كود :
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DataGridView1.Rows.Add(5)
DataGridView1.Rows(0).Cells(0).Value = 100
DataGridView1.Rows(1).Cells(0).Value = 0
DataGridView1.Rows(2).Cells(0).Value = 50
DataGridView1.Rows(3).Cells(0).Value = 0
DataGridView1.Rows(4).Cells(0).Value = 25
DataGridView1.Rows(0).Cells(1).Value = 0
DataGridView1.Rows(1).Cells(1).Value = 200
DataGridView1.Rows(2).Cells(1).Value = 0
DataGridView1.Rows(3).Cells(1).Value = 150
DataGridView1.Rows(4).Cells(1).Value = 0
Dim cun As Integer
For i = 0 To DataGridView1.Rows.Count - 1
If DataGridView1.Rows(i).Cells(0).Value = 0 Then
cun = DataGridView1.Rows(i).Cells(1).Value + cun
DataGridView1.Rows(i).Cells(2).Value = cun.ToString
ElseIf DataGridView1.Rows(i).Cells(0).Value > 0 Then
cun = cun - DataGridView1.Rows(i).Cells(0).Value
DataGridView1.Rows(i).Cells(2).Value = cun.ToString
End If
Next
End Sub
End Class06-11-16, 11:25 AM
لو فى الكريستال ريبورت ممكن تعمل حقل جارى running field وتكتب فيه المعادلة بتاعت الجمع للسطر وسوف يظهر الرصيد تراكمى