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 :
Microsoft Dynamics AX (Archived)

How to use multiple condition in IIF expression with two different datasets in SSRS report

(0) ShareShare
ReportReport
Posted on by 145

Hi Team,

My requirement is to add the footer for the packing slip when the Order type is Equipment from data set Sales packing slip header DS than it have to look for condition code (Invent size id = USED) from the Salespacking slip detais DS than the footer should add to the report. 

I added the rectangle box and placed the footer text in the text box inside the rectangle box. Than i added the expression for the rectangle box as -

=IIF(First(Fields!AC_OrderType.Value, "SalesPackingSlipHeaderDS") = "Equipment Order" , false,true) & IIF(First(Fields!InventSizeId.Value, "SalespackingslipdetailsDS") = "USED", False, True)

The first statement is executing but the the second statement is not executing and facing the error as below- 

The Hidden expression for the rectangle ‘R2ForUsedEuipOrder’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.        C:\Program Files (x86)\MSBuild\Microsoft\DynamicsTools\Microsoft.Dynamics.Framework.Design.Reporting.Modeling.targets        466        6        SalesPackingSlipReport

Please suggest

Thanks

Bharath

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Please try the below expression:

    = iif((First(Fields!AC_OrderType.Value, "SalesPackingSlipHeaderDS") = "Equipment Order") AND
          (First(Fields!InventSizeId.Value, "SalespackingslipdetailsDS") = "USED")) ,false , true)


  • Bharath M Profile Picture
    145 on at

    Thanks for the reply Chaitanya, I tried your expression but no luck.

    Error 1 : IIf is invalid. ArgumentsWrong \SSRS Reports\Reports\SalesPackingSlip 0 0 SalesPackingSlipReport

  • Mahesh Holla Profile Picture
    30 on at

    Hi Bharath,

    I have a similar requirement.

    Did you find the solution?

    Thanks,

    Mahesh

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans