web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Unanswered

SSRS formula not working : number of arguments is not accessible for any iif

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have this rdl formula that I made and tried to rebuilt again and again but I keep on getting an error saying there too many arguments in it for one iif statement. Does anybody over here notice what is wrong:

Interesting enough this one gives the error:

=IIF(Sum(Fields!totallineitemamountValue.Value, "DSMainHeader") <= 0
,""
,
iif(First(Fields!wvdb_directdebitValue.Value, "DSMainHeader") = false
,
iif(Sum(Fields!LE_a3dab734625bea315c9a57b87486dd44_wvdb_correspondencelanguageValue.Value, "DSMainHeader")) = "899250001"
,
iif(cdate(Parameters!HLBDate.Value)>Cdate(First(Fields!wvdb_printedonValue.Value, "DSMainHeader")) and CDATE(First(Fields!wvdb_printedonValue.Value, "DSMainHeader"))>cdate(Parameters!Date.Value)
,
First(Fields!LE_6025318c5699bdbae794ee0908a6cde6_wvdb_bankaccountinformationenglish.Value, "DSMainHeader") &" "& First(Fields!psa_bankaccountnumber.Value, "DSMainHeader") &" / "& First(Fields!psa_bankidentificationcode.Value, "DSMainHeader"),
First(Fields!LE_6025318c5699bdbae794ee0908a6cde6_wvdb_bankaccountinformationenglish.Value, "DSMainHeader") &" "& First(Fields!wvdb_hlb_bank.Value, "DSMainHeader") &" / "& First(Fields!wvdb_hlb_bic.Value, "DSMainHeader")),
iif(cdate(Parameters!HLBDate.Value)>Cdate(First(Fields!wvdb_printedonValue.Value, "DSMainHeader")) and CDATE(First(Fields!wvdb_printedonValue.Value, "DSMainHeader"))>cdate(Parameters!Date.Value)
,
First(Fields!LE_6025318c5699bdbae794ee0908a6cde6_wvdb_bankaccountinformationdutch.Value, "DSMainHeader") &" "& First(Fields!psa_bankaccountnumber.Value, "DSMainHeader") &" / "& First(Fields!psa_bankidentificationcode.Value, "DSMainHeader"),
First(Fields!LE_6025318c5699bdbae794ee0908a6cde6_wvdb_bankaccountinformationdutch.Value, "DSMainHeader") &" "& First(Fields!wvdb_hlb_bank.Value, "DSMainHeader") &" / "& First(Fields!wvdb_hlb_bic.Value, "DSMainHeader"))
,
iif(Sum(Fields!LE_a3dab734625bea315c9a57b87486dd44_wvdb_correspondencelanguageValue.Value, "DSMainHeader")) = "899250001",
"This invoice is collected by direct debit authorization.",
"Deze factuur wordt automatisch geïncasseerd."))

but this one is working, however it's not suitable for the ssrs header as it doesn't refer to a specific dataset:

=IIF(Fields!totallineitemamountValue.Value <= 0
,""
,
iif(Fields!wvdb_directdebitValue.Value = False
,
iif(Fields!LE_a3dab734625bea315c9a57b87486dd44_wvdb_correspondencelanguageValue.Value = "899250001"
,
iif(cdate(Parameters!HLBDate.Value)>Cdate(First(Fields!wvdb_printedonValue.Value, "DSMain")) and CDATE(First(Fields!wvdb_printedonValue.Value, "DSMain"))>cdate(Parameters!Date.Value)
,
Fields!LE_6025318c5699bdbae794ee0908a6cde6_wvdb_bankaccountinformationenglish.Value &" "& Fields!psa_bankaccountnumber.Value &" / "& Fields!psa_bankidentificationcode.Value,
Fields!LE_6025318c5699bdbae794ee0908a6cde6_wvdb_bankaccountinformationenglish.Value &" "& Fields!wvdb_hlb_bank.Value &" / "& Fields!wvdb_hlb_bic.Value),
iif(cdate(Parameters!HLBDate.Value)>Cdate(First(Fields!wvdb_printedonValue.Value, "DSMain")) and CDATE(First(Fields!wvdb_printedonValue.Value, "DSMain"))>cdate(Parameters!Date.Value)
,
Fields!LE_6025318c5699bdbae794ee0908a6cde6_wvdb_bankaccountinformationdutch.Value &" "& Fields!psa_bankaccountnumber.Value &" / "& Fields!psa_bankidentificationcode.Value,
Fields!LE_6025318c5699bdbae794ee0908a6cde6_wvdb_bankaccountinformationdutch.Value &" "& Fields!wvdb_hlb_bank.Value &" / "& Fields!wvdb_hlb_bic.Value))
,
iif(Fields!LE_a3dab734625bea315c9a57b87486dd44_wvdb_correspondencelanguageValue.Value = "899250001",
"This invoice is collected by direct debit authorization.",
"Deze factuur wordt automatisch geïncasseerd.")))

Do you see where I am going wrong? Thanks a lot for your help

  • Community Member Profile Picture
    on at

    Hi Partner,

    Can you tell me what app you are using?

  • Community Member Profile Picture
    on at

    Hi I am building the report on Visual studio 2015, Report is supposed to get uploaded in Dynamics 365 CE. Does this answer your question? :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 42

#2
11manish Profile Picture

11manish 31 Super User 2026 Season 2

#3
Travis South Profile Picture

Travis South 25

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans