Dim obj As CRDataset = New CRDataset Dim obj1 As CRDataset = New CRDataset
Dim balrow As DataRow = obj.Tables("DB_COM").NewRow()//obj for one group of value balrow("fbankname") = gbankname balrow("fbranchname") = gbranchname balrow("fusername") = Guser balrow("fworkstation") = worknode balrow("fserverdt") = serverdt Dim gpt As String = Format(fromdate.Value, "dd/MM/yyyy") balrow("fdate") = gpt balrow("fmainhead1") = fmainhead1 If OPENSTATE = "1" Or OPENSTATE1 = "1" Then balrow("fcrtot") = CRBAL balrow("fglhead") = fglhead CRBAL = 0 End If 'If OPENSTATE1 = "2" And fglhead1 <> readglhead Or OPENSTATE = "2" And fglhead1 <> readglhead Then ' balrow("fdrtot") = DRBAL ' balrow("fglcode") = fglhead1 ' readglhead = fglhead1 'End If obj.Tables("DB_COM").Rows.Add(balrow) If OPENSTATE1 = "2" And fglhead1 <> readglhead Or OPENSTATE = "2" And fglhead1 <> readglhead Then Dim alrow As DataRow = obj1.Tables("DB_COM").NewRow()//obj1 for another group of value alrow("fmainhead2") = fmainhead2 alrow("fdrtot") = DRBAL alrow("fglcode") = fglhead1 readglhead = fglhead1 obj1.Tables("DB_COM").Rows.Add(alrow) End If
Dim cr As New ReportDocument cr = New BALANCESHEET//crystall report cr.SetDataSource(obj.Tables("DB_COM"))//set datasource obj cr.SetDataSource(obj1.Tables("DB_COM"))//set datasource obj1 repview.CrystalReportViewer1.ReportSource = cr repview.Show()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)