6 Replies Latest reply on Jan 1, 2016 7:50 AM by disabled_morkus

    Printing zero for summary field?

      I have a summary field that does a Total on a related table and beautifully prints the correct value for wherever I put it on a sub-summary report. Very nice!

       

      The only issue is when there is no related record in the many table. In this case the summary field is just blank. The "hide when" didn't hide the summary field in the one part of the report where it was blank (no Total in the many table).

       

      I don't see a way to set the "show zero" for this type of field so there must be some other trick. Likewise, for a summary field, I didn't see anything useful in "options".

       

      Look forward to hearing back.

       

      Thanks,

       

      - m

        • 1. Re: Printing zero for summary field?
          mikebeargie

          It's impossible to make a summary field type field using a field from another table, so something seems off about your statement.

           

          Do you mean using a calculation field with the sum function? EG:

          Sum( otherTable::number )

           

          Or is your summary field actually IN the other (many) table, and not in the "parent" table of the one-to-many?

           

          If you use the Sum() function in a calculation field in the parent table, there is a checkbox that says "do not evaluate if referenced fields are empty". When you uncheck that box, it will always evaluate the calculation. Thus if there are no related records, zero is returned. See the screenshot I attached showing the bottom of the calculation dialog where the checkbox is.

          • 2. Re: Printing zero for summary field?

            You're right in that the Summary field itself is Total-ing up a field in the current table. But, that field is actually a count of the PK in a related "many" table.

             

            The report works great. It's just the zero that won't display.

             

            Your reply was the key. I unchecked the calculated field that the Total summary field works on and now it's fine.

             

            Thanks very much!!!!

             

            - m

            • 3. Re: Printing zero for summary field?
              keywords

              Why don't you mark Mike's answer as correct, instead of your own response to Mike?

              • 4. Re: Printing zero for summary field?

                I changed the "correct" to his reply from your suggestion, but it was really my answer to his reply that tied it all together.

                 

                You would really need to read both posts to see the "answer", but the forum only allows one "correct".

                 

                Therefore, it was a toss up which post to pick as correct and I didn't give that choice hours of thought (or wonder if someone would have an "issue" with my selection).

                 

                As I hope you noticed, I was very appreciative of his reply and excellent suggestions. I always make it a habit to make sure I thank all involved for the help I receive on this excellent forum.

                 

                Thanks,

                 

                - m

                • 5. Re: Printing zero for summary field?
                  mikebeargie

                  marking "helpful" is the other option. However as I noted, you hadn't provided enough detail originally so nobody could have really given you the correct answer.

                  • 6. Re: Printing zero for summary field?

                    I guess this is one of those "gray" postings -- meaning that I didn't post a complete-enough explanation of what was happening, so you couldn't definitively say what the issue was. However, you narrowed down the choices to the exact cause so your posting was more than helpful, it was (with my follow up posting to confirm what was going on) ... correct.

                     

                    Thanks again. I really appreciate your help.

                     

                    - m