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

SSRS Visual Studio Expression Logic on a Totals Column

(0) ShareShare
ReportReport
Posted on by 353

Hi -

   I have a total field on my report design. I need to enter a logic on its visibility.

1803.Capture.JPG

I want to have an Iff statement or Swtich statement to decide if I want to Sum the ActualAmount value in Total or not Sum it depending on the paycycleID.

something like this.

IF (Paycycleid == UNION)

{

 =SUM(Fields!ActualAmount.Value) (This should be displayed in Totals Column)

}

OR

IF(Paycycleid ==MGMT)

{

=(Fields!ActualAmount.Value) (Then don't Sum it just display the Actual Amount)

}

*This line of code in my expression doesnot work- I was testing this for a start*

Switch(Fields!PayCycleId.Value = "UNION",Sum(Fields!ActualAmount.Value))

Can anyone please help me write this logic in an Expression (Visual Studio 2013)

Thanks

*This post is locked for comments

I have the same question (0)
  • Muhammad_Ali Profile Picture
    353 on at

    edit - =Switch(Fields!PayCycleId.Value = "UNION",Sum(Fields!ActualAmount.Value),FALSE,true) this line of code works for Union but I cant add in the OR logic for Mgmt.

    This part

    OR

    IF(Paycycleid ==MGMT)

    {

    =(Fields!ActualAmount.Value) (Then don't Sum it just display the Actual Amount)

    }

  • Verified answer
    Muhammad_Ali Profile Picture
    353 on at

    well I figured it out . this piece of code worked for me.

    =IIf(FIELDS!PayCycleId.Value <> "UNION", fields!ActualAmount.Value , sum(fields!ActualAmount.Value))

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

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans