ed9teen
10-30-2007, 12:41 AM
here is my code..
i have two tables in Access database...
1.) FinalCustRSO
Fields:
RSONO PK Autnumber
Customer text
ZeroStock text
NewProduct text
ProjectForecast text
WithMotherPO text
Others text
RequestedBy text
NotedBy text
ReceivedBy
2.) FinalItemRSO
Fields:
DataID
RSONO
ItemCode
ItemDescription
Source
MOQ
QuantityRequired
Remarks
now, i create a query Called "FinalCustItemRSO " and i used that query to make easy. but the problem is that it doesn't Honor the codes inside the Getrecords.. but i though that i got right codes.
my question is why it doesn't honor the code..? i also try to use instead of using oledbCommand, i used oledbAdapter to filter the data baseb on the RSONO that i want to be filtered or tobe print... but still the same still ignoring the codes....
i really not understand why...
can you please help me how could my crystal report work good...
please..?
here nis my code below....
Private sub_Formload_click
Dim newRep As New LunisCryatal
GetRecords()
newRep.SetDataSource(ds)
newRep.Refresh()
CrystalReportViewer1.RefreshReport()
end sub
Private Sub GetRecords()
ds.Clear()
ds = New DataSet
Dim cmd As New OleDbCommand
cmd.Connection = cn
cmd.CommandType = CommandType.Text
cmd.CommandText = "Select * from FinalCustItemRSO where RSONO=" & Me.cboPrintRsoNo.Text & ""
da.SelectCommand = cmd
RSONO=" & myRsonotoprint & "", cn)
da.Fill(ds, "FinalCustItemRSO")
End Sub
i have two tables in Access database...
1.) FinalCustRSO
Fields:
RSONO PK Autnumber
Customer text
ZeroStock text
NewProduct text
ProjectForecast text
WithMotherPO text
Others text
RequestedBy text
NotedBy text
ReceivedBy
2.) FinalItemRSO
Fields:
DataID
RSONO
ItemCode
ItemDescription
Source
MOQ
QuantityRequired
Remarks
now, i create a query Called "FinalCustItemRSO " and i used that query to make easy. but the problem is that it doesn't Honor the codes inside the Getrecords.. but i though that i got right codes.
my question is why it doesn't honor the code..? i also try to use instead of using oledbCommand, i used oledbAdapter to filter the data baseb on the RSONO that i want to be filtered or tobe print... but still the same still ignoring the codes....
i really not understand why...
can you please help me how could my crystal report work good...
please..?
here nis my code below....
Private sub_Formload_click
Dim newRep As New LunisCryatal
GetRecords()
newRep.SetDataSource(ds)
newRep.Refresh()
CrystalReportViewer1.RefreshReport()
end sub
Private Sub GetRecords()
ds.Clear()
ds = New DataSet
Dim cmd As New OleDbCommand
cmd.Connection = cn
cmd.CommandType = CommandType.Text
cmd.CommandText = "Select * from FinalCustItemRSO where RSONO=" & Me.cboPrintRsoNo.Text & ""
da.SelectCommand = cmd
RSONO=" & myRsonotoprint & "", cn)
da.Fill(ds, "FinalCustItemRSO")
End Sub