DSUM just doesn't work even using the example in LO help

I just can’t seem to get DSUM to work. Even when I type in the example in LO Help (ie Distance to school for grade 2) exactly. It just returns 0 instead of the value 1950 indicated in the Help, yet when I load the spreadsheet into Excel it seems to calculate it properly. I am running OSX 10.6 and have tried with both LibreOffice and 4.2 RC1 without success. In case it matters, I have tried it with Java SE 6 (ver 1.6.0_65-b14-462) both turned on and off and restarting LO each time with not success. I would really like to start using LO, so would really appreciate if anyone could shed some light on this issue. Basically, I have a number of working spreadsheets in Excel using this database function and they don’t work in LO. The other thing to mention is that there are several sheets in the spreadsheet and the DSUM formulas are on the third and fourth sheet but note that all references within the DSUM parameter list are to references on the same sheet as the DSUM formula.

Thanks so much.

I tried the sample from Database Functions - LibreOffice Help and Database Functions - LibreOffice Help and it works as suggested. I also tried the “Grade =2” as you posted and it works fine.

I have uploaded the file, see attachment: dsum.png Note!!! This forum does not allow to upload files with *.ods extension, so I did little bit trick and rename the file to “png” extension when uploading to overcome this restriction. So in web browser right click above link and select “Save link” and then save file to disk, rename file to “ods” extension and then open it with LibreOffice. It should be working fine.

There is a reported bug, what I have confirmed yesterday.

Bug reported is for 4.2. I have tested the sample from help on and it works fine.