9.5. Print Views

The last topic to cover with views is the use of print views, which enable developers to organize the data that users are modifying in a way that makes it easier to handle, and also print additional information if desired.

Print views can either be displayed or not on the View menu. Creating print views is as easy as creating any other view. After selecting the view to create the print view for, you will design the new view just as you would other views, by dragging and dropping objects on to the form. Then, to use the new print view, you will choose FilePrint just as you would for other applications, but InfoPath will use the print view for the information printed.

9.5.1.

9.5.1.1. Try It Out: Creating Print Views

Using the InfoPath form created during this chapter:

  1. Click the Views task.

  2. Click the Customer Information view in the Views task pane.

  3. Click Create Print View for This View... link. The Create Print View dialog box will appear, displaying the suggested name in the New view field, as shown in Figure 9-23.

    Figure 9.23. Figure 9-23
  4. Click OK to accept the default name. A blank view will be displayed.

  5. Click Data Source.

  6. Design the print view as you desire, showing the data in the form you want. In Figure 9-24, you can see that the tblCustomers fields are displayed in a section with controls, and the tblOrders field in a repeating table format.

  7. Select Views Properties... from the Views task pane. The View Properties dialog box opens.

    Figure 9.24. Figure 9-24
  8. Unselect the check box next to the label Show on the View menu when filling out the form. The dialog box then looks as it does here in Figure 9-25.

    This will cause the view name to not show up on the View menu with the other view choices. Of course, if you are supplying a custom task pane, then you also can leave the choice off the task pane as desired.

    Figure 9.25. Figure 9-25
  9. Click OK.

  10. Click Preview Form. The form is displayed.

  11. Type BOLID in the Customer ID field under the Run Query button.

  12. Click the Run Query button. The customer information for BOLID is displayed.

  13. Choose FilePrint Preview..... The print preview for InfoPath is displayed using the new view, as shown in Figure 9-26.

    Figure 9.26. Figure 9-26
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.250.88