Senin, 08 November 2021

Multiple If Expression di SSRS

Tutorial if expression di SSRS.

contoh single if di SSRS :

IIF(kondisi parameter, "TRUE","FALSE")
IIF(Fields!Nolines.Value >= 10,"Gede","Kecil")

untuk multiple, return FALSE diisi untuk expressi selanjutnya sampai selesai.

contoh multiple if di SSRS :

=IIF(Fields!Nolines.Value = 1,"Januari",
IIF(Fields!Nolines.Value = 2,"Februari",
IIF(Fields!Nolines.Value = 3,"Maret",
IIF(Fields!Nolines.Value = 4,"April",
IIF(Fields!Nolines.Value = 5,"Mei",
IIF(Fields!Nolines.Value = 6,"Juni",
IIF(Fields!Nolines.Value = 7,"Juli",
IIF(Fields!Nolines.Value = 8,"Agustus",
IIF(Fields!Nolines.Value = 9,"September",
IIF(Fields!Nolines.Value = 10,"Oktober",
IIF(Fields!Nolines.Value = 11,"November",
IIF(Fields!Nolines.Value = 12,"Desember",""))))))))))))

Erorr CS1963 - An expression tree may not contain a dynamic operation.

Kali ini saya mendapatkan erorr dengan code CS1963, padahal sebelumnya saya sudah mendefinisikan 'var item in Model' di @foreach(var...