Planet PDF Forum Archive

Planet PDF  ForumThe page you are viewing is part of our 160,000 page discussion forum archive. See below for PDF-related discussions spanning 1999-2008. To ask questions and get help, head to the live Planet PDF Forum.


How to search this archive. The quickest way is to use the filters on our Advanced Search page so that only archive pages are included in the results.


Previous | Next | (P-PDF) What's Wrong with my PDF?


Topic: A few different problems
Conf: (P-PDF) What's Wrong with my PDF?, Msg: 140530
From: gkaiseril
Date: 10/5/2005 01:57 AM

>1. The sum from page one is not picking up on page two.

You have to add a calculation for the field to pickup the value from page 1 or place a copy of the field on page 2.

>2. When the form is reset the $0 value remains, which doesn't work if the form is printed and filled out manually.

You are using the built in sum of selected fields to calculate the total. Your total is zero and the built in functions do not suppress the zero result. If you want to suppress the zero result, you need to write a custom calculation script to archive this. A simple document level function could be added to the pdf to perform this calculation. See below.

>3. The first few text boxes on page 2 are not calculating into the sum of the page properly.

Your order for calculation of the form fields needs to be adjusted to the correct order or you could write one calculation script that would do all the extensions and totals. This script could be placed in the grand total field or as a document level script function with a call to the function in the grand total field. If properly constructed this script would only need to be updated when a fields) that is not a simple quantity * price is added.

A document level script to add an array of fields:

function AddArray(aFieldNames)
{
/*
Return the sum of the values of the fields for the field names passed in passed aFieldNames array.
*/
// variable to accumulate sum
var fSum = 0;
// loop through passe field names in passed array
for (i = 0; i < aFieldNames.length; i++)
{
// add only fields with a value not blank
fSum += Number(this.getField(aFieldNames[i]).value);
}
// return sum
return fSum;
}

The page 1 total custom calculation script becomes:

// set field value to sum of array of the following fields
event.value = AddArray (["Text100", "Text103", "Text161", "Text162", "Text163", "Text164", "Text165", "Text166", "Text167", "Text168", "Text169", "Text170", "Text171", "Text172", "Text173", "Text174", "Text176", "Text177", "Text178", "Text179", "Text180", "Text181", "Text182", "Text183", "Text184", "Text185", "Text186", "Text187", "Text188", "Text189", "Text190", "Text191", "Text192", "Text193", "Text194", "Text195", "Text196", "Text197", "Text198", "Text199", "Text200", "Text201", "Text202", "Text203", "Text204", "Text205", "Text206", "Text207", "Text208", "Text209", "Text210", "Text211", "Text212", "Text213", "Text214", "Text215", "Text216", "Text900", "Text98"]);
// suppress zero result
if (event.value == 0) event.value = "";

A similar change would be made to the page 2 total and the total for the beverage order.

PDF In-Depth Free Product Trials Ubiquitous PDF

Pitstop Pro

Now graphic arts professionals have even broader and more expert control over their PDF documents. With...

Download free demo

ARTS PDF Aerialist

The ultimate plug-in for Adobe Acrobat and #1 selling product at PDF Store. Advanced splitting, merging,...

Download free demo

Ubiquitous PDF: Free short film distribution guide released

Nigel Smith, an award-winning producer of short films, has released a free PDF guidebook to help budding filmmakers find wider audiences for their short films.

December 04, 2008
Search Planet PDF
more searching options...




PDF Resources
Platinum Sponsor
Create & Edit PDF - Nitro PDF Software

ARTS PDF

Silver Sponsors

PDF-Tools enfocus

FileOpen PDFNet SDK: PDF Component. Cross-platform PDF library

PDF Converter: Create, Convert PDF to Word/Excel Visual Integrity: Convert, Create, Extract, Merge and Modify PDF

Debenu: Desktop Document Management, Archiving and Tagging Software SmartSoft

Get Nitro PDF Professional
Featured Product

NITRO PDF Professional

Built from the ground up, the perfect desktop PDF product for business and enterprise. Nitro PDF Professional has an uncompromising feature set so you can create, combine, edit, collaborate on and...

Featured Event

No upcoming events

PDF Store Categories