Skip to main content
Participating Frequently
October 7, 2010
Question

livecycle orderform subform details and naming rows

  • October 7, 2010
  • 2 replies
  • 1413 views

I am trying to insert data into a pdf for an order form.
The initial form part works fine (PO number, name, company, etc).

I am running onto difficulty populating the subform details though. I have a table wrapped in a subform called "details". The table is called "table1". Then the row with the row data is called "row1".
a) How should I set this up in livecycle for all of the rows to be taken into account?
b) And what should my data for each row look like (I'm using coldfusion)?

for part b) should the data look like this?

pdfDescription: apples

pdfQuantity: 2.0000

pdfDescription: oranges

pdfQuantity: 5.0000

or like this?

pdfDescription1: apples

pdfQuantity1: 2.0000

pdfDescription2: oranges

pdfQuantity2: 5.0000

    This topic has been closed for replies.

    2 replies

    Participating Frequently
    October 14, 2010

    I finally got this to work. I had to set overwritedata=”yes” in coldfusion. That was it. thank you for your help.

    Shawn

    Community Expert
    October 14, 2010

    I'm sorry it took me so long to respond, I didn't have time to look at the PDF this week.

    Dave Watts, CTO, Fig Leaf Software

    http://www.figleaf.com/

    http://training.figleaf.com/

    Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on

    GSA Schedule, and provides the highest caliber vendor-authorized

    instruction at our training centers, online, or onsite.

    Dave Watts, Eidolon LLC
    Community Expert
    October 7, 2010

    My recommendation would be to use CFPDFFORM to read the structure of the form, use CFDUMP to show you that structure, then you can easily address the structure of the form.

    Dave Watts, CTO, Fig Leaf Software

    http://www.figleaf.com/

    http://training.figleaf.com/

    Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on

    GSA Schedule, and provides the highest caliber vendor-authorized

    instruction at our training centers, online, or onsite.

    Dave Watts, Eidolon LLC
    Participating Frequently
    October 7, 2010

    I did this and it looks as I expected. here it is

    my cf code looks like this (in my sample database the are 2 records. only the 1st record is showing in the pdf):

    <cfpdfform source="pdf_templates\pdfOrderTemplate3.pdf"<!--- my template pdf with fields --->
               destination="pdf_templates\Client-Order-Dynamic-#getClientOrder.ClientOrdersID#.pdf" <!--- this will be created --->
               action="populate"
               overwrite="yes"
               >  
    <!---      <cfpdfsubform name="form1">   --->
    <cfpdfsubform name="Page1">
    <cfpdfsubform name="Header">
         <cfpdfformparam name="pdfClientName" value="#getClientOrder.ClientName#" />
         <cfpdfformparam name="pdfOrderDate" value="#getClientOrder.OrderDate#" />
         <cfpdfformparam name="pdfClientCompany" value="#getClientOrder.ClientCompany#" />
         <cfpdfformparam name="pdfBigTotal" value="#grandTotal.BigTotal#" />
        </cfpdfsubform>
       
        <cfpdfsubform name="details">   
        <cfpdfsubform name="Table1">

    <cfloop from="1" to="#getClientOrderDetails.recordCount#" index="i">           
         <cfpdfsubform name="Row1" index = "#i#">
                <cfpdfformparam name="pdfDescription" value="#getClientOrderDetails.ItemDescription#">
                <cfpdfformparam name="pdfQuantity" value="#getClientOrderDetails.ItemQuantity#">
                <cfpdfformparam name="pdfUnitPrice" value="#getClientOrderDetails.ItemUnitPrice#">
                <cfpdfformparam name="pdfItemTotal" value="#getClientOrderDetails.ItemTotal#">
         </cfpdfsubform>
    </cfloop>
                
        </cfpdfsubform>
        </cfpdfsubform>
    </cfpdfsubform>

    </cfpdfform>

    Community Expert
    October 9, 2010

    yes it is....but I do think you're right, something is not aligning between cf and the pdf row fields.

    I could send you the pdf via email for testing/comparing variable names.


    Sure, go ahead. I won't get to look at it today, though.

    Dave Watts, CTO, Fig Leaf Software

    http://www.figleaf.com/

    http://training.figleaf.com/

    Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on

    GSA Schedule, and provides the highest caliber vendor-authorized

    instruction at our training centers, online, or onsite.

    Dave Watts, Eidolon LLC