Hi there.
I'm trying to make an VB6 Application, which has a report in it...
The Report, is a custom report, where I've selected the datasource ( Same as in App ) and taken the fields from the db which I want to use.
Then I Make an Recordset, and write MyCr.Database.SetDataSource RS
This works fine, put I'm not getting the right data in the report. I know, my sql is right, because, I use the same SQL to make a form which holds the same data, as should be in the report.
The SQL Is like this.
I'm exstracting a lot of data, with 4 joins, and a SagsId Which has the number of the case to be viewed..
What I can't figure out, is, if I make an Do While Not (RS.BOF Or RS.EOF)
And writing the data in a msbbox, before it is sent to crystal reports, I get the correct data.
Is there a difference in SQL Syntax?
Any help is appreciated
Thnx
Dennis
Machine code Rocks
I'm trying to make an VB6 Application, which has a report in it...
The Report, is a custom report, where I've selected the datasource ( Same as in App ) and taken the fields from the db which I want to use.
Then I Make an Recordset, and write MyCr.Database.SetDataSource RS
This works fine, put I'm not getting the right data in the report. I know, my sql is right, because, I use the same SQL to make a form which holds the same data, as should be in the report.
The SQL Is like this.
Code:
SQL = "SELECT Sag.SagsId, Sag.Dato, Sag.Overskrift, Sag.ProblemBeskrivelse, Sag.Udfoert" & _
", Kunde.KundeId, Kunde.Navn, Kunde.Adresse, Kunde.PostNr, Kunde.ByNavn, Kunde.KontaktPerson, Kunde.TelefonNr, Kunde.MobilNr" & _
", Server.ServerNavn, Server.ServerType, Server.CPU, Server.RAM, Server.Harddisk, Server.Controller, Server.Netkort, Server.TapeDevice, Server.ServerSoft, Server.BackupSoft, Server.AntiVirusSoft, Server.FirewallSoft" & _
", Sup.SupportType" & _
", MedArb.Navne" & _
" FROM SagsTB Sag, KundeTB Kunde, ServerTB Server, MedarbejderTB MedArb, SupportTypeTB Sup" & _
" WHERE Sag.SagsId = " & Replace(arrId(1), " ", "") & _
" AND Sag.KundeId = Kunde.KundeId" & _
" AND Sag.ServerId = Server.ServerId" & _
" AND Sag.SupportId = Sup.SupportId" & _
" AND Sag.MedarbejderId = MedArb.MedarbejderId"
I'm exstracting a lot of data, with 4 joins, and a SagsId Which has the number of the case to be viewed..
What I can't figure out, is, if I make an Do While Not (RS.BOF Or RS.EOF)
And writing the data in a msbbox, before it is sent to crystal reports, I get the correct data.
Is there a difference in SQL Syntax?
Any help is appreciated
Thnx
Dennis
Machine code Rocks