BID2WIN Workshop. Advanced Report Writing



Similar documents
Microsoft Access 2010 handout

Creating a Patch Management Dashboard with IT Analytics Hands-On Lab

Lesson 07: MS ACCESS - Handout. Introduction to database (30 mins)

SQL Server 2005: Report Builder

How To Create A Powerpoint Intelligence Report In A Pivot Table In A Powerpoints.Com

BUILD2WIN Lab 2.6. What s New in BUILD2WIN?

Introduction to Microsoft Access 2010

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

The LSUHSC N.O. Archive

Results CRM 2012 User Manual

Introduction to Microsoft Access 2013

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development

Decision Support AITS University Administration. Web Intelligence Rich Client 4.1 User Guide

Introduction to MS WINDOWS XP

Introduction to Microsoft Access 2003

Create an Excel BI report and share on SharePoint 2013

HRS 750: UDW+ Ad Hoc Reports Training 2015 Version 1.1

Business Objects 4.1 Quick User Guide

Excel 2003 Tutorial I

Build Your First Web-based Report Using the SAS 9.2 Business Intelligence Clients

Visualization with Excel Tools and Microsoft Azure

MICROSOFT ACCESS 2003 TUTORIAL

Microsoft Access Introduction

Appendix A How to create a data-sharing lab

Step One. Step Two. Step Three USING EXPORTED DATA IN MICROSOFT ACCESS (LAST REVISED: 12/10/2013)

Outlook . User Guide IS TRAINING CENTER. 833 Chestnut St, Suite 600. Philadelphia, PA

Creating and Using Forms in SharePoint

Working with SQL Server Integration Services

MICROSOFT OFFICE ACCESS NEW FEATURES

Reduced Quality Sample

Web Intelligence User Guide

Module One: Getting Started Opening Outlook Setting Up Outlook for the First Time Understanding the Interface...

Business Objects Version 5 : Introduction

ORACLE BUSINESS INTELLIGENCE WORKSHOP

IST 195 Lab 11: MS Access

Crystal Reports Payroll Exercise

DataPA OpenAnalytics End User Training

WEBFOCUS QUICK DATA FOR EXCEL

Learn About Analysis, Interactive Reports, and Dashboards

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

Microsoft Query, the helper application included with Microsoft Office, allows

for Sage 100 ERP Business Insights Overview Document

Microsoft Access Basics

IRA Pivot Table Review and Using Analyze to Modify Reports. For help,

Search help. More on Office.com: images templates

Microsoft PowerPoint 2010

Section DB DATABASE - Microsoft Access

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

Content Author's Reference and Cookbook

Intellect Platform - Tables and Templates Basic Document Management System - A101

Creating and Using Databases with Microsoft Access

MICROSOFT OUTLOOK 2011 READ, SEARCH AND PRINT S

Creating Database Tables in Microsoft SQL Server

Logi Ad Hoc Reporting Report Design Guide

How To Create A Report In Excel

6. If you want to enter specific formats, click the Format Tab to auto format the information that is entered into the field.

Using Outlook 2010 for

1.5 MONITOR. Schools Accountancy Team INTRODUCTION

Document Manager 2.0. Corporate Administrator Guide

Outlook Web Access (OWA) User Guide

Maximizing the Use of Slide Masters to Make Global Changes in PowerPoint

Creating Personal Web Sites Using SharePoint Designer 2007

Advanced Excel 10/20/2011 1

Logi Ad Hoc Reporting Report Design Guide

Office365 at Triton College

Creating Custom Crystal Reports Tutorial

A database is a collection of data organised in a manner that allows access, retrieval, and use of that data.

Utilizing Microsoft Access Forms and Reports

Microsoft Office Access 2007 Basics

2. Building Cross-Tabs in Your Reports Create a Cross-Tab Create a Specified Group Order Filter Cross-Tab by Group Keep Groups Together

ORACLE BUSINESS INTELLIGENCE WORKSHOP

NDA ISSUE 1 STOCK # CallCenterWorX-Enterprise IMX MAT Quick Reference Guide MAY, NEC America, Inc.

BUSINESS OBJECTS XI WEB INTELLIGENCE

What is OneDrive for Business at University of Greenwich? Accessing OneDrive from Office 365

Microsoft Access 2010 Part 1: Introduction to Access

OWA - Outlook Web App

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Create a New Database in Access 2010

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

Colligo Manager 6.0. Offline Mode - User Guide

Getting Started with Excel Table of Contents

Check out our website!

USER GUIDE. Unit 2: Synergy. Chapter 2: Using Schoolwires Synergy

MICROSOFT OUTLOOK 2010 WORK WITH CONTACTS

Infoview XIR3. User Guide. 1 of 20

Creating QBE Queries in Microsoft SQL Server

Using SQL Server Management Studio

Before you may use any database in Limnor, you need to create a database connection for it. Select Project menu, select Databases:

Microsoft Access 2007 Introduction

Custom Reporting System User Guide

