[RESOLVED] Last record not gettin printed(Crystal Report)
I have an issue that i dont know why i am facing. I have made a report which is working fine. Only problem is when that report is generated it displays 1 record less.
I have done some calculations and stored the records in the database. From there i am directly getting the records. In print preview say it is showing 7 records but when report is generated using the form it displays only 6 records.
Can anyone help me out??? I have attached the screenshots of both Print preview screen and actual report screen....
Re: Last record not gettin printed(Crystal Report)
well i dont think so that date would be relevant...What i am doing is all the data required for data is being stored in tmpstock table.
Now for suppose 7 items ie i specify lower and upper limit of items on the form and the date..the query then fetches 7 records and stores in that temporary table. There in table it shows 7 records but while printing the table it shows only 6.
Re: Last record not gettin printed(Crystal Report)
Plz help me out...Its urgent.....
What happens is when i load my project and print the report first time it show all records but all subsequent printing displays 1 record less.
suppose i specify item number from 1 to 15, then first time it prints 15 records as needed but when again same report is generated it shows only 14 records..Is anyone having idea why is this happening???
Last edited by mihirpatel83; Aug 25th, 2009 at 01:41 AM.
Re: Last record not gettin printed(Crystal Report)
I am using crystal report 8.5...
In the attached DB.rar, i have provided the two reports in which i am facing such problem along with database and the VB form which calls those reports.
i am storing the data in tmpstock table and from there i just have to dump those values in the reports but its not working. Evn when i tried to create a simple new report which had just 1 field in report from tmpstock table it showed 1 record less.
Again would like to quote that when i print preview my report it shows data correctly, only the last record is not getting printed when the report is generated.
Re: Last record not gettin printed(Crystal Report)
MS Access uses "write caching" which means there is a slight delay before data is actually written to the database. The Connection that issued the insert (or update) statement can read back the new records immediately but other connections must wait until the delay time has passed before they can access the new record..
In your case, because the report is executed right after the last record is written to the tmpStock table and since Crystal obviously uses a different connection than the VB form, that last record is not yet available for the report (it is still in the cache).
One work around is to close the connection before executing the report. When a connection is closed, the "write cache" is flushed and any outstanding inserts/updates are immediately written to the database.
Another option is to modify the default Flush Transaction Timeout property. Set this after you open your connection.
db.Open "provider=..."
db.Properties("Jet OLEDB:Flush Transaction Timeout") = 0
The value of the property is in milliseconds.
Last edited by brucevde; Aug 27th, 2009 at 12:49 AM.
Re: [RESOLVED] Last record not gettin printed(Crystal Report)
I have a problem again with same report...
What happens is now that data doest get refreshed from the report.
Especially when i close the vb project and again open report, it shows the previous output of that report.
After first time it shows data properly bt inbetween as well rarely i doesnt show the new data...
What could be the possible reason.??
It tried to close the connection and open it again....Stil it is not working. Following Code is executed when clicking on print button.