Add ORDER BY MIN(OrderNo) at runtime cause duplicate records
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
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
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com