GOOGLE DOCS APPLICATION WORK WITH GOOGLE DOCUMENTS

Baylor Secure Messaging. For Non-Baylor Users

Microsoft Office. Mail Merge in Microsoft Word

User Guide for TeamDirection Dashboard

Colligo Manager 6.0. Connected Mode - User Guide

QUICK START GUIDE

WHAT S NEW IN OUTLOOK 2010 & HOW TO CUSTOMIZE IT

Business Objects. Report Writing - CMS Net and CCS Claims

Creating Interactive PDF Forms

Transcription:

BID2WIN Workshop Advanced Report Writing Please Note: Please feel free to take this workbook home with you! Electronic copies of all lab documentation are available for download at http://www.bid2win.com/userconf/2011/labs/ Your feedback is valuable to us! Please be sure to complete an evaluation form for this Lab. Evaluation forms have been distributed to all lab workstations, and are also available at the Lab Reception Area.

Lab Contents Advanced Report Writing, Part I... 2 1.1: Database Concepts and Terminology... 3 1.2: Using Microsoft SQL Server Management Studio... 4 1.3: Simple Queries Using Microsoft SQL Server Management Studio... 7 1.4: Refining Queries Using Microsoft SQL Server Management Studio... 12 1.5: Multiple Table Queries Using Microsoft SQL Server Management Studio... 14 Part I Summary... 17 Advanced Report Writing, Part II... 18 2.1: Report Manager in Management Reporting (Reporting Services)... 19 2.2: Creating Reports with Report Builder... 22 2.3: Grouping Fields in Report Builder... 29 2.4: Formatting Reports with Report Builder... 31 2.5: Aggregate Fields in Report Builder... 34 2.6: Filtering Fields in Report Builder... 39 2.7: Creating Reports in Excel... 42 Part II Summary... 51 Advanced Report Writing, Part III... 52 3.1: Editing Existing Reports Using Microsoft Visual Studio... 53 3.2: Creating a New Report Using Microsoft Visual Studio... 64 3.3: Formatting Reports Using Microsoft Visual Studio... 83 3.4: Adding a Parameter to Reports Using Microsoft Visual Studio... 89 3.5: Uploading New Reports to Report Manager... 92 3.6: Adding New Reports to BUILD2WIN... 96 Part III Summary... 99 Summary... 100 Page 1

Advanced Report Writing, Part I Part I Objective In Part I of this workshop, we will cover the following areas: 1. Database Concepts and Terminology 2. Using Microsoft SQL Server Management Studio 3. Simple Queries Using Microsoft SQL Server Management Studio 4. Refining Queries Using Microsoft SQL Server Management Studio 5. Multiple Table Queries Using Microsoft SQL Server Management Studio Pre-Workshop Steps Before beginning this workshop, you must first reset the BID2WIN and BUILD2WIN databases on your lab workstation. Please complete the following steps prior to beginning this lab: On your workstation desktop, double-click the Reset Lab Databases icon and wait for the DOS window to appear. This step returns the BID2WIN database to its original state, wiping out changes made by the previous user. Page 2

1.1: Database Concepts and Terminology Reports in both BID2WIN and BUILD2WIN, whether standard, custom or user-created, are all based on the respective Microsoft SQL databases. Before delving into report writing for these products, it is important to have at least a fundamental of database terminology and concepts. In this part of the workshop, we will review some of those basic concepts and the tools used in report writing. After familiarizing ourselves with these database essentials, our first exercise will be creating a query of one of our SQL databases using Management Studio. Database Basics Common Database terminology All BID2WIN products use Microsoft SQL Server and are based on transactional databases Databases are made up of tables-that are related Tables contain unique identifiers (ObjectIDs, Refs) Overview of BID2WIN and BUILD2WIN Databases BID2WIN - The BID2WIN database is normalized and is not suitable for reporting, instead we use BID2WIN Management Reporting, which uses a Data Warehouse (and can contain data from multiple BID2WIN databases) BUILD2WIN The BUILD2WIN database use filtered views, which calculate calculated values and store denormalized data. Data is in real time and the data is secured. Tables and non-filtered views are locked-down so only database administrators can access them. Report Writing Tools Management Studio Report Manager Report Builder Excel Report Designer Using Microsoft SQL Server Management Studio to explore a database Understanding basic query language Creating a simple query Adding filters to a query Page 3

1.2: Using Microsoft SQL Server Management Studio Microsoft SQL Server Management Studio is the tool of choice for viewing database structure and content. In addition to providing a means to access tables in a database, it provides a platform to query databases to extract just the data that is most meaningful to us. Exercise: Examining a Table Using Microsoft SQL Server Management Studio A. To launch the Microsoft SQL Server Management Studio, simply double-click the Microsoft SQL Server Management Studio icon on the desktop of your lab workstation. The Microsoft SQL Server Management Studio appears. NOTE: In the real world the Microsoft SQL Server Management Studio icon would be found in the Microsoft SQL Server (2005 or 2008) folder in the All Programs menu on the server that hosts the databases. B. With Management Studio open, you will now connect to the instance that contains your BID2WIN and BUILD2WIN databases by clicking Connect. NOTE: In the real world you may have other applications that use Microsoft SQL. Ensure that you are connecting to the instance that hosts your BID2WIN and BUILD2WIN databases Page 4

C. Expand the Databases shown in the tree view on the right side of the screen by clicking on the + sign to the left of the folder. With the folder expanded, you will see your B2WData database along with your B2WDataWarehouse and BUILD2WIN databases. D. Expand the B2WDataWarehouse by clicking on the + to the left of the folder. You will now see subfolders. Expand the tables subfolder by clicking on the + sign. E. Right-click the table called dbo.estimate and select Open Table. The table will open on the right side of the program. This particular table has seventy columns of information with a row for every estimate created. Use the scroll bar below the table to peruse data. The rows and columns that make up the estimate table contain a large amount of information about the estimates in the database. Page 5

F. At this point, please feel free to ask any questions you may have. After the brief question and answer period, we will proceed to the next exercise. Page 6

1.3: Simple Queries Using Microsoft SQL Server Management Studio While viewing the contents of a table can be useful, a single table may provide too much information to be useful for most users. To extract the data we are seeking in a more meaningful form, we must create a query. Exercise : Creating a Simple Query Using Microsoft SQL Server Management Studio A. Click once on the B2WDataWarehouse in the tree view on the left side on Management studio to select it. Next, click New Query in the upper left of Management Studio. This open a blank query page on the right side of the program Page 7

B. In the blank query page on the right, right-click and select Design Query in Editor. This will open the Query Designer, a graphical interface that we ll use to create our queries. C. The Query Designer automatically opens with the Add Tables dialog box. From the list of tables, highlight Estimate and click Add. (Alternately, you can double-click on a table to add it to you query.) Once you have added your estimate table, click Close in your Add Table dialog box. NOTE: You can resize the Query Designer by dragging the lower right corner diagonally. Page 8

NOTE: The Query Designer, by default, displays three panes. On top pane is the diagram pane that holds the table diagrams. The middle pane contains the criteria pane that allows the user to change the order that information appears and to apply filter and sorting options. The bottom pane displays the actual SQL query that will be applied. Page 9

D. We are ready to create our query. For this exercise, we will query the table to get profit by customer. Check the boxes to the left of JobNumber, PrimaryCustomerName and TotalProfit in the estimate table Page 10

E. Click OK in the bottom right of your Query Designer. This closes the designer and writes the query in the T-SQL language for us. F. Click Execute. This will run the query you created and return your results in a grid view below. G. At this point, please feel free to ask any questions you may have. After the brief question and answer period, we will proceed to the next exercise using the query we just created. Page 11

1.4: Refining Queries Using Microsoft SQL Server Management Studio While our query has eliminated the data in the table that we did not need, it occurs to us that our query is displaying profit amounts for every estimate we have created. To see profit amounts for just those jobs that we won, we will make a change to our query. Since every job that we won has a job number assigned to it, we ll use this field to filter our query. Exercise: Refining a Query Using Microsoft SQL Server Management Studio A. In the blank query page, right-click and select Design Query in Editor. Add the Estimate table and close the Add Tables dialog box. Check the boxes to the left of JobNumber, PrimaryCustomerName and, TotalProfit. B. Note that in the Criteria section of the Query Designer, the three table columns we selected are present. In the JobNumber row, add <> to the Filter column box. This tells SQL that we only want data from estimates whose job number field is not blank. NOTE: Where did the N come from in the filter box above? It was added automatically by the Query Designer. It is an indicator of the data type, nchar. C. Click OK to close the Query Designer and create your query, and then click Execute. D. The results are displayed for all estimates with a job number. E. At this point, please feel free to ask any questions you may have. After the brief question and answer period, we will proceed to the next exercise using the query we just created. Page 12

NOTE: To edit an existing query without having to add tables and select columns: Highlight the T-SQL query and press Ctrl-x to cut it from the query page, returning it to its blank state. Right-click and select Design Query in Editor. Close the Add Tables dialog box without selecting a table. In the SQL pane of the Query Designer, highlight SELECT and FROM that appear by default and paste your previous query into the pane by pressing Ctrl-v. Click in the Diagram pane. Your previous query information will populate the Query Designer. Page 13

1.5: Multiple Table Queries Using Microsoft SQL Server Management Studio As we know, a database is made up of multiple tables of information. In order to extract the needed information from a database, the user will likely have to query multiple tables. Up until this point, we have been able to extract all the information we need from our dbo.estimate table. Suppose we wanted to find our customers city and state and add it to the results of our query. A quick look at our estimate table shows that primary customer city and state are not included in the table. However, that information is included in the dbo.customer table. To extract the city and state relevant to our customers in our estimate table, we will create a join to link the two tables for our query. As previously discussed, we use ObjectIDs and Refs to join tables in a query. Exercise: Querying Multiple Tables Using Microsoft SQL Server Management Studio A. Create a new query, right-click in the query page and select Design Query in Editor. Add the Estimate and Customers tables. B. Note that a bar joins both tables, running from ObjectID in the Estimate table to ObjectID in the Customer table. This is a default behavior in Query Designer but, unfortunately, this join is not correct for our purposes. Right-click on the bar and select Remove. Page 14

