Data Report Connection

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Data Report Connection

Post by Johann »

How to connect Data report to a database without the data environment?
Student here.
Johann/Yuwan

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Data Report Connection

Post by HansV »

See if the attachment to Use Data Report without Data Environment helps.
Best wishes,
Hans

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data Report Connection

Post by Johann »

Doesn't help. There is no code. :/. How to put datasource to data report without using data environment??
Student here.
Johann/Yuwan

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Data Report Connection

Post by HansV »

Have you looked at the Visual Basic project in the zip file?
S102.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

Johann
Lounger
Posts: 38
Joined: 03 Feb 2013, 15:23

Re: Data Report Connection

Post by Johann »

Yes!. But they are not connected to each other. Data report has no codes or they are not in one program
Student here.
Johann/Yuwan

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Data Report Connection

Post by HansV »

I can't test this myself - I only use the Office applications, not VB or VB.Net - but as far as I can tell, the data source is set from the form:

Code: Select all

Private Sub cmdShowReport_Click()
Set rs = db.Execute("select *from student")
If rs.EOF = False Then
    Set DRSample.DataSource = rs
    DRSample.Show
End If
End Sub
Best wishes,
Hans