本文介绍了小组总数ssrs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我的sql查询返回 orderhed_pino_c OrderHed_OrderNum OrderDtl_OrderLine calculated_totalsqm 19.0503 50291 1 1.6359 19.0503 50291 1 1.6359 19.0503 50291 2 1.59244 19.0503 50291 2 1.59244 19.0503 50292 1 28.0476 19.0503 50290 1 3.2718 19.0503 50288 1 7.418808 19.0503 50288 1 7.418808 19.0503 50288 1 7.418808 19.0503 50290 3 1 19.0503 50288 1 7.418808 19.0503 50288 1 7.418808 19.0503 50288 1 7.418808 19.0503 50290 4 38.868 19.0503 50288 1 7.418808 19.0503 50288 1 7.418808 19.0503 50288 1 7.418808 在SSRS中我有一个分组来自OrderHed_OrderNum和  OrderDtl_OrderLine 我想为orderhed_ordernum提供total_totalsqm。 但我得到了所有行的总数。 对于orderhed_ordernum = 50291我有两个ord​​erdtl_orderline 1和2所以总数应该是  1.6359 +  1.59244 = 3.22834 但SSRS显示为6.45。 请帮忙解决此问题   解决方案 你能在你的SELECT中添加DISTINCT子句吗? My sql query returnsorderhed_pino_cOrderHed_OrderNumOrderDtl_OrderLinecalculated_totalsqm19.05035029111.635919.05035029111.635919.05035029121.5924419.05035029121.5924419.050350292128.047619.05035029013.271819.05035028817.41880819.05035028817.41880819.05035028817.41880819.0503502903119.05035028817.41880819.05035028817.41880819.05035028817.41880819.050350290438.86819.05035028817.41880819.05035028817.41880819.05035028817.418808In SSRS i have group by OrderHed_OrderNum and OrderDtl_OrderLineI want to have total calculate_totalsqm for for orderhed_ordernum.But i am getting total of all the rows.For orderhed_ordernum = 50291 i have two orderdtl_orderline 1 and 2 so total should be 1.6359 + 1.59244 = 3.22834But SSRS is showing 6.45.Please help to resolve this  解决方案 Can you add DISTINCT clause to your SELECT? 这篇关于小组总数ssrs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-17 22:49