C. In the Estimate table, select JobNumber, PrimaryCustomer and Total Profit. In the Criteria pane, add <> to the Filter column box for JobNumber, as we did in our previous exercise. D. While in the Criteria pane, let s set the sort order for our results. Go to Sort Type in the Primary Customer row. Drop down the arrow and select Ascending. Note that the Sort Order automatically is assigned the number one. If we had multiple sort types, we could select the order of the sort in this field. E. In the Customer table, select City and State by checking the box to the left of the field names. F. We can rearrange the order of the results and rename any fields in the Criteria pane. Select a field by clicking to the left of Column. With your mouse button depressed, move the field up or down, as needed. We will order our columns as follows: PrimaryCustomer, City, State, JobNumber and TotalProfit. G. Next, in the PrimaryCustomer field, go to the Alias column and enter Customer. In the JobNumber Field, enter Job Number and in the Total Profit field, enter Profit. H. Click OK to close the Query Designer. Click Execute and view the results of your query. Page 15

I. At this point, please feel free to ask any questions you may have. After the brief question and answer period, we will proceed to the next exercise. Page 16

Part I Summary In Part I of this workshop, you performed the following exercises: Examining a Table Using Microsoft SQL Server Management Studio Creating a Simple Query Using Microsoft SQL Server Management Studio Refining a Query Using Microsoft SQL Server Management Studio Creating a Query with Multiple Tables Using Microsoft SQL Server Management Studio We will now take a quick break before beginning Part II. Page 17

Advanced Report Writing, Part II Part II Objective In Part II of this workshop, we will cover the following areas: 1. Report Manager in Management Reporting (Reporting Services) 2. Creating Reports with Report Builder 3. Grouping Fields in Report Builder 4. Formatting Reports with Report Builder 5. Aggregate Fields in Report Builder 6. Filtering Fields in Report Builder 7. Creating Reports in Excel Page 18

2.1: Report Manager in Management Reporting (Reporting Services) Report Manager is a browser-based tool developed by Microsoft as a means of accessing reports and their properties. It provides a means of configuring different settings for individual reports as well as for access to the manager itself and a tool for creating reports, Report Builder. Exercise: Exploring the Report Manager in Management Reporting (Microsoft Reporting Services) A. Double click the Management Reporting icon on your desktop. Your browser will open to the Report Manager. B. BID2WIN Management Reporting reports will be listed in Report Manager. Depending on the configuration of the server, a BUILD2WIN folder may be included with the list of reports. Clicking on the BUILD2WIN folder would display the reports in BUILD2WIN. (For our lab, BUILD2WIN has its own separate instance of Report Manager) Page 19

C. There are three key areas of Report Manager that we will use in subsequent exercises-show Details, Upload File and Report Builder. D. Click Show Details. E. This provides an expanded view on the reports that includes an icon to access a report s properties. The properties area allows us to save and update report definition files and configure the report s data source. Click the Properties icon for the Bid Schedule report. Page 20

F. The properties of the Bid Schedule report are displayed. Note the Report Definition edit and update links as well as the Data Sources link that we will use in subsequent exercises. G. Click on Home, directly below BID2WIN Management Reporting at the top of the page to return to the home page. H. At this point, please feel free to ask any questions you may have. After the brief question and answer period, we will proceed to the next exercise. Page 21

2.2: Creating Reports with Report Builder In addition to providing us with access to our BID2WIN and BUILD2WIN reports, Report Manager includes a tool for building reports that can then be added to Report Manager and, if desired, BUILD2WIN. Exercise: Creating a Report Using Report Builder A. From the home page of Report Manager, click Report Builder. NOTES: Reports created with Report Builder are based on the BID2WIN and BUILD2WIN report models. Report models must be installed and configured in Report Manager prior to creating a report. The current report models are available for download on the BID2WIN support site. The report model is a user-friendly description of an underlying database, with preestablished data relationships and auto-generated queries. The purpose of a report model is to remove the need for specialized knowledge of the underlying database schema and query language. Report models manage building queries, data source connections and authentication, expressions, filters, and parameters for the user, allowing business users to focus on report design. Page 22

B. In Report Builder, select the BUILD2WIN Model 2.0 and click OK. Page 23

NOTES: There are three prime areas that we will be using in Report Builder-Entities(1), Fields(2) and the Design Area(3) By selecting an entity, any fields available in that entity may be added to the design area. Once and entity is selected, additional sub-entities will be available along with some additional fields. Page 24

