PDA

Click to See Complete Forum and Search --> : Data Reports via Code objects


ZanM
Sep 12th, 2000, 12:51 AM
I am at the last stage of developping an error logging database and I want to add reports with the Data Report Designer, but I want to get away from the data enviorment. I have used DAO Code Objects for the rest of the program and want to use Command, Commands, Connection, .... to do the report but I'm lost as to how to do it.


Anybody who haas done this please post an example of it so that I can use it I'm usin Jet 3.51 if it matters.

Thanks

JEN001
Sep 12th, 2000, 11:39 AM
I have seen this done before. Using Object refrencaces but it has been about six months and I don't remember how the guy did it. The is even a simular thread in the forum if you search for Data Report.

Dim CN As New ADODB.Connection
Dim RS2 As New ADODB.Recordset
Dim CMD As New ADODB.Command
Dim i As Integer

CN.Open "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" & App.Path & "/DynErrLog.MDB;"

With CMD
.ActiveConnection = CN
.CommandType = adCmdText
.CommandText = mSQL
.Execute
End With

With RS2
.ActiveConnection = CN
.CursorLocation = adUseClient
.Open CMD
End With

the above code which is from the thread I meantioned create a link between the too but doesn't display any data on the report.

Anybody .........

Thanks
ZanM

ZanM
Sep 12th, 2000, 11:47 AM
http://support.microsoft.com/support/kb/articles/Q240/0/19.ASP?LN=EN-US&SD=gn&FR=0)