33.6 Insert Invoice Information

You are now ready to create fields on the invoice image to retrieve desired information for the invoice report. When you print the report, the field values will be correctly positioned on the invoice form. As you complete the steps below, use the figure below as a guide (you can also open the provided example report invoice.rdf in Reports Builder).

Figure 33-4 Invoice report layout

Description of Figure 33-4 follows
Description of "Figure 33-4 Invoice report layout"

To insert the information for the invoice report:

  1. In the Paper Layout view, click the Text tool in the tool palette, then create a boilerplate text object on top of the invoice image, in the area labeled Terms. In the boilerplate text object, type 30 days.

  2. Click the Field tool in the tool palette, and create fields on top of the invoice image, in the following areas:

    • Bill To (one field for each element of the name and address):

      Set Name property to F_FIRST_NAME, Source property to CUST_FIRST_NAME.

      Set Name property to F_LAST_NAME, Source property to CUST_LAST_NAME.

      Set Name property to F_STREET, Source property to C_STREET_ADDRESS.

      Set Name property to F_CITY, Source property to C_CITY.

      Set Name property to F_STATE, Source property to C_STATE_PROVINCE.

      Set Name property to F_POSTAL, Source property to C_POSTAL_CODE.

    • Ship To (one field for each element of the name and address):

      Set Name property to F_FIRST_NAME1, Source property to CUST_FIRST_NAME.

      Set Name property to F_LAST_NAME1, Source property to CUST_LAST_NAME.

      Set Name property to F_STREET1, Source property to C_STREET_ADDRESS.

      Set Name property to F_CITY1, Source property to C_CITY.

      Set Name property to F_STATE1, Source property to C_STATE_PROVINCE.

      Set Name property to F_POSTAL1, Source property to C_POSTAL_CODE.

    • Date: Set Name property to F_TODAY, Source property to Current Date, and Format Mask property to MM/DD/RR.

    • Page: Set Name property to F_PAGE, Source property to Page Number, and Page Numbering property (in the Page Numbering dialog box) to Reset at: R_ORDER.

    • Purchase Order Number: Set Name property to F_ORDER_NO, Source property to ORDER_ID.

    • Sales Order Number: Set Name property to F_ORDER_NO1, Source property to ORDER_ID.

    • Customer Number: Set Name property to F_CUST_NO, Source property to CUSTOMER_ID.

    • Due Date: Set Name property to F_DUE_DAY, Source property to CF_DUE_DATE.

    • Salesperson (2 fields, one for first name, one for last name):

      Set Name property to F_SALES_REP_FNAME, Source property to CUST_FIRST_NAME.

      Set Name property to F_SALES_REP_LNAME, Source property to CUST_LAST_NAME.

    • Customer Contact: (2 fields, one for first name, one for last name):

      Set Name property to F_SALES_REP_FNAME1, Source property to CUST_FIRST_NAME.

      Set Name property to F_SALES_REP_LNAME1, Source property to CUST_LAST_NAME.

      Note:

      This example assumes that the customer contact is same person as the sales representative.

    • Ship Date: Set Name property to F_TODAY1, Source property to Current Date, and Format Mask property to MM/DD/RR.

    • Item No.: Set Name property to F_ITEM_NO, Source property to LINE_ITEM_ID. With the field selected, click the Align Right button in the toolbar.

    • Description (column has no heading): Set Name property to F_ITEM_DESC, Source property to TRANSLATED_DESCRIPTION.

    • Quantity Ordered: Set Name property to F_QUANTITY, Source property to QUANTITY. With the field selected, click the Align Right button in the toolbar.

    • Unit Price: Set Name property to F_UNIT_PRICE, Source property to UNIT_PRICE, and Format Mask property to $NNN,NN0.00. With the field selected, click the Align Right button in the toolbar.

    • Extended Amount: Set Name property to F_ITEM_PRICE, Source property to O_QUANTITY_O_UNIT_PRICE, and Format Mask property to $NNN,NN0.00. With the field selected, click the Align Right button in the toolbar.

    • Subtotal: Set Name property to F_SUB_TOTAL, Source property to CS_SUB_TOTAL.

    • Total: Set Name property to F_TOTAL, Source property to CS_TOTAL.

  3. Click the Frame tool in the tool palette, and draw a frame around the following fields to group them:

    • Bill To: F_FIRST_NAME, F_LAST_NAME, F_STREET, F_CITY, F_STATE, and F_POSTAL. Set the Frame's Name property to M_BILL_TO.

    • Ship To: F_FIRST_NAME1, F_LAST_NAME1, F_STREET1, F_CITY1, F_STATE1, and F_POSTAL1. Set the Frame's Name property to M_SHIP_TO.

    • Salesperson: F_SALES_REP_FNAME and F_SALES_REP_LNAME. Set the Frame's Name property to M_SALES_REP.

    • Customer Contact: F_SALES_REP_FNAME1 and F_SALES_REP_LNAME1. Set the Frame's Name property to M_CUST_CONTACT.

    • Item list: F_ITEM_NO, F_ITEM_DESC, F_QUANTITY, F_UNIT_PRICE, and F_ITEM_PRICE, including all the empty space below these fields to the bottom border of the list area. Set the Frame's Name property to M_ORDER_LIST. This frame is used to position and size the detail item list repeating frame.

    Note: Using a frame ensures that other objects will not be pushed by the variable horizontal size of the name fields.

  4. Click the Repeating Frame tool in the tool palette, and draw a repeating frame around the following fields to group them:

    • Item list: F_ITEM_NO, F_ITEM_DESC, F_QUANTITY, F_UNIT_PRICE, and F_ITEM_PRICE, including just the fields and not the empty space below the fields. Set the Repeating Frame's Name property to R_ORDER_LIST, and the Source property to G_LIST.

  5. Save and run your report. Adjust the position of objects if necessary to fit to the background of the invoice image. Your final report output should look something like this:

Figure 33-5 Final invoice report output

Description of Figure 33-5 follows
Description of "Figure 33-5 Final invoice report output"