Hi I have some Issues with an expression that should be working but its instead outputting an empty result and I'm sure it should be working because it actually works for 1 of the 4 tables I'm printing on the report but not for the other 3.
the expression is the following:
=IIf(Fields.BankMovementType = "TRANSFER", Exec("table1",Sum(NetPayment)),"")
which makes use of this calculated field:
NetPayment (Double) =IIf(Fields.BankMovementType = "TRANSFER", (Fields.Perception - Fields.Deduction),0)
this actually gives me a sumatory of the NetPayment for all the "TRANSFER" movement types and leaves out the rest of the movement types, now I have tested this Expression multiple times and it works perfectly, however it only seems to be calculating for the "TRANSFER" movement type, in one table only.
the other tables for the different forms of payment use the exact same formula, the only thing that changes is the condition:
=IIf(Fields.BankMovementType = "EFFECTIVE", Exec("table5",Sum(NetPayment)),"")
NetPayment (Double) =IIf(Fields.BankMovementType = "EFFECTIVE", (Fields.Perception - Fields.Deduction),0)
however this time around the field that is supposed to contain the sumatory is completely empty and I simply don't understand how this is possible, I know the parameter and the settings for the tables are exactly the same as I just copied and pasted the table and simply changed the condition for each different table.
I have also tried changing the expression to something like:
=IIf(Fields.BankMovementType = "EFFECTIVE", Exec("table4",IIF(NetPayment > 0,Sum(NetPayment),"")),"")
but it still shows empty and I just simply don't understand what is wrong with it, it doesn't even give any errors, it just simply doesn't do what its supposed to do...
I have attached images of the resulting tables to better understand what I'm trying to say, the first one is from the table that actually works and the second one is form the one that doesn't do its job. The final image is a picture of how they are structured on the designer.