Wednesday, February 21, 2007

Implementing „Cockpit“ view for InfoPath 2003 based forms

Yes, there are still some InfoPath 2003 based forms in use all over the world. And yes, there are still some requirements to adjust them to business needs.


Wherever it goes, I recommend to go to InfoPath 2007. But sometimes it is too hard due to business requirements (update huge amount of workstations, change forms, user education etc.). I was just involved in one of the projects requiring changes in existing IP03 forms. Sure, InfoPath 2007 is far more extensible as InfoPath 2003, but even with 2003 version you can do amazing things.


The challenge was to design a form with one view for print out (as near to its original paper version as possible) and one simplified – for data entry and editing only (we called it later "Cockpit view"). The benefit of the solution is: the user gets a compact front end for data entry and changes and printed form looks likes the paper version.


So how we did it:

  1. We designed a form with two views and called them "Cockpit" (Default view for the form) and "PrintView" (what should be sent to printer).
  2. "PrintView" implements all the graphics and layout of paper version.
  3. "Cockpit" contains only simplified design with controls for data entry and edit.
  4. Both views are connected via "Data Source" – the field in Cockpit and PrintView have synchronized bindings.
  5. PrintView should be excluded from View menu (uncheck in View properties) – this way the user will see only Cockpit entering or changing data.


  6. Cockpit still can be shown to user and is a default view for the form:




  7. We do not want to get Cockpit view printed, so change the print setting for the view:




  8. Now save and publish.

Sample form available on request.

Enjoy!

No comments: