Solved

acrobat defaults to 0.00 in sum field

Posted on 2013-06-18
2
776 Views
Last Modified: 2013-06-19
Hi - I'm calculating a SUM from 2 fields - but acrobat is insisting on writing 0.00 as default. I don't see any way to change that behaviour, without deselecting the "sum" radio button and using custom script. Or did I miss something?acrobat issue. Is there an easy script that does both the sum command and a null command?
Maybe something that would add to this?
if(event.value == 0) event.value = "";
0
Comment
Question by:seanpowell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 39259252
Unfortunately, there is no easy solution for this.

You want two different things:
Format the number with two decimals
Hide the output if the result is 0.

In order to combine both, you have to write a script. Open up the properties for your sum field and go to the Format tab, then select a "Custom" formatting and enter the following as the custom format script:

if (event.value == 0)
    event.value = "";
else
    event.value = parseFloat(Math.round(event.value * 100) / 100).toFixed(2);

Open in new window


The condition for the if statement tests if the value is zero, if it's not, then the "else" branch converts the numeric result of the calculation to a number with two decimals.

... and, just in case it's not clear, we are not changing how you calculate the sum, so that stays the same on the "Calculate" tab. The result of the calculation is still 0.00, but we are not displaying that value. If you would use the value of the Sum field in another calculation, the value used would be 0.00 in this case.
0
 
LVL 31

Author Closing Comment

by:seanpowell
ID: 39259327
Solutions don't get much better than that. Thanks khkremer :-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adobe Indesign CS6 4 166
Outlook 2013 and Adobe 3 81
Problems with Adobe Acobate 9 5 175
PRN converter to PDF 4 53
Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe INTRODUCTION This Article is a follow-up to the Article entitled How To Rename-Move a Batch of PDF Files Based o…
This article focuses on how to remove password security from multiple PDF files by Adobe Acrobat program. Sometimes it is essential to access the stored data items and to print, edit as well as copy content from Portable Document Format files in abs…
In this video, we show how to perform Bates Numbering/Stamping of PDF documents using Power PDF Advanced, the newest product from the Document Imaging division of Nuance Communications. There are two editions of Power PDF — Standard and Advanced. Th…
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question