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)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight 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