I have a tricky problem. I have a report that contains information about amounts paid for service and they have a RANumber that's on each line with the amount. Then in the invoice header I am showing a text box with the total values for each of two RANumbers. I am getting the Sum of each of the two RANumbers just fine with:
RA1Sum :=Sum(IIf([NPI]<>1780694984,0,[TotalPaid]))
RA2Sum:=Sum(IIf([NPI]<>1649307471,0,[TotalPaid]))
The NPI field is a constant and unique to each RA
Now the problem: I have another textbox to act as a variable label for each sum. The RANumber has to show for the RA1 and Show the RANumber for RA2. I tried this:
RA1 Label: =IIf([NPI]<>1780694984,"",[RANum])
RA2 Label: =IIf([NPI]<>1649307471,"",[RANum])
This works fine if I only have values for one RANumber in the detail. But as soon as I have 2 then I get the Sum of the values for both, but I only get the label for the first RANumber, but the label for the second does not show up. I hope soomeone can understand what I am trying to do. I am stuck.
RA1Sum :=Sum(IIf([NPI]<>1780694984,0,[TotalPaid]))
RA2Sum:=Sum(IIf([NPI]<>1649307471,0,[TotalPaid]))
The NPI field is a constant and unique to each RA
Now the problem: I have another textbox to act as a variable label for each sum. The RANumber has to show for the RA1 and Show the RANumber for RA2. I tried this:
RA1 Label: =IIf([NPI]<>1780694984,"",[RANum])
RA2 Label: =IIf([NPI]<>1649307471,"",[RANum])
This works fine if I only have values for one RANumber in the detail. But as soon as I have 2 then I get the Sum of the values for both, but I only get the label for the first RANumber, but the label for the second does not show up. I hope soomeone can understand what I am trying to do. I am stuck.