Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB


C#
Dim ds As New DataSet
ds.Clear()

Dim da As New OleDbDataAdapter("select * from Userinfo where Userinfo.NativePlace='" & ComboBox3.Text & "' and Userinfo.elite <>'دائمي' and Userinfo.Userid not in (select Checkinout.Userid from Checkinout where Checkinout.CheckTime between #" & DateTimePicker1.Text & "# and #" & DateTimePicker2.Text & "#)", conn)

da.Fill(ds, "Userinfo")
da.Fill(ds, "Checkinout")

Dim da2 As New OleDbDataAdapter("select * from vacation where dvacation >= 0 and vacation_date_e <= #" & DateTimePicker3.Text & "#", conn)
da2.Fill(ds, "vacation")

Dim da3 As New OleDbDataAdapter("select * from duty where dduty > 0 and duty_date_e >= #" & DateTimePicker3.Text & "#", conn)
da3.Fill(ds, "duty")

Dim rpt As New CrystalReport2

rpt.SetDataSource(ds)
rpt.SetParameterValue(0, DateTimePicker1.Value.Date)
rpt.SetParameterValue(1, ComboBox3.Text)

Dim cr1 As New crystal_form
cr1.CrystalReportViewer1.ReportSource = rpt
cr1.Show()


What I have tried:

i think the problem in using two tables in one data adapter how can i avoid this late it take about two to five minutes
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900