Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9178261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:30:38+00:00 2026-06-17T17:30:38+00:00

Okay so I am trying to do math in this IIF statement in reportviewer.

  • 0

Okay so I am trying to do math in this IIF statement in reportviewer. However, all it does is return FALSE in my field. Am I able to do math with an IIF statement or what?

=IIF(
     UCase(Fields!Tax.Value) = "YES", 
     Variables!DeptTotal.Value =+(Fields!TotalPriceWithoutTax.Value * (1 + Parameters!Tax.Value)), 
     Variables!DeptTotal.Value =+ (Fields!TotalPriceWithoutTax.Value)
     )

Any Ideas? Thanks in advance.

EDIT:

Okay Guys,

I even did a custom codes and it still returns false.

Public Function Taxable(Answer AS String, DepartTotal AS Decimal, TotalWithoutTax AS Decimal, Tax AS Decimal) AS Decimal

    If UCase(Answer) = "YES" Then

         DepartTotal += TotalWithoutTax * Tax 

    Else

       DepartTotal +=  TotalWithoutTax

    End If

    Return DepartTotal

End Function

Any other sugguestions?

Thanks Again.

EDIT:

This is my taxable function call:

=Code.Taxable(Tax, DepartTotal, TotalWithoutTax, txtTax.value)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:30:39+00:00Added an answer on June 17, 2026 at 5:30 pm

    This is the fix:

    The function:

    Public Function Taxable(Answer AS String, TotalWithoutTax AS Decimal, Tax AS Decimal) AS Decimal
    
           Dim total AS Decimal = 0
    
           If UCase(Answer) = "YES" Then
    
                 total = TotalWithoutTax *  (1 + Tax)
    
            Else
                 total = TotalWithoutTax
    
            End If
    
            Return total
    
    End Function
    

    The Call:

    Code.Taxable(Fields!Tax.Value, Sum(Fields!TotalPriceWithoutTax.Value), Parameters!Tax.Value)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay I been trying to work this out but unable too. I have a
okay i have been trying to understand this for hours i am learning VB
Okay I am trying to make minecraft mods using eclipse. I used this video
Okay so I have been trying to get into IoC lately. However, I keep
Okay I've been trying to research how to do this and have failed. I
Okay I've been trying to figure this out for a while now. I have
Okay I've been trying at this for about 2-3 hours now and I don't
Okay I've spent the last hour trying to find a solution to this but
Okay, so I'm trying to set a variable via a javascript method call. However
Okay, so Im trying to replace a line like this 00010 (0x000A) with something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.