I am creating an RDLC that interfaces with a SQL server view.
The view returns duplicate invoice items but I eliminate it by using the details grouping of the table.
Now, if I have to find the total invoice amount using sum(), it is calculating the sum of all the fields, including the duplicates.
i.e. Say that the rows are duplicated twice by the view, I display it only once using details grouping in table. Now, I have:
service 1 $240.00
service 2 $100.00
I want the TOTAL to be $340.00
How do I solve it?
As per solution given in this thread, You may need to return one column in dataset using SQL Window function.
Kindly mark the replies as Answers if they help!
Thanks for the reply,
But in my case there are no unique record numbers to get the minimum (as per the thread). The dataset has the same record duplicated many times.
I still have no idea how to solve it. I moved to other things last week but it is time I get this fixed!