Subtotal in PDF form

Hello,
I need to know how to write a script in PDF form in every column and subtotal.
I use these code but it doesn't work.
var i = 0
var p = $layout.page(ref($))
var d = 0
var qnt = 0.000
for i = 0 upto (Main.table.DataOject.all.length - 1) step 1 do
  d = $layout.page(ref(Main.table.DataObject<i>.POSNR))
  if ( d == p ) then
       Main.table.subtotal.SUBNET  = Main.table.subtotal.SUBNET + Main.table.DataObject<i>.KZWI3
  elseif ( d > p ) then
    break
  endif
endfor

Hello,
the recommended solution is to do this in backend (add a row into the table of rows, add a column which will be hidden in the form, where there will be something like 'X' if the form is a subtotal, based on the 'X' mark you can change the row color for example). Or you can do that in the form using scripting but that is not very friendly.
Regards Otto
p.s.: note there is Adobe forms forum under NetWeaver

Similar Messages

  • FormCalc. Hiding the subtotal footer in PDF form

    Hi, LCD gurus!
    I've got a problem that I'm unable to solve for a couple of days.
    There is a PDF form (consignment note) with header, lots of positions and footer. The original task with it was to make the last position of the data table be on the same page with the form footer.
    I managed to do this by adding second table (consisting of 1 row), placed in subform together with form footer. The last position of the main table was dynamically hidden, it's content was copied to the second table.
    The subform didn't allow page breaks, so my task of placing page breaks before the last position of the form was completed. It was done by Adobe
    Now the only trouble is that it is necessary to have page footers with page total on every page. That's where the problem settled.
    If I create a main table footer (calculating the totals by FormCalc) with checkbox "Include footer in final page", I need to hide it when some positions of the main page are on the same page with the second (one-row) table. Of course, I set up the footer of the second table with the necessary calculations, but it doesn't matter at the moment. The problem is that I can't figure out, where is the "tail" of the main table located until the layout:ready event has come. After that I know the page of any table position, but it's too late to hide the footer - after layout:ready hiding the footer won't lift up the second table and there's an annoying blank line in that case.
    I tried another way - not checking "Include footer in final page". Then the footer on the pre-last page of the document doesn't appear in case this page is last for the main table (and then follows page break and the second table with form footer).
    So, my global question to the form developers is - is it possible somehow to get (at least appoximately) page of form elements BEFORE the layout:ready event?
    Or is it possible to make $.presence = "hidden" of the element after layout:ready and not having blank line instead of it?
    Thanx for your reading this stuff up to this

    Hi Reeha,
    In case you need to use any script you may prefer formCalc script, which is very easy to use. You can use any script out of the two as per your understanding and comfort level.
    If you require more technical information about FormCalc, refer to the Adobe XML Forms Architecture (XFA) Specification, version 2.4, available from:
    [http://partners.adobe.com/public/developer/xml/index_arch.html.]
    and
    [http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf]
    Hope this helps you
    Regards,
    Gaurav Bhardwaj

  • Trouble with Visible/Invisible Fields on PDF Form

    I created a fillable, calculating pdf form in Adobe Acrobat Pro 9, but ran into some issues, so I'm taking a stab at LiveCycle that I've never used before today.  By reviewing sample template forms, I'm able to pick up the tricks of the trade, but I'm struggling with one particular field.  I got it to calculate and the amount shows in the subtotal, but I don't know why I can't get the field itself to show the amount calculated.
    FS1 is a numeric field where a customer puts square footage.
    Based on the square footage a calculation occurs.  Here is the statement:
    topmostSubform.Page1.Total[1]::calculate - (FormCalc, client)
         Total[1] = 208.75
    elseif (FS1 > 3600) then
         Total[1] = 154.30
    elseif (FS1 > 2000) then
         Total[1] - 136.15
    elseif (FS1 > 0) then
         Total[1] = 99.85
    endif
    When I put in 5000 in the FS1 field, 154.30 is added to the subtotal, but no amount shows in Total[1] field.
    Working with properties in Adobe Acrobat Pro 9 was easy, LiveCycle takes a little more getting used to, so any help is appreciated.
    Thank you.
    if (FS1 > 7200) then    

    You may have just pasted your code in a funny way but I noticed your 'if' statement is underneath the rest of your message. Assuming it is in the correct place and you change "Total[1] - 136.15" to "Total[1] = 136.15" it should work. Also just to let you know that in formcalc you can use the "$" to reference the field you are in (so you could use $ instead of Total[1] in your formula).

  • PDF form field calculation help needed

    I need to make some simple calculations on a pdf form and need some help.
    I have a form field for number of guests.
    A field for a set cost for various tickets (there are 3 levels of ticket prices) (I might not need this field).
    A subtotal of the guests attending and ticket price.
    A grand total of the subtotals.
    I can't figure out how to either put in a fixed cost in a form field or input a calculation so that the number of tickets is muliplied by a fixed number and gives me a subtotal.
    Thanks.

    Ok. I finally got the calculations to work. But..... when I save and open in Reader, they don't work. Go back to Pro, they don't work there now either. They also don't show up under the Set Field Order Calculations. To reset them, i have to erase the calculations, save, redo the calculations. Preview the form and everything works — calculations happen and i get a total.
    Adobe Reader usage rights are enabled.
    Why is this so hard?
    I found this thread http://forums.adobe.com/message/1152890#1152890 about it. Is this bug still going on since 2009?
    Ok. Apparently you have to enable reader rights after the form is done. It seems to work now. What a pain.

  • J_3R_INV1_CONTEXT or J_3R_INV1 PDF form need help

    Hello All!
    Help me please!
    When I try to PDF print of PDF form INV-1, the subtotal on first page is incorect. becose qty * prise is incorect. qty = 1 but report do: qty = 1000 & all other data in report is incorect.
    How i can try to correct this?

    First of all sorry of my bad english.
    On Page 1 in table on column 12 qty = 1, on Page 2 in first row (a)
    Write &#1054;&#1044;&#1048;&#1053; (in russian one or 1), in second row (&#1041;) write &#1054;&#1044;&#1053;&#1040; &#1058;&#1067;&#1057;&#1071;&#1063;&#1040; (in russian 1000) but it's incorrect.
    row (&#1042;) = row(a) * price. I need row (B) = 1Price but i have 1000Price.

  • Can I  use excel type functions embedded into an online pdf form, ie Qty x Price= total $

    Can I use excel type functions embedded into an online pdf form, ie Qty x Price= total $

    Let me tell you what I am sure about and what I am not sure about:
    I am sure that I want to be able to sell my products online. The industrial market that I sell to usually do not allow the maintenance people that find me on the web, do not have the ability to use credit cards in a typical shopping cart format due to the higher prices that the equipment I sell costs and that most people call me up to 'request a formal quotation' to give to their purchasing depart. So, my bright idea is to create numerous pdf files with very specific url's to match the very specific items that I sell. (1) item per pdf. I am thinking that the advantage to skipping the shopping cart approach and allowing the customer to fill in the qty of items, which would be mulitpled by the price of the item (a constant #) and then hitting a apply button, that would calculate subtotal price. Discounts for the qty the customer inputs (qty of items inputted by customer would be discounted on a percentage x base price) and a refresh the screen. It would allow for SEO advantages from what I have seen in the past in my very vertical market. All forms would be setup using the same functionality, just images, alt text, urls, and readable text would change.
    What I don't know- which is alot, then how to calculate shipping costs. I have a weight per item, which can be added up. I saw an Adobe blog that allows UPS shipping cost to be programmed in. I don't know how dreamweaver works, which was what the blog mentioned would allow for this updated, instantanious interface with UPS and calculating real shipping costs to a specific zip code. Shipping cost would be fluff to this page. The main thing would be to do allow the customer to be able to fill in a qty of the specific item on the page, calculate a discount if / then type thing, be able to have customer email to purchasing dept or print. I would date stamp it with verbage that pricing is valid for XX days and if I could get a copy emailed to me that would be icing on the cake. I believe that this non static pdf would be something different then the current competion and that it would allow for 100's of quotes to be generated without customers having to wait 15 minutes to an hour for me to process the exact document that they are looking for.
    Hajeks

  • Yesterday, as today's deadline for filing tax returns approached, I was paralyzed by the inability to create new IRS PDF forms and to retrieve archived ones from a year ago. My computer went crazy. 24 hours later, I am still paralyzed. Can you help?

    My computer went crazy yesterday on two occasions involving PDF documents. One dealt with attachments to an email from a bona fide corporation. The other dealt with IRS PDF forms & schedules needed for today's submission.
    As both dealt with PDF and had nothing else in common, I suspected my PC had a virus. When I asked a local store technician, he agreed. I turned to Norton, which protects my PC from viruses, and after a few hours of really thorough searching, the computer was found to have no viruses.
    Before describing what I call "crazy" computer behavior, you need to know that I have long had IE8 as my default browser but a few weeks ago switched to Mozilla Firefox because IE8 had beome incompatible with some websites from which I get information.
    When I received the email from AT&T email service and clicked the first of four icons representing attachments, there was figuratively an explosion on my monitor: a series of new tabs, each called New Tab, burst onto the monitor--but no text or picture. The new tabs appeared faster than I coul kill them. I finally decided just to shut down the computer, hoping they would not reappear when I restarted. I was wrong. After 2 repeats, I decided to forget about the attachments and asked the sender to send them to me by regular mail.
    That was no solution for my IRS PDFs. I wanted to complete filling in the various forms and schedules that I had begun months ago so that I could mail them today to the IRS (without having to copy them all in ink). When I tried to open the first one, BOOM. The same thing happened: the blizzard of New Tabs atop blank pages; my IRS form or schedule did not show up. Did the same shutdown/restart routine with the same results.
    When I looked at the list of current forms that had to be completed, I noticed something very strange: the icons that began the listing of the documents' names were replaced one by one by Mozilla icons. When I moused over them, they said Firefox HTML. Why?
    Starting the day today, I had the same experience. What's more, when I started to retrieve 2012 IRS PDFs from a year ago, the same New Tab tabs appeared and had to be killed, and Mozilla icons replaced whatever icon was there before.
    Assuming that the problem arose with Adobe Reader's reading of the PDFs, I contacted Adobe but got no helpful phone number because PDFs are a free service and was directed to use this Forum to get help.
    What do I have to do to (a) read and use PDFs in the normal way and (b) remove the Mozilla icon from those that have appeared on icon documents. If Mozilla is the source of the problem, shall I go back to IE8? (In my 80s, I want eventually to replace my old computer but for the time being I must continue using it. It will not take an IE9. Anther possible default browser would be Google Chrome, but I have unfavorable impressions of it because of its intrusiveness, loading my PC with stuff I do not need.
    Can you help?

    The problem is absolutely not Reader. The problem is that FireFox has stepped in front of Reader and handles all the PDF stuff - wrongly in your case. FireFox is DESIGNED to take over PDF files. But it is not capable of doing IRS forms!
    To start with go back to IE for these forms. When you save them to disk DO NOT DOUBLE CLICK ON THEM until this is fixed. Just open the in the normal way - start Adobe Reader and use Open from the File menu.

  • Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content?

    Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content? By anyone, I mean someone who can download and use the free Adobe Reader, on either a Mac or PC. I have Acrobat Pro, and would like to be able to create forms that can not only be filled out and printed, but saved and emailed, which is not an option with the forms I have created to date. They can be filled out, but not saved, with Adobe Reader.
    TIA,
    Nancy

    To do what Dave indicated you need to do, it depends on what version of Acrobat you have:
    Acrobat 8: Advanced > Enable Usage Rights in Adobe Reader
    Acrobat 9: Advanced > Extend Features in Adobe Reader
    Acrobat 10: File > Save As > Reader Extended PDF > Enable Additional Features
    Acrobat 11: File > Save as Other > Reader Extended PDF > Enable More Tools (includes form fill-in & save)
    I wonder what it will be next time?

  • I am working in Adobe Acrobat 9 Pro and just created a pdf form from a MS Word document. I need to find out how to have a date field in my form which will update automatically. Can some one out there help me?

    I am working in Adobe Acrobat 9 Pro and just created a pdf form from a MS Word document. I need to find out how to have a date field in my form which will update automatically.

    Update automatically under which circumstances, exactly?

  • I have created a PDF form with field but for some reason I cant type in them

    I have created a PDF form with field but for some reason I cant type in them

    May be that the text fields are read-only.

  • I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. How can I fix this?

    I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. Can I fix this?

    I'm fairly new to this, but I think it has to do with the way you have the drop downs named. Did you copy one then keep pasting it in each field? If so, that is the problem. You should rename each one with a different number: Dropdown1, Dropdown2, etc. I think that might solve the issue.

  • Published pdf form is unable to connect with database

    Hi Guys!
    I have created a PDF form using Adobe Live Cycle Designer which have some text fields namely RECORD and NAME. I have connected this form with a Database. When I enter a record in the RECORD number field the NAME field of this form has been populated with the help of XFA Script which is written on the exit event of the RECORD text field. When we publish this form, a new interactive PDF is created which works fine and populates the NAME field from the an SQL database but when I access this PDF form (which is located on a shared location) from some another location (not on the same machine where i designed this form) it is unable to connect to the database and does not work as expected.
    I think there is some thing i am missing for the database connectivity.
    If any body on this forum can help me out.
    thanks
    Here is the Script for the above form which i used to populate the NAME FIELD on the basis of enetered RECORD number.
    ----- Document.Page1.txt_MRN::exit: - (JavaScript, client) -----------------------------------------
    /* This dropdown list object will populate two columns with data from a data connection.
    sDataConnectionName - name of the data connection to get the data from.  Note the data connection will appear in the Data View.
    sColHiddenValue  - this is the hidden value column of the dropdown.  Specify the table column name used for populating.
    sColDisplayText  - this is the display text column of the dropdown.  Specify the table column name used for populating.
    These variables must be assigned for this script to run correctly.  Replace <value> with the correct value.
    var sDataConnectionName = "DataSource";  // example - var sDataConnectionName = "MyDataConnection";
    var sColHiddenValue  = "RecordNum";   // example - var sColHiddenValue = "MyIndexValue";
    var sColDisplayText  = "Name";   // example - var sColDisplayText = "MyDescription"
    // Search for sourceSet node which matchs the DataConnection name
    var nIndex = 0;
    while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName)
    nIndex++;
    //var oDB = xfa.sourceSet.nodes.item(nIndex);
    var oDB = xfa.sourceSet.nodes.item(nIndex).clone(1);
    oDB.open();
    oDB.first();
    // Search node with the class name "command"
    var nDBIndex = 0;
    while(oDB.nodes.item(nDBIndex).className != "command")
    nDBIndex++;
    // Backup the original settings before assigning BOF and EOF to stay
    var sBOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction");
    var sEOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction");
    oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayBOF", "bofAction");
    oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayEOF", "eofAction");
    // Clear the list
    this.clearItems();
    // Search for the record node with the matching Data Connection name
    nIndex = 0;
    while(xfa.record.nodes.item(nIndex).name != sDataConnectionName)
    nIndex++;
    var oRecord = xfa.record.nodes.item(nIndex);
    // Find the value node
    var oValueNode   = null;
    var oTextNode   =  null;
    var sRecordNum  =  $.rawValue;
    for(var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++)
    if(oRecord.nodes.item(nColIndex).name == sColHiddenValue)
      oValueNode = oRecord.nodes.item(nColIndex);
    else if(oRecord.nodes.item(nColIndex).name == sColDisplayText)
      oTextNode = oRecord.nodes.item(nColIndex);
    var found= 0;
    while(!oDB.isEOF())
    if (oValueNode.value== sRecordNum)
      txt_FirstName.rawValue = oTextNode.value;
      txt_LastName.rawValue = oTextNode.value;
      found = 1;
      break;
      //this.addItem(oTextNode.value, oValueNode.value);
       oDB.next();
       if (found == 0)
        txt_FirstName.rawValue = "";
        txt_LastName.rawValue = "";
    // Restore the original settings
    oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sBOFBackup, "bofAction");
    oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sEOFBackup, "eofAction");
    // Close connection
    oDB.close();

    Finally achived the database connectivity for the published pdf form developed in the Adobe LiveCycle Designer 8.0.
    There must be the same driver version of the DSN on both machines. The machine which published the form and the one accessing it.
    Use the Admin account to add the DSN on both machines.
    Get rid of the error: Connection for Source "DataConnectionName" failed because the environment is not trusted.
    Thanks
    AbdulHafeez

  • Is there any part of a PDF Form that is ignored when digitally signing?

    I'm building a simplified workflow process using PDF forms. Users would add a Submit button to a form that posted to an internal web service, which would add the forms to an internal document system for further processing.
    Part of the process involves subsequent users in the workflow opening the forms and adding additional signatures, then submitted them back into the system.
    I'm trying to find a way to identify PDF forms that have already been submitted vs. new forms that have not been seen before. I'd like to add an internal identifier (flag, ID value, something) to the PDF the first time we see it. But, I need to make sure not to invalidate the existing signatures. I don't want to change any of the form fields, or the visual content, or any other user-facing aspect of the PDF itself; I'm looking more for, say, a custom property, or new keyword, or something.
    Is there any portion of a PDF that does not get considered as "part" of the form when applying and validating the digital signatures?

    Yeah I kinda figured that... Really too bad. Seems lke it should be possible somehow. Anyway, do you all have any suggestions about the best way to combine a static form that is really just text fields and such (that comments and markup tools can be used in) with another page that is sections of narrative that would need to be able to flow?
    Or better yet, a way to draw lines on to a form without using the comment and markup function?
    I like your idea about connecting two forms - but I need to keep the final product as simple as possible. Once the user fills it out, they would be to be able to submit it and it show up as one file, even if that is just a flat file. I don't expect you all to tell me how to do this, but it would be nice to know its possible before I commit to the project and research. Thanks in advance.

  • Send PDF form to e-mail as attachment with a PHP script on the server

    Hi,
    For several days I've been searching though the internet looking for a solution, a quite simple one in my opinion, but I got a little desperate not getting any result I want.
    Okay. The Situation.
    I have a PDF form to order sandwiches and drinks.
    The PDF has serveral area's and columns where customers fill in the amount of the products they would like to order.
    At a position of a field, the kitchen can almost blindly see what products a customer ordered.
    Therefore, when someone fills in the form, I want to send the filled PDF by e-mail to the kitchen's e-mail adress. And important: the PDF in the kitchen's mailbox should be completely identical to the form the customer filled in.
    So, I have an Order button in my form. I set the action as 'Submit a form'.
    In the settings under 'Enter a URL for this link' I used just some PHP mailer script I also use on my website contact form.
    IF I check 'HTML' under 'Export Format' the PHP mailer works fine. I receive an HTML e-mail listed the ordered products.
    BUT
    I do want the original filled PDF in my mailbox instead of an HTML e-mail.
    So, for 'Export Format' I checked 'PDF The Complete Document'.
    But then my PHP mailer script doesn't work anymore.
    It gives errors like 'no valid e-mail adres' , etcetera etcetera.
    Who has a solution?
    Who has a working standard PHP script for me what just sends the kitchen an empty mail with the original PDF as attachment?!
    There is no need to use any database or other more complex functionality. Just mail the filled PDF.

    You can submit whole PDF format as long as you enable usage rights on the PDF.
    Normally Adobe Reader users can only submit the data, XFDF, FDF, XDP, XML.
    To enable usage rights on the PDF you will need to use Adobe Acrobat Std/Pro.
    As for the PHP Script; it depends on your PHP web server capabilities.
    The script will be slightly different, if the server uses PHP Mail or PHP PEAR.
    Just attach the submission to an email and send.
    If the client is submitting the form from a standalone pdf reader app, you can also respond with a success or failure FDF \status message; otherwise, you can redirect to a success / failure URL.
    For more information and online examples:
    http://www.pdfemail.net/examples/

  • My submit button on my PDF form is greyed out (will not work) after posting link to PDF on my WordPress website. It works in Acrobat Reader just fine.

    This is where you can see the form as clicked through to from the WordPress website page:
    http://pinetreeplayers.com/ptp_new/wp-content/uploads/2014/12/submit-a-play.pdf
    The PDF file was created in Acrobat 11, with a submit button. The submit button is actioned to send the form via email. It works perfectly by itself if the form is opened in Acrobat Reader, but once I upload the PDF to my WordPress site the submit button is greyed out, and will not complete the action to send on-click.
    How can I fix this please - can anyone offer advice?

    Yes. They need to download Reader and then disable Google Chrome's internal PDF viewer and enable Adobe Reader.
    FireFox should also be configured to use Adobe Reader and not the internal PDF viewer.
    The internal viewers are created to process PDF documents by not including the features and code to process PDF forms.

Maybe you are looking for

  • Replacing inconsistant spacing with single space in a string

    is it possible to replace multiple spaces within a string with one space only. Number of spaces is different all the time. say one field contains strings with imbedded spaces I need to replace all these values so that there will be only one space bet

  • Can't run Adobe Bridge on my new iMac :(

    I'm the proud owner of a new iMac and used migration assistant to transfer from my old iMac. I noticed I couldn't use the same account name with the new machine so I used a slightly different one and didn't think anymore of it. I downloaded Photoshop

  • Cant see pictures in develop menu!

    I just started using Lightroom and I cant get the pictures that I import to show up in the bottom of the software and everytime I select a picture from ythe catalog tab and try to edit it in the DEVELOP menu it tells me that I have no picture selecte

  • Problem Create object from superclass

    Hi, I have a problem with classes: I have one abstract superclass which has a method to create objecto for its children class. CREATE OBJECT R_FLIGHT TYPE (l_class_name)      EXPORTING        i_sflight = l_sflight. l_class_name: has the name of my ch

  • Problems upgrading from Logic 6.4 to Logic Studio

    I recently had my hard drive die, so i am now in the process of reloading all my software.  I started with Logic 6.4 years ago and have been purchasing the upgrades ever since. I first installed Logic 6.4 with the dongle inserted than i installed Log