Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Report Does Not Show Updated Data 1

Status
Not open for further replies.

Bruce007

Programmer
Mar 13, 2002
30
0
0
US
I am using VB 6 with patch 5 and Access 2000.
I have one table that is populated with data depending on
the report. With I first run the program and generated the
report all is fine. If I try and generate another report
I get a blank report.
This is what I have tried:
1. Applied workaround from Microsoft adding a timer
Timer1.Interval = 1
DataReport.Show
In timer routine: rsDataReport.MoveFirst
This gives an error about BOF or EOF being set to true
2. Unloading and loading the Dataenvironment
3. DataReport1.Refresh
DataReport1.Show
4. Creating a SQL statement
DataReport1.DataSource = sql statement

All of the above fails to show data or gives errors. I can't
use Crystal Reports as the version that comes with VB 6
does not work with Access 2000.

I am at a loss of what to do next.
 
Try unloading the datareport when you are finished with it.

unload datareport1 Scott
Programmer Analyst
 
I tried what you indicated and it still does not show
the changes to the table. I have switched to running
the reports out of Access, which is not my first choice
but it works. I saw somewhere about a runtime Access
so that I can run these reports on target machines that
do not have Access. Do you the name of this file?
 
I gave it a try and it seems to work.
Thanks for the help!!!!

Just another quick question.
The DataEnvironment1 is set to my development directory.
When I install the program in a target directory how
do I redirect this and Connection1 to the new directory?
 
dataenvironment.conUserDefined.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.path & "\filename.mdb";Persist Security Info=False"

This should point the dataenvironment to the a database called filename located in the same directory as your exe.

Best wishes Scott
Programmer Analyst
 
The Data Report is better but the first time it comes
up blank then it is OK. I am getting very upset with
this feature (or bug).

You fix helped so that I am at least getting reports.
Thanks.
 
I agree it is a poor tool for reporting. I primarily use it to create custom labels for our shipping dept. I manually populate the report each time with data so that cuts down on mishaps. Have you tried manually configuring the datasource of the reports instead of relying on the data environment? Define an ADO recordset, query the database the set the datasource of the report equal to the ADO rs. There is a little more effort required but I think you will achieve better results. Scott
Programmer Analyst
 
Just try this

If dataenvironmentName.rscommandName.State = 1 Then
DatareportName.rscommandName.Requery
Else
datareportName.commandName
End If
DatareportName.Top = 0
DatareportName.Left = 0
DatareportName.Show
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top