PDA

Click to See Complete Forum and Search --> : Hi, si_the_geek Help me please...


edgarbenilde
Oct 23rd, 2007, 05:53 AM
Hi, si_the_geek. as what you told me that i just have to PM to you if want to ask you question(S)..

now, si_the_geek this my problem for almost one month...

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

nick2k3
Oct 23rd, 2007, 10:25 AM
Hi, si_the_geek. as what you told me that i just have to PM to you if want to ask you question(S)..

now, si_the_geek this my problem for almost one month...

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

Hi, actually i do not get what you meant by "codes being honored" by report.

si_the_geek
Oct 23rd, 2007, 01:03 PM
I don't know what that meant either.. but I think to be able to help at all, we'll need to see the query (as well as a clearer explanation of what you meant).

edgarbenilde
Oct 24th, 2007, 07:01 AM
i'm sorry i got time for my responce...

anyway. what i mean is that based on the codes below, i wanted to print the data based on the RSONO where i selected.... the code below is work fine but the report in the my reportform or let the data is not changing... still the first RSONO number in the database was in PRINTFORM even if i didn't select it...

that is what i mean that is not honor the codes

for refresh imagine that you create a crystal report... and assuming that you already data in the database...
then when you create a crystal report then you preview it... it will display the first data and corresponding data of it's fields related.. it is the same as like that.

si_the_geek
Oct 24th, 2007, 08:30 AM
Does da get filled with the correct data?

If so, the problem is with putting that data into Crystal, and I have no idea how to do that, as I don't use Crystal. This is one of the reasons I and many other people don't answer code questions via PM's - I can help with many things, but you need other people to help you with the areas I don't know.

edgarbenilde
Oct 25th, 2007, 06:56 AM
Yes, i fill the good data,

Hi, si_the_geek i really need help...?

by the way you saying your using crystal report...
where do you create report on your program..?

can you give me alternatives on using crystal, and how to used it....?

si_the_geek
Oct 25th, 2007, 07:58 AM
I don't use Crystal - so I can't help with that part (or VB.Net). :(

Hopefully somebody who does use it will be able to help you.

mabbas110
Nov 6th, 2007, 04:30 AM
I dont know that i understand ur question or not , but giving u the answer.

You have one option in Crystal Report -> Report Selection Formula , u can pass directly the selection formula from code , do need to write the code which u have written , and it works fine.

let me know if you have got ur answer or not.