This is the beginning of a small series of articles related to InfoPath 2007, WSS 3.0 and VS .NET 2005 technologies developed by Microsoft. We are going to use as a sample during these articles a simple travel expenses workflow which will help us in pointing out the pluses or the minuses of these technologies.
Introduction:
This is the beginning of a small series of articles related to InfoPath 2007, WSS 3.0 and VS .NET 2005 technologies developed by Microsoft. We are going to use as a sample during these articles a simple travel expenses workflow which will help us in pointing out the pluses or the minuses of these technologies.
Technologies presentation
Microsoft Visual Studio is Microsoft’s flagship software development product for computer programmers. It centers on an integrated development environment which lets programmers create standalone applications, web sites, web applications and web services that run on any platforms supported by Microsoft's .NET Framework (for all versions after Visual Studio 6). Supported platforms include Microsoft Windows servers and workstations, Pocket PC, Smart phones and World Wide Web browsers.
Microsoft SQL Server 2005 is comprehensive, integrated data management and analysis software that enables organizations to reliably manage mission-critical information and confidently run today’s increasingly complex business applications. SQL Server 2005 allows companies to gain greater insight from their business information and achieve faster results for a competitive advantage.
Microsoft InfoPath is an application used to develop XML-based data entry forms. InfoPath can be used to design and publish interactive, user friendly forms templates and to fill out forms that are based on the forms templates.
Windows SharePoint Services (WSS) is the basic SharePoint offering, offering collaboration and document management functionality by means of web portals, by providing a centralized repository for shared documents, as well as browser-based management and administration of them. It allows creation of Document libraries, which are collections of files that can be shared for collaborative editing. SharePoint provides access control and revision control for documents in a library. It also includes a collection of web parts, which are web widgets that can be embedded into web pages to provide certain functionality.
Products installation
I am not going to insist too much on the installation of these products because there are many sites where you can found their setup instructions and of course, these products are shipped with installation instructions. I am however going to show you missing link between InfoPath 2007 and VS .NET 2005 because it is very important and also a very useful component.
Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System also known as “Visual Studio 2005 Tools for Office Second Edition” or just “VSTO 2005 SE” can be found to download at http://www.microsoft.com/downloads/details.aspx?familyid=5E86CAB3-6FD6-4955-B979-E1676DB6B3CB&displaylang=en .
We double click Setup.exe which we downloaded from the above website, we choose Next
and we accept the terms of the License Agreement. It is preferably from time to time to read the License Agreement if you have the time because sometimes you can find out useful information about the product which is not told in any other place.
After clicking Next it appears the screen where you would think you can select the destination folder but it is not entirely true. First time when I installed VSTO 2005 SE I did not pay attention to this but second time it hit me. You can’t choose the location and you can find the reason if you select that here link. All you have to do now is to choose Install and then after all completes well you click Exit.
This is a rather standard setup but the real benefits can be found after you open VS .NET 2005.
Choose File ? New ? Project ? Visual C# ? Office
And there you go you now have the possibility to design an entire InfoPath form right from your favorite IDE, VS .NET 2005. You have to remember that default settings for an InfoPath template are InfoPath 2007 settings. If you want to have an InfoPath 2003 compatible form you’ll have to change the settings manually.
Designing and InfoPath form with Visual Studio .NET 2005
After selecting the InfoPath Form templates location, solution and name you choose OK and new screen is asking you to pick what you want to design.
For a Form Template you have the following options:
- Blank is a form with no data source connection and with no design element on it.
- Web service stands for a form template that uses a Web service to query and submit data.
- Database is used for creation of forms templates that query and submit data to Access or SQL Server database.
- XML or Schema is used for creation of forms templates having XML documents or XML Schema as data sources.
- Connection Library uses a Microsoft Office server for data connection you can use to start your form template. Here the columns of a table from a database are replaced by columns from a document library.
For Template Part you have only two options, Blank and XML or Schema but the interesting part is that you can insert and update a Template Part in multiple forms.
I have chosen for our project a Blank form template which will allow me:
- to design it as I want to,
- to define my own data connections for my business purposes,
- to submit it to any document library or content type I need.
You can see from the image bellow that we can add to the form controls like text or rich text boxes, date pickers, drop-down lists, checkboxes, option buttons, sections (simple section, optional section or repeating section), tables (simple table or repeating tables), hyperlinks, expression boxes, file attachments and of course buttons.
Brief description of the travel expenses workflow
As I said in the beginning the purpose of our small series of articles will not be only to present the technologies but also to create a useful project as closely as possible of a production application. Please have in mind that depending on what company you work in it may be another workflow which travel expenses follow.
Our main scenario is the following. We are working for an IT company and our managers asked us to present them an application which helps them keep track of travel expenses. Developers, consultants, team leader or managers go on business trips/meetings and expenses do appear.
Their expenses must be sent for approval to their superiors. If their superiors agree with the expenses made the financial department is paying the money. If their superiors reject or accepts only a partial amount of the expenses then a bill is issued on the name of the employee with the difference.
During this processes all persons involved will be notified via email.
Also all the data will be stored on a SharePoint document library with the appropriate permissions.
For now that’s all but remember this is just the beginning. In the next article we will speak about Designing InfoPath Forms.
About the Author:
Full Name: Tudose Bogdan Costin
Born: 31st of August 1980
Married and father of a little girl.
Working since 2004 as developer in .NET (both C# and VB .NET, 1.1 and
2.0) with Access and SQL Server as databases. During this period I
also programmed in VBA for Office suite since 97 until 2007.
My latest programming curiosities are concerning InfoPath, SharePoint
and workflow programming.
What I always loved in IT are the databases and this is why I have the
same productivity no matter if it is SQL Server, SyBase, Oracle, MySQL
or any other database.
Useful links:
http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
http://www.microsoft.com/sql/prodinfo/overview/default.mspx
http://office.microsoft.com/en-us/infopath/HA101635771033.aspx
http://en.wikipedia.org/wiki/SharePoint#Windows_SharePoint_Services