lab environmentdownload.microsoft.com/download/6/d/c/6dc7ba75-ebfc-4e2… · web viewseveral...

40
Introduction to Access Services 2010 Hands-on Lab Released:

Upload: others

Post on 24-Jan-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010

Hands-on Lab

Released:

Page 2: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Terms of UseThis document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

© 2011 Microsoft Corporation. All rights reserved.

This document reflects current views and assumptions as of the date of development and is subject to change.  Actual and future results and trends may differ materially from any forward-looking statements.  Microsoft assumes no responsibility for errors or omissions in the materials. 

THIS DOCUMENT IS FOR INFORMATIONAL AND TRAINING PURPOSES ONLY AND IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

2 © 2023 Microsoft Corporation. All rights reserved.

Page 3: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

About the AuthorAuthor: Ravi VridhagiriBio: As Chief Technology Officer for OnTerra Systems, Ravi Vridhagiri

is responsible for development of OnTerra’s new product offerings, and plays a prime role in OnTerra’s technology consulting commissions. He is a Microsoft-certified Technology Specialist in SharePoint application development – with more than 12 years of experience in various technology solution design and project implementations. He has extensive experience in Microsoft technologies, specifically Microsoft SharePoint, Microsoft C#, .NET, and more. He also is a certified Project Management Professional (PMP).

Mr. Vridhagiri earned a Bachelor of Science in Mechanical Engineering from the University of Madras in India in 1999. He went on to earn a Master’s of Business Administration (with specializations in Management of Information Systems and Finance) from the Rutgers University Business School in 2009.

Page 4: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Contents

Lab Environment................................................................................................................................................................ 1

Lab Overview........................................................................................................................................................................2

Exercise 1: Creating your first Access Web Database.........................................................................................3

Exercise 2: Access Services as a RAD Tool...............................................................................................................7

Exercise 3: Macros...........................................................................................................................................................17

Exercise 4: Creating Web Reports with Access Services................................................................................25

Appendix.............................................................................................................................................................................. 33

4 © 2023 Microsoft Corporation. All rights reserved.

Page 5: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Lab EnvironmentDuring this lab, you will work in a simulated environment with the following computers or virtual machines.

Computers and Virtual Machines Used in This Lab

Icon Computer Name Description

DEMO2010AThis computer is configured as a stand-alone server running Windows Server 2008 with SharePoint Server 2010, SQL Server and Visual Studio 2010.

Logon Credentials

The lab environment might require you to log on to the Hands-on Lab Environment using the following credentials, unless specified differently throughout the lab manual.

Username PasswordAdministrator pass@word1

1 Microsoft Confidential - For Internal Use Only

Page 6: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Lab OverviewAbstract

Access Services is a service application available in Microsoft SharePoint Server 2010 that allows users to edit, update, and create linked Microsoft Access 2010 databases that can be viewed and manipulated by using an internet browser, the Access client, or a linked HTML page.

During this lab, you will perform several exercises to achieve a better understanding of the capabilities and functionality of Access Services in SharePoint 2010.

You will start with basic exercises of understanding Microsoft Access as a SharePoint service application and create basic web databases.

You will then use Access as a rapid application development (RAD) tool to create business applications, publish them as web databases to SharePoint, and collaborate with other users. You will also work with macros to create simple business rules.

By the end of these series you will have designed reports and presented rolled-up data from the web database as reports within a SharePoint site.

Learning Objectives

After completing the exercises in this lab, you will be able to:

Create a Web database using Microsoft Access and host it in a SharePoint site

Use Access 2010 as a rapid application development (RAD) tool to create web applications and deliver it via SharePoint.

Use macros to attach application logic and business rules to the web database and to the Access applications.

Create and publish reports.

Estimated time to complete this lab: 150 minutes

2 © 2023 Microsoft Corporation. All rights reserved.

Page 7: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Exercise 1: Creating your first Access Web DatabaseScenarioIn this exercise you will be introduced to Access Services and the concepts of Web databases that integrate with SharePoint 2010. You will create a basic Web database and publish it to SharePoint Access Services. You will also provision the permissions and security to allow users to interact and collaborate with the web database.

You will learn how to implement a Conditional Split data transformation that allows you to split input data based on conditional expressions and load the data into multiple destinations.

After completing this exercise, you will understand:

How to create a Web database using Access 2010

How to publish the Web database to SharePoint and share it with other users.

How to configure the security of the Web database.

Task Detailed Steps

Complete these steps by connecting to the computer DEMO2010A.

Launch Access 2010 and create a Web database

1. Click Start | All Programs | Microsoft Office | Microsoft Access 2010 menu.

2. From the File menu, under New, select Blank Web Database from the list of Available Templates.

3. Under File Name, type OrdersManagement and select a path to save the database to:

3 Microsoft Confidential - For Internal Use Only

Page 8: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

4. Click the Create button. The new database will be created.

Create tables and load data

There are several ways to add Tables to an Access database:

1. Import Tables and Data

2. Create Tables (using Access designer or Query)

You can import a table from another Access database, an Excel workbook, a SharePoint list, or from other ODBC sources (such as SQL Server). In this exercise, you will create a table using Transact-SQL commands.

5. On the ribbon, click the Create tab.

6. Under Client Queries, select Query Design:

7. Close the Show Table dialog box.

8. Right-click the query window and select SQL View:

.

9. Copy and paste the following SQL command into the query editor:

CREATE TABLE Products(ID int PRIMARY KEY,ProductName CHAR(25),

4 © 2023 Microsoft Corporation. All rights reserved.

Page 9: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed Steps

ProductDescription CHAR(100),Quantity Integer,CostPerUnit Currency);

10. Click the Run button to execute the SQL Commands:

11. The Products table is created.

12. Close the query window. If prompted to save, click No.

Create a user interface 13. You need to create a form (User Interface) for the users to interact with the "Products" table. To create the form, select the Products table. On the ribbon, on the Create tab, click Form:

14. A default form is created. This form will have all the fields in the Products table.

15. Click the Save button to save this form. Type ProductsForm in the Save As dialog box, and then click OK:

Set up the default forms for the

16. On the File Tab, click Options.

5 Microsoft Confidential - For Internal Use Only

Page 10: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Stepsdatabase

A default form is the one that is displayed in the landing page of the SharePoint site hosting the database.

17. From the list of available options in the left pane, select Current Database.

18. Under Application Options, set the Display Form and Web Display Form to ProductsForm. Click OK

Publish the database to the SharePoint site

19. On the File tab, click Publish to Access Services:

20. Type http://intranet.contoso.com as the Server URL.

21. Type OrdersManagement as the Site Name:

22. Click the Publish to Access Services button.

23. The Access database is published to SharePoint.

24. Open an Internet Explorer browser window and navigate to http://intranet.contoso.com/OrdersManagement, the Access Web database site.

Test the Web database

25. The Access Web database is created, and you should see the Products table and the Products form. You can now create, retrieve, update and delete records in the Products table.

6 © 2023 Microsoft Corporation. All rights reserved.

Page 11: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Exercise 2: Access Services as a RAD ToolScenarioIn this exercise you will explore the new Access engine and designer for creating declarative macro logic and table-based events to build useful codeless applications that run on both the client and server. You will create a simple forms-based application and attach application logic and business rules.

After completing this exercise, you will be able to:

Create applications using Access

Create forms for Access applications

Create business rules and application logic

Task Detailed Steps

Complete these steps by connecting to the computer DEMO2010A

Create the Sales Person Table

The Sales Person Table, as the name suggests, contains information about sales people. In this scenario, every order that is placed is assumed to be sold by a sales person. Sales person information is stored in a separate table and is linked to the Order table through a look-up.

1. In Access 2010, on the ribbon, click the Create tab.

2. Under Client Queries, select Query Design:

3. Close the Show Table dialog box.

4. Right-click query window and select SQL View.

5. Copy and paste the following SQL command and execute it to create the SalesPerson table:

CREATE TABLE SalesPerson(ID int PRIMARY KEY,SalesPersonName char(25),SalesPersonAddress char(100)

7 Microsoft Confidential - For Internal Use Only

Page 12: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

);

Create the Orders table

The Orders table, as the name suggests, contains order information. In our scenario every order that is placed is for one type of product. The products are stored in the Products table.

6. On the ribbon, click the Create tab.

7. Click Table:

8. Click Click to Add, and then click Text:

9. Type CustomerName as the column name:

Note: the first column [ID] is the primary key. Retain this column as it is.

10. Similarly, create the second column CustomerAddress of type Text.

11. Click Click to Add, and then click Lookup & Relationship:

8 © 2023 Microsoft Corporation. All rights reserved.

Page 13: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed Steps

a. In the Lookup wizard, select I want to lookup a field to get the values from another table. Click Next.

b. Select Products. Click Next.

c. From the Available Fields, select ProductName and click the button to move ProductName to Selected Fields. Click Next.

d. Select ProductName in the first drop-down. Click Next.

e. Click Next.

f. For the lookup field name, type ProductOrdered. Leave the checkboxes Enable Data Integrity and Allow Multiple Values unchecked.

g. Click Finish.

12. Click Click to Add, and create the fourth column OrderQuantity of type Number.

13. In the same way that you created the look-up to the Products table, create a look-up to the Sales Person table. Set the name of this column to SalesPerson.

14. Click Click to Add, and then click Lookup & Relationship.

15. In the Lookup wizard, select I will type in the values that I want, and then click Next:

9 Microsoft Confidential - For Internal Use Only

Page 14: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps16. Set the Number of columns to 1, and add Order Placed, Order Processed and

Order Shipped as row items to the list:

Click Next.

17. Set the name of the field to OrderStatus. Leave the checkboxes Limit To List and Allow Multiple Values unchecked.

18. Click Finish.

19. Set the default value to Order Placed.

Design the navigation form

20. On the ribbon, click the Create tab.

21. Under Navigation, select Horizontal Tabs:

22. Click on the header (Title) and change the text Navigation Form to Order Management System:

23. Save this form as NavigationForm.

Design the landing page form.

24. On the ribbon, click the Create tab, and then click Blank Form:

25. A new blank form will open up in Designer. This form will be the landing page for the web database.

10 © 2023 Microsoft Corporation. All rights reserved.

Page 15: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed Steps26. From the Design tab on the ribbon, add a Label control to this form.

27. Type "WELCOME TO CONTOSO'S ORDER MANAGEMENT SYSTEM". You can set the font size and formatting from the Label's Properties

28. Save this form as SplashForm:

Create the Orders, Products and Sales Person forms

29. On the left pane, in the All Access objects section, under Tables, select the Orders table.

30. On the ribbon, on the Create tab, click Form. This will create a new form with the fields from the Orders Table. Save this form as OrdersForm.

31. Similarly, create a form named ProductsForm from the Products table and a form named SalesPersonForm from the SalesPersons table.

Finalize the Web user interface

32. On the left pane, right-click NavigationForm and select Layout View.

33. Drag each form from the left pane (under Forms) to the Tabs section of the NavigationForm:

34. Change the text in the tabs to display as follows:

35. Save the NavigationForm.

36. As explained in Exercise 1, set the Web Display Form to NavigationForm.

37. Save the database.

38. Click the Sync button to sync up the changes to the already published Web database.

39. Open an Internet Explorer browser window and navigate to the OrdersManagement Access Web database. View and test the Web forms.

Create business rules

40. On the left pane, under Forms, right-click OrdersForm and then click Layout View:

11 Microsoft Confidential - For Internal Use Only

Page 16: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

Rule 1: A single order cannot exceed 5 quantities of any product

41. Right-click the textbox OrderQuantity and then click Properties.

42. In the Property Sheet, click the Event tab:

43. Click the field After Update. Click on the button next to the drop-down menu button. This will launch the Macro Tools and the Macro designer:

44. From the drop-down list, select the IF condition and set the condition to [QuantityOrdered]>5:

45. From the Add New Action drop-down list, select Messagebox.

46. Type You cannot order more than 5 items in a single order as the message.

12 © 2023 Microsoft Corporation. All rights reserved.

Page 17: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed StepsThe macro logic block should resemble the following:

47. From the Add New Action drop-down list, select GoToControl:

48. Type QuantityOrdered as the Control Name:

49. The completed macro should resemble the following:

50. Save and Close the macro.

NOTE: The steps 51 to 62 are Optional

Rule 2: Users should not be able to delete any records from the Orders form

51. From the Property Sheet, select Form from the drop-down list.

52. Select the Data tab.

53. Set Allow Deletions to No:

13 Microsoft Confidential - For Internal Use Only

Page 18: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

54. Save the form.

Rule 3: Once the order is placed, only the Order Status can be changed.

An order is placed when the ID (The primary key field) is a valid number. By checking the value of the ID, we can determine if the form is in "Insert Mode" or in "Edit Mode".

If the Form is in Edit Mode, we need to disable all but the "Order Status" fields

55. From the Property Sheet, select Form from the drop-down list

56. Select the Event tab.

57. Click the field On Current. Click on the button next to the drop-down button. This will launch the Macro Tools:

58. Add an IF condition to check for [ID]>0.

59. Add 6 SetProperty actions.

60. As shown in the figure below, set the Enabled property of the OrderStatus control to true, and set the Enabled property of every other control to false:

14 © 2023 Microsoft Corporation. All rights reserved.

Page 19: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed Steps

61. Insert an Else Block. Set the Enabled property of the OrderStatus control to false, and set the Enabled property of every other control to true:

15 Microsoft Confidential - For Internal Use Only

Page 20: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

62. Save the changes to the macro.

Finalize and test the application

63. Save the database.

64. Click the Sync button to synchronize the changes with the already published web database.

65. Launch the SharePoint site to view the Web forms and the Web application. Test the business rules.

16 © 2023 Microsoft Corporation. All rights reserved.

Page 21: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Exercise 3: MacrosScenarioIn this exercise you will learn about the Access macros. You will use macros to validate the order and process the inventory.

The application logic in this exercise is: “When a new order is placed, the order quantity should be validated against the inventory level.” The condition here is that the number of items ordered should not be more than the quantity in hand.

Secondly, when an order is placed, the Products table should be updated with the remaining number of products in the inventory.

After completing this exercise, you will be able to:

Create UI macros and data macros

Use the macro designer

Customize the "Before Change" and "After Insert" events (Also called Triggers)

Task Detailed Steps

Complete these steps by connecting to the computer DEMO2010A

Validate the order quantity using the Before Change built-in macro

1. On the left pane, under Tables, double-click on the Orders table to open it:

2. On the ribbon, click Table:

3. Click Before Change.

4. From the drop-down list, select IF.

5. Set the IF condition to [IsInsert]:

17 Microsoft Confidential - For Internal Use Only

Page 22: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

IsInsert is a built-in function that specifies if the Item is being Inserted or Updated. In this scenario, we want to validate the data only before an Item in Inserted.

Alternatively, you can directly type ProductOrdered in the Expression field. The IntelliSense will display possible values for the field that you can choose.

6. You need to read the values for "Product Ordered" and "Quantity Ordered" from the Orders Form and store them in local variables. Declare two variables named _Product and _QtyOrdered.

7. From the Add New Action drop-down list, select SetLocalVar.

8. Type _Product as the Name of the variable.

9. For the expression field, click the builder icon ( ).

10. In the expression builder, select Orders. Click ProductOrdered, and then click OK:

11. Similarly add another SetLocalVar action to read the order quantity:

12. Create a look up the Products table and query the "Quantity" (the current

18 © 2023 Microsoft Corporation. All rights reserved.

Page 23: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed Steps

inventory level) for the selected product (_Product).

a. From the drop-down list, select LookUpRecord:

b. The LookUpRecord action block should appear as follows:

c. Set the lookup condition as follows:

The Product_A alias represents the record set obtained from querying the Products table for the selected product.

d. Add a new action to fetch the quantity from the Products_A record set. Store it in a local variable named _QtyInHand:

Note: This new action block should be nested within the look-up block

19 Microsoft Confidential - For Internal Use Only

Page 24: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

e. From the Add New Action dropdown, select an IF action. Set the IF condition as follows:(Note: The IF action block should also be nested inside the Look-up block)

Add a RaiseError action. Set the error information as follows:

f. The completed look-up block should now resemble the following:

13. The completed macro should resemble the following:

20 © 2023 Microsoft Corporation. All rights reserved.

Page 25: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed Steps

14. Save the macro.

15. Save the Orders table.

16. Save the Database.

NOTE: The steps 17 to 26 are Optional

Update the Products table using the After Insert built-in macro

17. On the left pane, under Tables, double-click on the Orders table to open it:

18. On the ribbon, under Table Tools, click Table:

21 Microsoft Confidential - For Internal Use Only

Page 26: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

19. Click After Insert.

20. In the same way you fetched the Product Ordered and Order Quantity from the Orders form in the previous task, fetch these values and store them in local variables named _Product and _QtyOrdered:

21. The next step is to query the Products table for the selected product (_Product).

a. Add a new LookUpRecord action.

b. Set the lookup condition as follows:

The Product_A alias represents the record set obtained from querying the Products table for the selected product.

22. From the Add New Action drop-down list, select EditRecord action. The action should be nested inside the Look up action block:

22 © 2023 Microsoft Corporation. All rights reserved.

Page 27: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed Steps

23. The createalias Products_A contains the record that needs to be edited. In the EditRecord Block, in the Alias field, type Products_A.

24. From the Add New Action drop-down list, select SetField:

25. Set the Name and the Value as follows:

In this step, you are setting the value of the Quantity (inventory level) to Available Quantity - the Ordered Quantity.

26. The completed macro should resemble the following:

23 Microsoft Confidential - For Internal Use Only

Page 28: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

Finalize and test the application

27. Click the Save icon to save the macros and the database.

28. Click the Sync button to synchronize the changes with the Web database you published earlier.

