Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General Discussion » View Thread |
Messages 1 to 10 of 11 total |
DBISAM Dataset.Next never reaches Dataset.EOF (with using QuickReport) |
Tue, Jun 2 2020 3:23 AM | Permanent Link |
Ron van Kempen Microloon bv | In our Delphi 10.3 application we create PDF documents a Quickreport using DBISAM tables. (by eDocEngine rendering)
While debugging I can see that in procedure procedure TQRController.Execute; in line 2033 of the attached QuickRpt.pas file the Dataset.Next; statement never sets FDataset.Eof to True. This results in an endless loop. (I can also see that a DataSet.Prior; is not done, so that is okay.) What can cause DBISAM never reaching Eof while performing infinite Next commands? (Generally or specific in this situation) Attachments: QuickRpt.pas |
Tue, Jun 2 2020 6:21 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ron
First point - please do not post other peoples code on a public site. I can only talk generally, but as far as I am aware the only things that will stop Eof being reached is a Move, Prior or First command, or possibly a filter being set / unset. In the years I used DBISAM the only thing that ever stopped Eof was me missing the Next command in a loop Roy Lambert |
Tue, Jun 2 2020 10:00 AM | Permanent Link |
Ron van Kempen Microloon bv | Hi Ron, Thank you for your answer.
Further debugging tells me that the Next statement is not working at all. The loop remains processing the first record. So my general question is now: What can prevent a Next statement to get to the next record? Roy Lambert wrote: Ron First point - please do not post other peoples code on a public site. I can only talk generally, but as far as I am aware the only things that will stop Eof being reached is a Move, Prior or First command, or possibly a filter being set / unset. In the years I used DBISAM the only thing that ever stopped Eof was me missing the Next command in a loop Roy Lambert |
Tue, Jun 2 2020 10:04 AM | Permanent Link |
Ron van Kempen Microloon bv | > Hi Ron, Thank you for your answer.
I ment 'Roy, Thank you for your answer. |
Tue, Jun 2 2020 10:44 AM | Permanent Link |
Raul Team Elevate | On 6/2/2020 10:00 AM, Ron van Kempen wrote:
> Hi Ron, Thank you for your answer. > > Further debugging tells me that the Next statement is not working at all. > The loop remains processing the first record. > So my general question is now: What can prevent a Next statement to get to the next record? > Can't say i've ever seen this happen Can you confirm few things - version of dbisam - what is the dataset recordcount (is it 1 or more) - are you sure nothing else is moving dataset or re-using the underlying query object or such Raul |
Tue, Jun 2 2020 12:08 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Raul
>Can you confirm few things >- version of dbisam >- what is the dataset recordcount (is it 1 or more) That shouldn't matter - if the table is empty then it should start life as Eof (I quite often have that for reports when I've filter the raw data), 1 record or 1000s of records should be handles in the same way. >- are you sure nothing else is moving dataset or re-using the underlying >query object or such This is my bet - its a very long time since I've used QuickReport and its probably changed a lot since then, and I've never used eDocEngine. Questions for Ron - you have the source for QuickReport - what happens when you debug the report. - are other reports with the same format produced correctly - have you tried repairing the tables (just a thought - a corrupt index might cause the problem) Roy |
Tue, Jun 2 2020 12:49 PM | Permanent Link |
Raul Team Elevate | On 6/2/2020 12:08 PM, Roy Lambert wrote:
>> - what is the dataset recordcount (is it 1 or more) > > That shouldn't matter - if the table is empty then it should start life as Eof (I quite often have that for reports when I've filter the raw data), 1 record or 1000s of records should be handles in the same way. > Roy, Agreed but never seen this fail in general. I'm just curious about edge cases and whether QR code is doing some other navigation (i.e. maybe BOF gets triggered - just wild guess though) >> - are you sure nothing else is moving dataset or re-using the underlying >> query object or such > > This is my bet - its a very long time since I've used QuickReport and its probably changed a lot since then, and I've never used eDocEngine. Worthwhile to check for sure. QR i assume is on main UI thread so we're looking at application.processmessages being called for anything else to even have a chance to touch the query. Raul |
Wed, Jun 3 2020 2:31 AM | Permanent Link |
Ron van Kempen Microloon bv | I am pretty sure that the next statement itself can not be the real cause of this situation.
> what is the dataset recordcount (is it 1 or more) It is 1(?) but it should be 212 The following information is taken from my Delphi environment: dbisamr448rsdelphiwin3210r.bpl, 4.48.0.4, C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\ I notice a recusive alike processing of the code TQRController.Execute; > TQRController.PrintBeforeControllers > TQRController.Execute; The following advice I received from Gnostice(eDocEngine) "This issue is not related to eDocEngine. Kindly make sure that you are not running infinite loop of DataSet previous and DataSet Next. This may be because when you reach the end of Data Base, you are moving the previous record of data base therefore it is not showing end of database. You can add one more Boolean to check whether you reached end of database before moving to previous . " And my usage of EdocEngine ( QuickReport ) is quite similar as stated in https://www.gnostice.com/nl_article.asp?id=248&t=Export_From_Quickreport_To_PDF_And_Other_Formats Raul wrote: On 6/2/2020 12:08 PM, Roy Lambert wrote: >> - what is the dataset recordcount (is it 1 or more) > > That shouldn't matter - if the table is empty then it should start life as Eof (I quite often have that for reports when I've filter the raw data), 1 record or 1000s of records should be handles in the same way. > Roy, Agreed but never seen this fail in general. I'm just curious about edge cases and whether QR code is doing some other navigation (i.e. maybe BOF gets triggered - just wild guess though) >> - are you sure nothing else is moving dataset or re-using the underlying >> query object or such > > This is my bet - its a very long time since I've used QuickReport and its probably changed a lot since then, and I've never used eDocEngine. Worthwhile to check for sure. QR i assume is on main UI thread so we're looking at application.processmessages being called for anything else to even have a chance to touch the query. Raul |
Wed, Jun 3 2020 3:29 AM | Permanent Link |
Ron van Kempen Microloon bv | Update for my last post:
I have a Delphi 7 Application with the same case which runs smoothly. With the same table that recordCount shows also 1 but it processes fine all the 212 records Ron van Kempen wrote: I am pretty sure that the next statement itself can not be the real cause of this situation. > what is the dataset recordcount (is it 1 or more) It is 1(?) but it should be 212 The following information is taken from my Delphi environment: dbisamr448rsdelphiwin3210r.bpl, 4.48.0.4, C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\ I notice a recusive alike processing of the code TQRController.Execute; > TQRController.PrintBeforeControllers > TQRController.Execute; The following advice I received from Gnostice(eDocEngine) "This issue is not related to eDocEngine. Kindly make sure that you are not running infinite loop of DataSet previous and DataSet Next. This may be because when you reach the end of Data Base, you are moving the previous record of data base therefore it is not showing end of database. You can add one more Boolean to check whether you reached end of database before moving to previous . " And my usage of EdocEngine ( QuickReport ) is quite similar as stated in https://www.gnostice.com/nl_article.asp?id=248&t=Export_From_Quickreport_To_PDF_And_Other_Formats Raul wrote: On 6/2/2020 12:08 PM, Roy Lambert wrote: >> - what is the dataset recordcount (is it 1 or more) > > That shouldn't matter - if the table is empty then it should start life as Eof (I quite often have that for reports when I've filter the raw data), 1 record or 1000s of records should be handles in the same way. > Roy, Agreed but never seen this fail in general. I'm just curious about edge cases and whether QR code is doing some other navigation (i.e. maybe BOF gets triggered - just wild guess though) >> - are you sure nothing else is moving dataset or re-using the underlying >> query object or such > > This is my bet - its a very long time since I've used QuickReport and its probably changed a lot since then, and I've never used eDocEngine. Worthwhile to check for sure. QR i assume is on main UI thread so we're looking at application.processmessages being called for anything else to even have a chance to touch the query. Raul |
Wed, Jun 3 2020 4:18 AM | Permanent Link |
Ron van Kempen Microloon bv | Update 2
I commented out these lines in the loop and then the job is finishing. 212 records as expected. But empty pages. I think this must be closing this tread, because it shows that the next statement itself is not causing this problem // PrintGroupHeaders; // PrintBeforeControllers; // ParentReport.PrintBand(FDetail); // PrintAfterControllers; Ron van Kempen wrote: Update for my last post: I have a Delphi 7 Application with the same case which runs smoothly. With the same table that recordCount shows also 1 but it processes fine all the 212 records Ron van Kempen wrote: I am pretty sure that the next statement itself can not be the real cause of this situation. > what is the dataset recordcount (is it 1 or more) It is 1(?) but it should be 212 The following information is taken from my Delphi environment: dbisamr448rsdelphiwin3210r.bpl, 4.48.0.4, C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\ I notice a recusive alike processing of the code TQRController.Execute; > TQRController.PrintBeforeControllers > TQRController.Execute; The following advice I received from Gnostice(eDocEngine) "This issue is not related to eDocEngine. Kindly make sure that you are not running infinite loop of DataSet previous and DataSet Next. This may be because when you reach the end of Data Base, you are moving the previous record of data base therefore it is not showing end of database. You can add one more Boolean to check whether you reached end of database before moving to previous . " And my usage of EdocEngine ( QuickReport ) is quite similar as stated in https://www.gnostice.com/nl_article.asp?id=248&t=Export_From_Quickreport_To_PDF_And_Other_Formats Raul wrote: On 6/2/2020 12:08 PM, Roy Lambert wrote: >> - what is the dataset recordcount (is it 1 or more) > > That shouldn't matter - if the table is empty then it should start life as Eof (I quite often have that for reports when I've filter the raw data), 1 record or 1000s of records should be handles in the same way. > Roy, Agreed but never seen this fail in general. I'm just curious about edge cases and whether QR code is doing some other navigation (i.e. maybe BOF gets triggered - just wild guess though) >> - are you sure nothing else is moving dataset or re-using the underlying >> query object or such > > This is my bet - its a very long time since I've used QuickReport and its probably changed a lot since then, and I've never used eDocEngine. Worthwhile to check for sure. QR i assume is on main UI thread so we're looking at application.processmessages being called for anything else to even have a chance to touch the query. Raul |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, March 27, 2024 at 05:29 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |