These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

calculation works in Pro but not in Reader

nk
Registered: Jan 21 2008
Posts: 15
Answered

Hi. I have a column of numbers (number of hours) that are summed in the Form > Text Field Properties > Calculate tab using: Value is the sum (+) of the following fields: double.

I have named the text fields in the column sequentially as double.1 to double.10

The auto-calculate works fine in Pro 9.3.3 but when the form is saved with Extend Features in Adobe Reader the calculation doesn't work in Reader 9.3.3.

Please help!

My Product Information:
Acrobat Pro 9.3.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
It should work... However, I would recommend changing your naming scheme, as Acrobat (and Reader) uses the dot notation you've used to create copies of the same field. Try renaming the fields to double1, double2 ... double10.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

nk
Registered: Jan 21 2008
Posts: 15
Hi try67,

Still doesn't work! Sorry new at creating forms and doing calculations.

I tried you suggestion to rename the fields from double.1 to double.10 to double1 to double10. The calculation still doesn't work in Reader only in Pro.

In Reader, I enabled the JavaScript Debugger to Show console on errors and messages.

This shows up:

InitializeFormsTrackerJS is not defined1:App:InitAFDate_FormatEx is not defined1:Field:FormatAFDate_FormatEx is not defined1:Field:FormatAFDate_FormatEx is not defined1:Field:FormatAFDate_FormatEx is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFDate_FormatEx is not defined1:Field:FormatAFDate_FormatEx is not defined1:Field:FormatAFDate_FormatEx is not defined1:Field:FormatAFDate_FormatEx is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFDate_FormatEx is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFDate_FormatEx is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatInitializeMultimediaJS is not defined1:App:Init

I have no idea what this all means and how to correct it.

The strange thing is the form was working fine before in Reader.

Please help!
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
If you are trying to set the format of a field with JavaScirpt, Reader can not use that method. See the Acrobat JS API Reference Quick Bar for that method fo rmore information.

George Kaiser

nk
Registered: Jan 21 2008
Posts: 15
Hi gkaiseril,

I am trying to calculate the sum of numbers (number of hours).

So I just tried creating a very simple form with only four fields:

Time1, Time2, Time3 and Total.

I used the Form > Text Field Properties > Calculate tab using: Value is the sum (+) of the following fields: Time1, Time2, Time3 for Total.This works fine in Pro 9.3.3 but when I save this simple form with Extend Features in Adobe Reader the calculation doesn't work.

The Reader Javascript Debugger shows:

InitializeFormsTrackerJS is not defined1:App:InitAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:FormatAFNumber_Format is not defined1:Field:Format

I set the Text Field Properties for Time1, Time2, Time3, and Total to Number with 2 Decimal Places.

Is there something wrong with Reader?

Please help! Thanks!
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
What is the code for you "Init" document level function?

What other things are you trying to initialize when the PDF is opened?

George Kaiser

nk
Registered: Jan 21 2008
Posts: 15
Hi gkiseril,

Thanks for your patience with this newbie to forms and calculations.

For the very simple test form with only 4 fields, I am not initializing anything.

For the working form, I am setting the name, branch, ID number, classification, hoursofwork for the drop-down box to fill the respective fields. This works fine. The strange thing is this form also has other fields calculated, e.g., HoursWorked but this calculation works fine.

I really only want to sum the number of hours. This works fine in Pro but doesn't work in Reader.

Thanks for your help!
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Maybe you could post the file somewhere? Like acrobat.com or rapidshare.com

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

nk
Registered: Jan 21 2008
Posts: 15
Hi gkaiseril and try67,

I've posted the very simple file (only 4 fields to calculate total) since even this one can't work in Reader but only in Pro) on acrobat.com

https://acrobat.com/#d=--m*Xzis-GCGIG2Feb6zTA


Is there something wrong with Reader?

Thanks for helping this newbie to forms and calculations.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
It looks that the function "AFNumber_Format" that is generally housed in one of the precompiled *.js files in Reader's javascript folder is not available.
Maybe one of the *.js-files (such as JSByteCodeWin.bin) is missing or corrupt.
Try a reinstall of Reader.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

nk
Registered: Jan 21 2008
Posts: 15
Hi radzmar,

I tried uninstalling Reader 9.3.3 and re-installing it, but now the problem is I can't re-install Reader 9.3.3. I get this error message: "Setup had detected that you already have a more functional product installed. Setup will now terminate."

Now I can't see if the form works in Reader only.

Any ideas to install Reader, if I already have Pro.?

Please help. Thanks!
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Ouch! There is something wrong in your system I think.
Propably you will have to remove Acrobat then reinstall Reader and then Acrobat again.

But first check out this articles. Maybe they have another solution for you.
[url]http://forums.adobe.com/thread/506386[/url]
[url]http://kb2.adobe.com/cps/498/cpsid_49880.php[/url]

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

try67
Expert
Registered: Oct 30 2008
Posts: 2398
No, you should not have both Reader and Acrobat on your machine.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

nk
Registered: Jan 21 2008
Posts: 15
Hi radzmar and try67,

The Reader update installed was corrupt. So Reader was uninstalled and could not be reinstalled with Acrobat already installed.

Here is the solution to have both Reader and Acrobat on the same machine. Uninstall both Reader and Acrobat. Install Reader [b]FIRST[/b] -- directly from Adobe. Then install Acrobat. ([b]Do not do it the other way around![/b])

Thanks to you both for your help!

P.S. The coding for the calculation was correct.