Base report sorts incorrectly

I have a database that I’ve used for several years, and a report that used to work (prior versions of both OpenOffice.org and LibreOffice.org).

Now with 4.1 it works correctly for about the first 207 pages, and then starts showing the data in apparently random order. The query it was based on shows everything correctly; it’s just the report that has the wrong order.

Unfortunately, having installed the new version of LibreOffice (and deleted the old one) I’m having problems getting an old version reinstalled to make my report usable again.

Are there any known bugs in sorting database reports based on queries?

Thanks.