Skip to Content

NumberVar Question

Hello,

I have a formula and it work okay, but if the numbervar is blank I want to display a 0 and not a blank.

Here is the formula:

Shared NumberVar myTotal1:=Sum({SumFromStockData.Quanity});

I am using Shared because I have a sub report that I will be using this.

So I tried this:

if IsNull(myTotal1) then

0;

else

myTotal1;

The error comes up when I check it:

it highlights the first line for myTotal1 saying a Field is required here.

It might be a simply answer but I can't figure it out. Any help would be appreciated.

Thank you,
Gerald

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 27, 2016 at 04:13 PM

    Hi Gerald,

    In the formula editor, look for an option on the top that says 'Exceptions for Nulls'; change that to 'Default Values for Nulls'.

    Next, simply the change the formula to:

    Shared NumberVar myTotal1:=Sum({SumFromStockData.Quanity});


    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.