Skip to Content
author's profile photo Former Member
Former Member

Showing Zero if field is null

Hi All,

I have a report having qty fields.I need to show as zero when value is null.

So wrote a formula like this.

@Target Qty:

if is null(qty) and is null(act qty) then 0 else qty * act qty.

I placed this is in detail section and working fine.

Then I created a summary sum(@Target Qty) for this.This also should show as zero when the qty fields are null.

I placed this in report footer .Whenever i kept this in report the @Target Qty which is in detail section is hiding.If i removed summary formula then @Target Qty is showing.

Please suggest what is the problem

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Sep 09, 2013 at 09:50 AM

    Hi Divya,

    So if I understand this correctly, you have a formula (@Target QTY) placed in the Details Section.

    You've then inserted a summary on the formula and placed it on the Report Footer. After the summary is paced on the Report Footer, the formula field on the Details Section disappears?

    Do you have a conditional suppression logic for the field or the section? Are you sure this is what is happening?

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Divya,

      Thank you for attaching the report.

      I tried creating a sample report with a similar formula and for some reason CR does the same thing.

      Honestly, I've never seen something like this before. In the end, I could show the summary using a Manual Running Total.

      So, modify the @qty formula to:

      WhilePrintingRecords;

      numbervar summ;

      if isnull({ScannedDetails.qty}) and isnull({ScannedDetails.manualqty})

      then

      0

      else

      summ := summ + {ScannedDetails.qty}+{ScannedDetails.manualqty};

      Create another formula to show the final sum and place this on the Report Footer:

      WhilePrintingRecords;

      numbervar summ;

      -Abhilash

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.