Hi guys !
I have big problem in my project i cant display the data of my database (.mdb) to my Data report i need some expert help to this. Im new to this im such a loooooser... plss help me
Thanks in advance..
Hi guys !
I have big problem in my project i cant display the data of my database (.mdb) to my Data report i need some expert help to this. Im new to this im such a loooooser... plss help me
Thanks in advance..
Good that ’s design‑time fix worked for . Below are concise, durable tips that extend that solution: runtime binding patterns, quick troubleshooting checks for an “empty” DataReport, and deployment gotchas that often bite later.
A robust runtime pattern is to set the DataEnvironment connection to the actual MDB path at startup (use App.Path), close/re‑execute any command rowsets so they use the new connection, then preview the report. Example pattern (adjust names to the project):
' runtime: point the DataEnvironment to the EXE folder and rebind the command
Dim dbPath As String
dbPath = App.Path & "\MyData.mdb"
With DataEnvironment1.Connection1
If .State <> 0 Then .Close
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath & ";Persist Security Info=False;"
.Open
End With
If DataEnvironment1.rsMyCmd.State <> 0 Then DataEnvironment1.rsMyCmd.Close
DataEnvironment1.MyCmd ' re-execute the command rowset so it uses the new connection Binding the report directly to an ADODB.Recordset at runtime is an alternative when the SQL is dynamic or filters are applied in code: open a client‑side recordset (e.g., adOpenStatic), Set DataReport1.DataSource = rs and set DataReport1.DataMember = ""; make sure each report textbox’s DataField matches the recordset fields and that the report’s design‑time DataSource is cleared first. (stackoverflow.com)
Quick troubleshooting checklist and deployment notes:
.mdb files (Microsoft.Jet.OLEDB.4.0) and test the provider on target machines; if the file is .accdb install the Access Database Engine (ACE) appropriate to the app bitness. (learn.microsoft.com) These steps make the report portable and reduce “works on my PC” surprises when moving the EXE or updating the database file.
Jump to Post— abu taher 34I give you a very simple way. at 1st click on project menu_Add Data Environment. Double click on Data Environment1. click right mouse on connection1 & then click properties. In Provider tab click on Microsoft Jet 4.0 OLE DB Provider. Click next. select the database. you can test connection in …
I give you a very simple way. at 1st click on project menu_Add Data Environment. Double click on Data Environment1. click right mouse on connection1 & then click properties. In Provider tab click on Microsoft Jet 4.0 OLE DB Provider. Click next. select the database. you can test connection in below. click ok.
click right mouse on connection1 & click add command. again click right mouse on command1. go properties. in database object_select table. In object name_ select table name. click ok.
2. click on project menu_Add Data Report. select the data report. go properties. In Data source select Data Environment1. In Data member select Command1.
3. put a text box (Rpt textbox, in Data report) in detail (Section1) in data report. select the text box. go properties. in data member select command1. in data field_select any.
4. in form1 put a command button and then write
Private Sub Command1_Click()
DataReport1.Show
End Sub you can get many sample in search engine. try ...
I give you a very simple way. at 1st click on project menu_Add Data Environment. Double click on Data Environment1. click right mouse on connection1 & then click properties. In Provider tab click on Microsoft Jet 4.0 OLE DB Provider. Click next. select the database. you can test connection in below. click ok.
click right mouse on connection1 & click add command. again click right mouse on command1. go properties. in database object_select table. In object name_ select table name. click ok.
2. click on project menu_Add Data Report. select the data report. go properties. In Data source select Data Environment1. In Data member select Command1.
3. put a text box (Rpt textbox, in Data report) in detail (Section1) in data report. select the text box. go properties. in data member select command1. in data field_select any.
4. in form1 put a command button and then writePrivate Sub Command1_Click() DataReport1.Show End Subyou can get many sample in search engine. try ...
Thanks to this it works..
if this solve your problem then please mark it as solved.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.