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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Report Problem - Skipping First Record

Status
Not open for further replies.

bpitche

MIS
Mar 13, 2001
43
0
0
US
I have problem with my data report. I have a search program that displays the query results in a data repeater. Then I created a report to print the results. When I preview the report for the first time, all of the records are displayed on the report. But if I close the report and preview it again, the first record is missing. If I print the report, it will not even print the first record. The data repeater still shows the first record, but the print or print preview do not. Does anybody have any ideas of what I am doing wrong? I am using the same datasource as my data repeater.

Thanks in advance!!

Brad Pitcher
The Hoover Company
 
Try to use either a Client Side cursor, or a Static cursor
 
I am using a Client Side cursor and I am using adOpenStatic.

Brad Pitcher
The Hoover Company
 
That was the only Bug that I was aware of.
Make sure you have VB6 SP5 and ADO 2.5 or higher.

What happens if you use MoveFirst on the recordset prior to opening the report again?

Other than that, I do not know what would cause it unless some other part of your code is causing a problem.
 
The only thing that I don't do is requery before passing the datasource to the report. I know that it works if I requery, but it also makes the program run slower. A requery should not have to be done for this to work, should it?

Brad Pitcher
The Hoover Company
 
No, you do not need to requery.
Try destroying the DataReport object, or resetting the DataSource.

Don't know what else to tell you....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top