web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • Mahesh Holla Profile Picture
    30 on at
    RE: How to use multiple condition in IIF expression with two different datasets in SSRS report

    Hi Bharath,

    I have a similar requirement.

    Did you find the solution?

    Thanks,

    Mahesh

  • Bharath M Profile Picture
    145 on at
    RE: How to use multiple condition in IIF expression with two different datasets in SSRS report

    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

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: How to use multiple condition in IIF expression with two different datasets in SSRS report

    Hi,

    Please try the below expression:

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


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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans