Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 (Programmer to Programmer)

In Chapters 2 and 3, you read how both lists and libraries can contain views. A view basically displays the information about a list in different ways. Some views display all the items in the list, while others show specific items based on their properties or metadata values. Every list has at least one view, and SharePoint offers five views: Standard, Datasheet, Calendar, Gantt, and Access. You can customize these SharePoint views to quickly find relevant information. Imagine opening the telephone book and having it display only the numbers that are relevant to you. That’s the type of flexibility you have with a custom view. The following examples guide you through the basics of setting up the views available with SharePoint 2007.

This section goes deeper into what views are. You learn the different types of views as well as how to use them effectively:

Working with the Standard View

Because the Standard view is the most common view type and because it has so many elements that follow, this section details the various elements of the Standard view. You then get an opportunity to create a Standard view in a Try It Out.

Try It Out-Create and Display a Standard View

By sorting, filtering, and grouping the columns of metadata, SharePoint can display the contents of a list in a personalized way, one that is directly relevant to the information you want to see. This is particularly useful when you have lists shared across an organization, or when you have large lists. For this Try It Out, you will sort items in a task list by their due date so that items appear in the order in which they need to be responded. In addition, you create a view for members at the Canadian office, which involves displaying items only where the Corporate Regions column has “Canada” specified.

  1. From your Tasks list toolbar, select Settings Create View (the menu path is shown in Figure 4-1). The Create View window appears.

  2. Select the Standard View option.

  3. Give your view a user-friendly name. For this example, type Canadian Tasks.

  4. You can make your view the default by selecting the check box directly under your view name.

  5. Select a view audience. You may want to make your view personal or share it with other users.

  6. Select the columns you want to display in your view from the Columns section.

  7. You may choose to sort your items by a particular column by selecting up to two columns to sort by from the Sort section, as shown in Figure 4-18.

    Figure 4-18

  8. You can also filter the display of items based on the columns meeting a set of conditions, which you can set in the Filter section. In this example, you are filtering where the Corporate Regions column has a value of “Canada,” (also shown in Figure 4-18). This will ensure that only Canadian items are returned in the view.

  9. You may choose to group your items by a particular column in ascending or descending order by specifying this in the Group by section. In this situation, you will group items by their status.

  10. When tracking things such as numerical data, you may make minor calculations using the Totals section.

  11. Select a view style from the Styles section to control how your data will be presented.

  12. Select whether you want to display items in folders from the Folders section.

  13. You may invoke paging by selecting a maximum number of items to display on one page in the Item Limit section.

  14. SharePoint 2007 enables more accessible list views. If you want to make your view a Mobile view, select it from the Mobile option.

How It Works

Once you create a view, you have two ways to display it:

Setting up a Gantt, Calendar, or Datasheet view

This section deals with setting up three specialized views that SharePoint has to offer:

In addition to showing you how to set up these views, this section also has a Try It Out that shows you how to create a view based on an existing view. This is particularly useful when you have columns that are similar, but with slightly different requirements.

Try It Out-Create a Gantt View

When configuring a Gantt view, you must select a start and end date. Based on this elapsed time and the percentage of the task completed, SharePoint can calculate a graphical representation of how things are progressing. The following steps enable you to get started using the Gantt view:

  1. From your Tasks list toolbar, select Settings Create View (the menu path is shown in Figure 4-1). The Create View window appears.

  2. Select the Gantt View option.

  3. Select your name and other configuration settings as discussed in the “Create and Display a Standard View” Try It Out.

  4. For a Gantt view, you must select a start and end date.

  5. Click OK.

Try It Out-Create a Calendar View

This view allows you to move back and forth between months, add tasks to your calendar, and even connect your calendar to Outlook, a familiar interface for managing calendars. To connect your Calendar view to Outlook, select Connect to Outlook from the Actions menu of your Lists toolbar. Figure 4-21 shows an example of a Calendar view. The following steps walk you through setting up the Calendar view.

  1. From the list toolbar, select Settings Create View (the menu path is shown in Figure 4-1). The Create View window appears.

  2. Select the Calendar View option.

  3. Select your name and other configuration settings as discussed in the “Create and Display a Standard View” Try It Out.

  4. For the Calendar view, you must select a default scope to have your calendar default to a daily, weekly, or monthly view as well as a time interval for adding items to your calendar.

  5. Click OK.

