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

Notifications

Announcements

No record found.

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

I have the same question (0)
  • 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 45 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans