Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
heyy..

I am using the SSRS report , in that I want expression to calculate a column(bill Amount) with a condition

here is the condition
----------------------

1. if the bill number field (column wise) value are same then the same bill amount

2. if the bill number field (column wise) value are different then sum(bill amount)

eg:

itemCode   bill number   Amount    billAmount
 01           1            10        50
 02           1            40        50
 03           2            30        30

Total                      80        80



I want Bill amount result is 80 ..because the bill number are same(50), so take one bill amount and add with other bill amount(30)



I wrote an expression ,but it won't work...


=IIF(Fields!BillNumber.Value = Previous(Fields!BillNumber.Value),Fields!BillAmount.Value,Sum(Fields!BillAmount.Value))



Is any idea..???
Posted
Updated 11-Nov-19 7:59am
v3

1 solution

=SUM(VAL(IIf((Fields!مدين.Value-Fields!دائن.Value+Fields!رصيد_اول_المدة.Value)<0,(Fields!مدين.Value-Fields!دائن.Value+Fields!رصيد_اول_المدة.Value),0)))

its working for me ......... Try it
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900