Board index » delphi » preventing repeat records
Steve Anderson
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
preventing repeat records
Hi there,
we have an interesting problem. I want to prevent certain records in a dataset (TQuery) from showing up in a report. I also do not want them to be included in any sum calculations. Adding a field in the database to distinguish these records is not really an option right now, so I'm trying a coding solution. Do you guys have any ideas? I did attempt putting a conditional Next in the AfterScroll event of the TQuery object, but it seemed to corrupt/mixup the dataset pointers because I was getting unexpected results (wrong record skipped and another record repeated). My theory was probably flawed because I was causing event recursion. Anyhow, do you guys know how to do this? Any advice would be appreciated. Thank you, Steve Anderson |