Figure 4-21

Try It Out-Create a Datasheet View

The Datasheet view gives you a spreadsheet view much like Excel, but allows for much easier and faster mass updates and data customization. Figure 4-22 shows the Datasheet view.

Figure 4-22

The following steps will help guide you through creating the Datasheet view.

  1. From your list toolbar, select Settings Create View (the menu path is shown in Figure 4-1). The Create View window appears.

  2. Select the Datasheet View option.

  3. Select your name and other configuration settings as discussed in the “Create and Display a Standard View” Try It Out.

  4. Click OK.

How It Works

After creating and selecting your Datasheet view (see the “Create and Display a Standard View” Try It Out to display the view), you are presented with a spreadsheet-like view of your list’s data. With this spreadsheet, an ActiveX control, you can select multiple columns at the same time and subsequently customize them. This is a big timesaver, particularly if you are dealing with large amounts of list data.

Try It Out-Create a View Based on an Existing View

In some situations, a single list or library may contain multiple views that are similar but have slight differences to meet specific information requirements. Instead of creating each new view from scratch, you can use a particular view as a starting point and slightly alter it to meet your needs.

Each time you add a new view to a list, it appears in the Start from an Existing View section in the Create View window. Selecting one of these views generates a view based on the filtering, sorting, and metadata columns of the existing view. This saves you time and helps you efficiently customize views. By creating a starting point, you can reuse this view to minimize your efforts for all remaining views for the list. You can also think of using this method as a way to give structure because it acts as a template for displaying common components.

The following steps guide you through creating new views based on an existing one:

  1. From the Tasks list toolbar, select Settings Create View (the menu path is shown in Figure 4-1). The Create View window appears, as shown in Figure 4-23.

    Figure 4-23

  2. Below the listed options is the Start from an Existing View heading with any views currently available for your list. Select a task view from which to start building your custom view. For this example, select the Canadian Tasks view.

  3. Select your name and other configuration settings as discussed in the “Create and Display a Standard View” Try It Out.

  4. Click OK.

Working with Access Views

SharePoint 2007 introduces some great new functionality for working with Access. As discussed in Chapter 2, you can now link many of the lists in SharePoint to an Access database. This makes offline data available and allows you to synchronize data. In addition, Access provides reports and forms that are not available using a browser. By creating an Access view for a list, you gain all the advantages of Access’s reporting functionality and you also have information stored in a central secured online store such as SharePoint.

Try It Out-Create an Access View for a List

In this example, you give the interface that displays your SharePoint lists more flexibility and options by creating an Access view. To do so, you export data from the list to an Access database, which creates a more advanced view for entering and updating the data. This example uses the Split Form view so that users can see details of selected individual records as well as update items by simply typing into the datasheet.

  1. From your Contacts list toolbar, select Settings Create View (the menu path is shown in Figure 4-1). The Create View window appears, as shown previously in Figure 4-23.

  2. From the list of view choices, select Access View. A dialog box appears, as shown in Figure 4-24.

    Figure 4-24

  3. Select a file name, browse to the location where you want to store the Access information, and click Save. The Create Access View window appears, shown in Figure 4-25, requiring information on the type of view that you want to create for your list. You have a variety of options.

    Figure 4-25

  4. Select a view type. This example uses the Split Form view. Click OK. An Access view opens with a single item list view form and a Datasheet view. You can enter data into the Datasheet view or Form view.

  5. When you finish entering or viewing your data, click the Publish to SharePoint Site button just below the top menu bar of the Access application, as shown in Figure 4-26. If this is your first time saving the Access database back to SharePoint, you are requested to identify a save location for the database.

    Figure 4-26

How It Works

Once you complete your edits, a copy of your Access database is saved back to the SharePoint site so that other users can access the created views and reports.

Категории