29. Launch an Internet Explorer browser window and navigate to the OrdersManagement SharePoint site to view the Web forms and the Web application.

30. Test the business rules that you created in the exercise.

24 © 2023 Microsoft Corporation. All rights reserved.

Page 29: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Exercise 4: Creating Web Reports with Access ServicesScenarioIn this exercise you will explore the Access Web reports and the process of reporting the rolled-up data from the Web database tables to a SharePoint site. You will use the query designer to create queries that drive the reports.

After completing this exercise, you will be able to:

Create basic queries

Create reports from queries

Create a Report Center to display Web reports

Task Detailed Steps

Complete these steps by connecting to the computer DEMO2010A

Create a query for the order status report

1. On the ribbon, on the Create tab, click Query:

A popup window displays all the tables in the database.

2. From the Show Table dialog box, select all three tables. Click Add:

25 Microsoft Confidential - For Internal Use Only

Page 30: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

3. Select the tables and the fields needed for reports. The fields can be selected from the bottom pane of the query editor window.

4. To arrange records of the field in ascending/descending order select either of the options as shown. To show the field’s value in the query result, check the checkbox below each field.

26 © 2023 Microsoft Corporation. All rights reserved.

Page 31: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed Steps

5. After selecting the fields the query window should look as follows:

6. Save the query as OrderStatus:

NOTE: The steps 7 to 17 are Optional

Create query for the sales person report.

7. Repeat the steps to create another query for the Sales Persons report. After adding the 3 tables to the query, select the columns from the tables as shown.

Create a column in the query window called Amount. This is a calculated field: Amount:[CostPerUnit]*[QuantityOrdered]

27 Microsoft Confidential - For Internal Use Only

Page 32: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

8. Save the query as SalesPersonBusiness.

Create the reports form

Reports forms are forms created from the queries. The output of the queries are either displayed directly or customized (grouped or ordered by) and presented to the end-users via report forms.

9. On the left pane, in the All Access Objects section, under Queries, select OrderStatus.

10. On the ribbon, on the Create tab, select Report:

11. A new report form will be created from the OrderStatus query.

12. This report is intended to show products grouped by order status. Select the OrderStatus and field, and then select Group on OrderStatus.

13. Save the report as Order Status Report.

14. Similarly, repeat the above steps to create a Sales Person Business Report from the SalesPersonBusiness query. In this report, create a grouping on the SalesPersonName field

28 © 2023 Microsoft Corporation. All rights reserved.

Page 33: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed Steps

Customizing the query output

15. To calculate and display the total sales, right-click the TotalCostPerUnit field and choose the Sum function:

16. Click the Save button to save the reports and the database.

17. You should be able to see both the reports in the left pane under the Reports heading:

29 Microsoft Confidential - For Internal Use Only

Page 34: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps

Create the Report Center

18. On the ribbon, under the Create tab, select Blank Form. A new blank form will be created.

19. From the Design tab, select the Label control and add it to the form. Set the text in the label to Reports Center.

20. Right-click the label and select Properties. Set the font size to 18 (or a size of your choice):

30 © 2023 Microsoft Corporation. All rights reserved.

Page 35: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Task Detailed Steps

21. On the ribbon, on the Design tab, click the Navigation button to create a navigation control.

22. Drag each report to the navigation control you created earlier:

23. Click the Save button to save the Report Center form.

Add the report centre to the Navigation form

24. From the left pane, in the Forms section, right-click NavigationForm, and then select Layout View:

25. Select the Report Center form and drag it to the navigation form. The navigation form should now resemble the following:

26. Click the Save button to save all open forms to the database.

31 Microsoft Confidential - For Internal Use Only

Page 36: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Exercise 4: Creating Web Reports with Access Services

Task Detailed Steps27. Click the Sync button to synchronize the changes with the Web database you

published earlier.

28. Launch an Internet Explorer browser window and navigate to the OrdersManagement SharePoint site (http://intranet.contoso.com/ordermanagement) to view the Reports center and the reports.

You have now completed this lab.

32 © 2023 Microsoft Corporation. All rights reserved.

Page 37: Lab Environmentdownload.microsoft.com/download/6/D/C/6DC7BA75-EBFC-4E2… · Web viewSeveral paragraphs – or longer – describing an overview of the module including a description

Introduction to Access Services 2010- Appendix

Appendix

Labcode Manual Version Last UpdateVersion 7 12/8/2010 6:38:00 PM

Lab Notes

Description Details

Virtual Machine Requirements

Virtual Machine Name Details

33 Microsoft Confidential - For Internal Use Only