Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Add ORDER BY MIN(OrderNo) at runtime cause duplicate records

edited January 2006 in General
Hi,

I create a sample project and attach with this post.

The problem here is, when I programmaticall add ORDER BY MIN(OrderNo),
MIN(Terms),MIN(ItemsTotal), the Preview under Data tab gets duplicate
records (205 records).

I can do some other tests on this sample. Like
1. removing the ORDER BY MIN(xxx) fields in Data tab -> Query Designer's
Sort tab
2. Click OK close the Query Designer.
3. Open Query Designer's Sort tab again, add ORDER BY MIN(OrderNo),
MIN(Terms),MIN(ItemsTotal),
4. Click OK close the Query Designer.
Now the ORDER BY looks the same as before, but the record set has no
duplicate.

Any idea why I am getting this problem?

Bin

Comments

  • edited January 2006
    Hi Bin,

    For future reference, please send all attachments to
    support@digital-metaphors.com.

    Which version of ReportBuilder are you using? Which database/connectivity
    are you using? Instead of placing the calcuated fields in the ORDER BY
    clause, try simply adding the number of the field in the select statement.
    For instance...

    ORDER BY 2, 4, 3.

    If you are able to recreate this using the DBDEMOS database and a simple
    application, please send an example in .zip format to
    support@digital-metaphors.com and I'll take a look at it for you.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.