C. On the upper left side of Report Builder, select the entity Filtered Field Log Employee Job Account. Note that the list of fields below changes to reflect those fields that are in this entity. D. From the list of Fields, hold down the Ctrl key on your keyboard and select the following fields by clicking once on them- Account Account ID, Account Description, Double Time Hours, Employee Full Name, Job Job Number, Overtime Hours, Regular Hours and Total Hours. Page 25

E. Drag the selected fields to the designated box on the design portion of Report Builder. Page 26

G. In the Entity area of Report Builder, a list of sub entities appears under the Filtered Field Log Employee Job Account entity initially selected. Click on Field Log Employee REF. A new list of fields is presented in the Fields area below. Select Labor Type Name and drag it to the design area with the previously added fields. H. Arrange the fields in the following order by dragging them to the appropriate place in the design area: Job Job Number, Labor Type, Employee Full Name, Account Account ID, Account Description, Regular Hours, Overtime Hours, Double Time Hours and Total Hours. Page 27

I. Click Run Report and view the report. I. At this point, please feel free to ask any questions you may have. After the brief question and answer period, we will proceed to the next exercise. Page 28

2.3: Grouping Fields in Report Builder Currently, all of our fields are in one large group. By breaking out one or more of the fields into their own group, we can change how the results appear. Exercise: Change the Field Grouping in Report Builder A. Click in the JobJobNumber field in the design area. Holding down your mouse button, drag the field to the left until you see a blue bar. Release you mouse-note that JobJobNumber is now in a group of its own. B. Click Run Report. Data is now grouped by Job Number. Page 29

C. Create a separate group for Labor Type Name by moving the field to the left in the design area. Repeat the process for Employee Full Name. Click Run Report to view the results. J. At this point, please feel free to ask any questions you may have. After the brief question and answer period, we will proceed to the next exercise Page 30

2.4: Formatting Reports with Report Builder Although the report we created is producing the data we wanted to see, the report must be formatted before it is ready for general use. Exercise: Formatting in Report Builder A. Click in the text box above the fields in the design area and enter the following title Labor Hours by Job. Highlight the text and click Bold in the menu bar above. B. The blue textboxes contain the column names in the report. Change Job Job Number to Job Number, Labor Type Name to Labor Type, Employee Full Name to Employee Name and Account Account ID to Account ID. C. Select the Regular Hours value field in the design area. Right-click and select Format. Reduce the decimal places to 1. Repeat the process for the Overtime and Double Time values fields. Page 31

D. Adjust column widths, as desired, by moving the column divider bars to the left or right. E. Click Run Report to view the results. Page 32

F. At this point, please feel free to ask any questions you may have. After the brief question and answer period, we will proceed to the next exercise. Page 33

2.5: Aggregate Fields in Report Builder The current report displays all the data that we want to see. However, in might be helpful to add subtotals for total hours. Subtotals in Report Builder are automatically created when an aggregate field is added to the report. Exercise: Creating an Aggregate Field in Report Builder A. Click on New Field, located in the upper right area of the field list on the left side of the screen. B. In the Define Formula dialog box, type Total Labor Hours in the field name textbox. Page 34

C. Click the Functions tab and expand Aggregate by clicking on the +. Select Sum by double-clicking. Page 35

D. In the Define Formula dialog box, click on the Fields tab. Scroll down and double-click on Total Hours in the field list. This will insert the Total Hours field name after Aggregate in the formula area of the dialog box. Page 36

E. The newly created aggregate field is added to the field list. F. Drag the field to the last position in the design area, to the right of the existing Total Hours field. Note the subtotal rows added to the report, below the Total Labor Hours field. Page 37

G. Click Run Report to view results. Subtotals now display for each of the groups in our report. Click on Design Report to return to the previous screen. H. Delete the Total Hours field originally added to the report. Format the Total Labor Hours field to display two decimal places. Repeat the formatting for each of the aggregate value fields in the blue rows. I. At this point, please feel free to ask any questions. After the brief question and answer period, we will proceed to the next exercise Page 38

2.6: Filtering Fields in Report Builder Adding filters to our report will allow us to eliminate data that we do not wish to see. Exercise: Filtering Data in Report Builder A. Click on Filter, located in the upper right area of the field list on the left side of the screen. Page 39

B. Drag the Total Labor Hours aggregate field to the white area on the right of the Filter Data dialog box. C. In the Filter Data dialog box, click on Equals and select Greater Than from the list of options. Enter 0 in the textbox, replacing (unspecified). Page 40

D. Click Run Report to view results. Subtotals now display for each of the groups in our report. Click on Design Report to return to the previous screen. E. Click on Filter to open the Filter Data dialog box. Drag the Job Job Number field under the existing Total Labor Hours filter. Right-click on the field name Job Job Number and select Prompt. Click OK to close the dialog box. F. Click Run Report to view results. G. At this point, please feel free to ask any questions. After the brief question and answer period, we will proceed to the next exercise. Page 41

2.7: Creating Reports in Excel Using SQL queries, reports can be created in Excel. Data in those reports can then be filtered and formatted with the standard Excel tools. Exercise: Creating a Report in Excel A. Click on Excel on your desktop and create a new blank workbook. B. Go to the Data tab. In the Get External Data section, select From Microsoft Query. C. Uncheck the checkbox next to Use the Query Wizard to create/edit queries. Select New Data Source and click OK. Page 42

D. Enter BUILD2WIN as the name in textbox 1. Select SQL server from the dropdown list in textbox 2. E. Click Connect. Page 43

F. The SQL Server Login dialog box will open. In the Server drop-down box, select the BID2WIN instance. The Use Trusted Connection checkbox is checked by default. Click Options. Page 44

G. In the Options section of the SQL Server Login dialog box, select the BUID2WIN database. Click OK. Page 45

H. The SQL Server Login dialog box will close. Click OK in the Create New Data Source dialog box. I. Click OK in the Choose Data Source dialog box. Page 46

J. The Add Tables dialog box will open. Add the following tables to the Microsoft Query tool: FilteredFieldLogMaterielJob, FilteredFieldLogMaterial and FilteredFieldLogMaterialJobAccount. K. Create the following joins: From the FilteredFieldLogMaterielJob, join the FieldLogMaterialREF to the FilteredFieldLogMaterial ObjectID. From the FilteredFieldLogMaterialJobAccount, join the FieldLogMaterialREF to the FilteredFieldLogMaterial ObjectID. Page 47

L. Select the following fields, by double clicking on the field name in the appropriate table: In the FilteredFieldLogMaterial table, double-click on Vendor_CompanyName. In the FilteredFieldLogMaterielJob table, double-click on Job_JobNumber, FieldLog_FieldLogID, Material_Description and DeliveredQuantity. In the FilteredFieldLogMaterialJobAccount table, double-click on UsedQuantity, UnitCost and MaterialDollars. M. In the File menu, select Return Data to Microsoft Excel. Page 48

N. You will be returned to Excel. Click OK in the Import Data Dialog Box. O. Your data is now visible in your Excel spreadsheet. Page 49

P. To the right of each column header, a drop down arrow provides access to sorting and filtering options. Q. At this point, please feel free to ask any questions. After the brief question and answer period, we will proceed to the next exercise. Page 50

Part II Summary In Part II of this workshop, you performed the following exercises: Exploring the Report Manager Creating a Report Using Report Builder Change the Field Grouping in Report Builder Formatting in Report Builder Creating an Aggregate Field in Report Builder Filtering Data in Report Builder Creating Reports in Excel We will now take a quick break before beginning Part III. Page 51

Advanced Report Writing, Part III Part III Objective In Part III of this workshop, we will cover the following areas: 1. Editing Existing Reports Using Microsoft Visual Studio 2. Creating a New Report Using Microsoft Visual Studio 3. Formatting Reports Using Microsoft Visual Studio 4. Adding a Parameter to Reports Using Microsoft Visual Studio 5. Uploading New Reports to Report Manager 6. Adding New Reports to BUILD2WIN Page 52

3.1: Editing Existing Reports Using Microsoft Visual Studio Visual Studio is powerful report authoring/editing software developed by Microsoft. Users have the ability to use complex SQL queries to select data and then layout their report using a graphical interface. Exercise: Editing an Existing Report Using Visual Studio A. Double click the BUILD2WIN Reports Manager icon on your desktop. Your browser will open to the Report Manager. Click on the Job Item Performance Summary report. Page 53

B. Enter job number 2007-0001 in the Job Number textbox and view the report. While the report contains useful information, it does not provide the name of the Business Unit or the status of the job. We will edit the report to add these fields. Page 54

C. Click the Properties tab to view the report properties. Click Edit in the Report Definition area. D. Save the report to the Desktop. E. On the desktop, click on Visual Studio 2005 to open the program. Page 55

F. In Visual Studio 2005, go to File and select New, then Project. G. Select Report Server Project, accept the default name, Report Project 1 and click OK. Page 56

H. In the Solutions Explorer on the right side of the screen, right-click on Reports and select Add, then Existing Item. I. Click Desktop on the left side of the Add Existing Item dialog box for Report Project 1. Page 57

J. Double-click the newly added Job Item Performance Summary report file. K. The report will open in to the Layout tab. We must make some additions to one of the underlying queries. Click the Data tab. L. Click OK on the dialog box warning us that the data source was not found. (Since we are going to reinstall this report to the original location we can ignore this and all similar subsequent messages.) Page 58

M. Click on the ellipsis for the JobInfoDataSet. N. In the Query tab of the Dataset dialog box, add a comma after FilteredJob.ProjectManager_FullName and press Enter. Page 59

O. Add FilteredJob.BusinessUnit_UniqueName, followed by a comma. Next add FilteredJob.JobStatus_Name (do NOT add a comma following this last entry.) Click the Fields tab. Page 60

P. Add BusinessUnit_UniqueName and JobStatus_Name to the Field Name and Value text boxes on the Fields tab. Click OK to close the Data Source warning dialog box. Q. Click the Layout tab.. Page 61

R. We will now add the new fields to the existing report. Click on Project Manager in the upper left of the report layout. Right-click on the Table Row symbol that appears to the left of the Project Manager label. Select Insert Row Below. S. Type Business Unit in the text box in the first column. Right-click in the following text box in the second column and select Expression. Page 62

T. In the Edit Expression dialog box, click on Fields (JobInfoDataSet) in the column on the left. In the column on the right, double-click on BusinessUnit_Unique_Name. (This inserts the expression =Fields!BusinessUnit_Unique_Name.Value in the expression box. Click OK. U. Repeat the previous steps to add Job Status to the report. V. At this point, please feel free to ask any questions. After the brief question and answer period, we will proceed to the next exercise. Page 63

3.2: Creating a New Report Using Microsoft Visual Studio In addition to editing existing reports, new reports can be created using Visual Studio. Using the Report Wizard, we will create a report based on a query, format it on the Layout tab and install it in Report Manager and BUILD2WIN. Exercise: Creating a New Report Using Visual Studio A. In Visual Studio 2005, go to File and select New, then Project. B. Select Report Server Project, accept the default name, Report Project 2 and click OK. Page 64

C. Project 2 is created and the Report Wizard dialog box appears. Click Next. Page 65

D. On the Select the Data Source page, under New Data Source, enter BUILD2WIN in the Name field. Click Edit. Page 66

E. Drop down the Server Name combo box arrow. When the list of available servers appears, select BID2WIN-WINXPPR\BID2WIN. (It may take up to 60 seconds for the list to appear.) Once the server is selected, drop down the combo box arrow for the Select or enter a database name box in the Connect to a database section of the dialog box. Page 67

F. Click Test Connection. Click OK in the Test Connection Succeeded dialog box. Click OK to create your connection string. Page 68

G. With your connection string in the connection string area of the Select the Data Source dialog box, click Next. Page 69

H. Click Query Builder on the Design the Query page. Page 70

I. Click on the Generic Query Designer icon in the upper left corner of the Query Builder. J. In the Diagram pane, add the FilteredJob and FilteredEstimateItem views and close the Add Table dialog box. Page 71

K. Create a join between the ObjectID in the FilteredJob view and the JobREF in the FilteredEstimateItem view. Page 72

L. In the FilteredJob view, check the Customer_CompanyName, JobNumber and Title checkboxes. In the FilteredEstimateItem view, check the following checkboxes: ItemNumber,.Description, Estimated_EmployeeDollars, Estimated_EquipmentDollars, Estimated_MaterialDollars, Estimated_SubcontractorDollars, Estimated_MiscellaneousDollars, Estimated_TotalDollars, and TotalPrice. Click OK. Your query is entered in the Query String area of the Design the Query page. Click Next. Page 73

M. Select Tabular in the Select the Report Type dialog box and click Next. Page 74

N. The Design the Table page will allow us to group data in the table. A field is selected from the Available Fields list on the left, then moved to the Displayed Fields section by click on Page, Group or Details. Page 75

O. Select JobNumber and click Page. JobNumber moved to the Page section of Displayed fields. Select Title, then click Page. Next select Customer_CompanyName and click Page. Page 76

P. Select the remaining fields and move them to the Group and Details sections, as shown below. Click Next. Page 77

Q. Accept the default setting on the next two pages-choose Table Layout and Choose the Table Style by clicking Next. Page 78

R. Select the default locations for the Report Server and Deployment folder by clicking Next. Page 79

S. In the Report Name field of the Completing the Wizard page, enter the report name: Estimated Item Costs by Job. Click Finish. Page 80

T. The report is created and the Layout tab is displayed. Click the Preview tab to preview your report. Page 81

U. On the Preview tab, page through the report by clicking on the Next Page icon. V. At this point, please feel free to ask any questions. After the brief question and answer period, we will proceed to the next exercise. Page 82

3.3: Formatting Reports Using Microsoft Visual Studio Although much of the initial report formatting is handled by the Report Wizard, there will be fields that require additional formatting to give your report a finished look. Exercise: Formatting Reports Using Visual Studio A. Preview the Estimated Item Costs by Job report that was just created. Note that several of the columns are too narrow for the headers and the dollar amounts are displaying four decimal places. Click on the Layout tab. B. Click the View menu at the top of the page and select Toolbars. Select the Report Formatting toolbar, if not already checked. Page 83

C. Select the first column header, Item Number. Hold down the shift key and select the last column header, Total Price. The entire row is selected. Page 84

D. With the row selected, change the font size to 8. E. Go to the column divider above and to the right of the header Description. Make the column wider by dragging the divider to the right slightly. Page 85

F. Right-b in the bottom row of the first column marked Estimate. Select Properties. Page 86

G. In the Textbox Properties dialog box, click the Format tab, then click the ellipsis, as shown below: Page 87

H. Click Currency in the Choose Format dialog box, then click OK to close the Properties dialog box. Repeat the process for the remaining fields to the right. I. Click the Preview tab to preview your report. Save your report by clicking on the Save icon in the upper right of the screen. J. At this point, please feel free to ask any questions. After the brief question and answer period, we will proceed to the next exercise. Page 88

3.4: Adding a Parameter to Reports Using Microsoft Visual Studio Although much of the initial report formatting is handled automatically, reports can sometimes provide more information than we re looking for. Parameters allow us to restrict the amount of information in a report to just what we want to see. We will add Job Number as a parameter to our report. Exercise: Adding a Parameter to Reports Using Visual Studio A. In Visual Studio. Click the Data tab for the Estimated Item Costs by Job report. In the Criteria pane, go to Filter in the JobNumber row. Enter @JobNumber. The Query Designer corrects the entry to =@JobNumber. Page 89

B. Go to the Report menu and select Report Parameters. C. Click the Add button. Enter JobNumber in the Name textbox. Type Enter Job Number (required) in the Prompt textbox. Allow Null Value and Allow Blank Value should be unchecked. Click OK. Page 90

D. Preview your report by clicking on the Preview tab. Enter 2008-0001 in the Job Number field. E. At this point, please feel free to ask any questions. After the brief question and answer period, we will proceed to the next exercise Page 91

3.5: Uploading New Reports to Report Manager Once you have completed your report, you will want to upload it to Report Manager so will be available for use. Exercise: Uploading Reports to Report Manager A. Click on the BUILD2WIN Report Manager shortcut on your desktop. Click Upload File. Page 92

B. Click the Browse button, then click on My Documents in the Choose File to Upload dialog box. Select the Visual Studio 2005 Folder, then Projects, and then Report Project2. In the Report Project2 subfolder, select the report Estimated Item Costs by Job. Click OK. C. The Estimated Item Costs by Job is added to the Report Manager and marked!new. Click on Show Details. Page 93

D. Click the Properties icon for the Estimated Item Costs by Job E. Click Data Source, then select A Shared Data Source and click Browse. F. Expand the folders, if necessary and select BUILD2WIN. (Note-make sure you select BUILD2WIN and not the BUILD2WIN 2.0 Model) Click OK. Page 94

G. Click Apply at the bottom of the Data Source page. H. View your report by clicking the View tab. W. At this point, please feel free to ask any questions. After the brief question and answer period, we will proceed to the next exercise. Page 95

3.6: Adding New Reports to BUILD2WIN After your new report has been uploaded to Report Manager, it can be added to BUILD2WIN for easy access. Exercise: Adding Reports to BUILD2WIN A. Open BUILD2WIN by clicking on the shortcut on the desktop Go to Reports. Click Add Reports on the upper right side of the page. B. Enter Estimated Item Costs by Job in the Name textbox. Enter a description in the Description textbox. Page 96

C. Drop down the combo box arrow and select /BUILD2WIN/Estimated Item Costs by Job. Select the desired report category and click Save. D. Click View Report List. Page 97

E. Click on Item Costs by Job to view the report in BUILD2WIN. F. At this point, please feel free to ask any questions. Page 98

Part III Summary In Part III of this workshop, you performed the following exercises: Editing an Existing Report Using Visual Studio Creating a New Report Using Visual Studio Formatting Reports Using Visual Studio Adding a Parameter to Reports Using Visual Studio Uploading Reports to Report Manager Adding New Reports to BUILD2WIN Page 99

Summary Lab Summary In this workshop, you performed the following exercises: Examining a Table Using Microsoft SQL Server Management Studio Creating a Simple Query Using Microsoft SQL Server Management Studio Refining a Query Using Microsoft SQL Server Management Studio Creating a Query with Multiple Tables Using Microsoft SQL Server Management Studio Exploring the Report Manager Creating a Report Using Report Builder Change the Field Grouping in Report Builder Formatting in Report Builder Creating an Aggregate Field in Report Builder Filtering Data in Report Builder Creating Reports in Excel Editing an Existing Report Using Visual Studio Creating a New Report Using Visual Studio Formatting Reports Using Visual Studio Adding a Parameter to Reports Using Visual Studio Uploading Reports to Report Manager Adding New Reports to BUILD2WIN Shutting Down BID2WIN and BUILD2WIN Close any open BID2WIN and or BUILD2WIN windows, and any other open applications. On the desktop of your lab workstation, double-click the Reset Lab Databases icon and wait for the DOS window to disappear. This step returns your databases to their original states, resetting the workstation for the next user. Please NOTE: Please feel free to take this workbook home with you! Electronic copies of all lab documentation are available for download at http://www.bid2win.com/userconf/2011/labs/ Your feedback is valuable to us! Please be sure to complete an evaluation form for this Lab. Evaluation forms have been distributed to all lab workstations, and are also available at the Lab Reception Area. Page 100