QuickReport and Oracle ODBC

I have made reports with Delphi 4 Quickreport component and they're  using queries that retrieve data from Oracle 8.0.5 database (ODBC).

One of my reports has a QRDBText control which is bound to Memo (Blob) field. When I preview the report all the data is okay, but if I print it, that field is occasinally populated with totally wrong data and it's repeating (there might be same wrong text in 20 consecutive rows).

However if I save the report, load it and print again then everything is ok.

I'm currently using Oracle ODBC driver version 8.00.57.

Do I need a patch, other ODBC driver version, change some setting(s) or what?

Any help would be greatly appreciated!

LVL 10
Who is Participating?
rwilson032697Connect With a Mentor Commented:
I've seen this before. From memory it had something to do with the fact than after the preview the cursors were at the end of the tables etc.

I think the problem was that the queries needed to be refreshed before doing the actual report (or something like that).


paaskyAuthor Commented:
thanks Raymond, I'll try refreshing and tell you if it works or not.

paaskyAuthor Commented:
rwilson, you were on the right tracks...

I added event for Quickreport component's BeforePrint that closes and reopens the query and after that the report worked like charm.

Thank you.
All Courses

From novice to tech pro — start learning today.