Skip to main content
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
    RE: SSRS formula not working : number of arguments is not accessible for any iif

    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? :)

  • Community Member Profile Picture
    on at
    RE: SSRS formula not working : number of arguments is not accessible for any iif

    Hi Partner,

    Can you tell me what app you are using?

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans