Recent

Author Topic: Error on Footer Summary (RxDBGrid)  (Read 2631 times)

zyzmo

  • New Member
  • *
  • Posts: 41
    • My Website
Error on Footer Summary (RxDBGrid)
« on: February 24, 2016, 09:13:25 pm »
Hello!

I have installed the lastest version of lazarus, and now i'm with 'Could not find the requested record' error message on RxDBGrid...

I tried to remove all footers and it works as well...


Please Help me  %)

Seya
<!-- Requirement Engineer -->

zyzmo

  • New Member
  • *
  • Posts: 41
    • My Website
Re: Error on Footer Summary (RxDBGrid)
« Reply #1 on: February 25, 2016, 12:49:37 pm »
I was analyzing the rxdbgrid code and I found a trouble at this line:
Code: Pascal  [Select][+][-]
  1. DHS.RecNo := Min(DHL.RecordCount + SavePos - 1, DHS.RecNo);

I don't know why but, when the Min  value returns 0 the error occurs. So I tried change the parameters but I felt a little insecure about it, then I thought add an if clause like this:

Code: Pascal  [Select][+][-]
  1. if Min(DHL.RecordCount + SavePos - 1, DHS.RecNo) > 0 then
  2.     DHS.RecNo := Min(DHL.RecordCount + SavePos - 1, DHS.RecNo);

Anyway, I think that is necessary to find the root cause of this error.

Seya
<!-- Requirement Engineer -->

alexs75

  • Full Member
  • ***
  • Posts: 112
Re: Error on Footer Summary (RxDBGrid)
« Reply #2 on: February 25, 2016, 01:17:20 pm »
i'm include tou code to RxDBGrid
thx.

 

TinyPortal © 2005-2018