Module 2: Authoring Basic Reports
Overview Creating a Basic Table Report Formatting Report Pages Calculating Values
Lesson: Creating a Basic Table Report Report Designer Authoring a Report Report Definition Language Accessing Data Creating a Table Creating Groups
Report Designer Integrated with Visual Studio.NET 2003 Full report authoring capabilities Generates Report Definition Language (RDL) Provides deployment directly to Report Server
Authoring a Report Report Designer Create a blank report Use the Report Wizard Import an existing report Third-party tools can be used to create RDL
Report Definition Language Provides an XML representation of the report definition Validated against an XML schema definition (XSD) Common schema Designed to be output format neutral Has an open and extensible schema
Accessing Data Data source Any.NET-managed data provider Optionally store user credentials Shared or report specific Data set Query retrieves a row set from a data source Query language specific to the source database Dynamic query can accept parameters Contains fields
Creating a Table Layout view Report preview
Creating Groups Grouping Levels Table header Category header Detail Category footer Table Footer
Demonstration: Creating a Basic Table Report In this demonstration you will see how to: Create a simple report Use a shared data source Use a data set Use a table data region
Lesson: Formatting Report Pages Report Page Structure Report Items Headers and Footers
Report Page Structure
Report Items Data regions Link to data set Repeat for detail or group Types List Table Matrix Chart Independent items Constant or expression Repeat if in a data region Types Line Text box Image Rectangle Subreport
Headers and Footers Report header/footer Area of report above or below data region Page header/footer Add to page definition Optional for First and Last pages Table header/footer Optional repeat on each page Group header/footer Force page break before or after Optional repeat on each page
Demonstration: Formatting Report Pages In this demonstration you will see how to: Add report headers Add report footers Format page breaks
Lesson: Calculating Values Creating Custom Fields Adding Expressions to a Report Aggregate Functions Common Aggregate Functions Conditional Formatting
Creating Custom Fields Database Report Designer automatically creates fields from data set columns You can change name (alias) of database field Calculated Based on database fields Evaluated for every record returned in the data set Create expressions by using Visual Basic.NET
Adding Expressions to a Report Global Collections Fields Globals Parameters ReportItems User Aggregate Functions Collection!ObjectName Collection.Item("ObjectName") Collection("ObjectName") Collection!ObjectName Collection.Item("ObjectName") Collection("ObjectName")
Aggregate Functions Syntax Function(Expression, Scope) For example: Sum(Fields!SalesAmount.Value, "Category") Scope – grouping name specifying level for applying aggregate
Common Aggregate Functions AvgAverage of non-null values CountCount of values CountDistinctCount of all distinct values FirstFirst value MinMinimum non-null value RunningValueRunning aggregate (specify function) StDevStandard deviation of non-null values SumSum of the values
Conditional Formatting Use expressions to make formatting dynamic Common usages Display negative values in red, positive in green Alternate colors between rows of a report Example =IIF(Me.Value < 0.15, "Red", "Black")
Demonstration: Adding Calculated Values In this demonstration you will see how to: Create a calculated field Use aggregate functions Apply conditional formatting
Review Creating a Basic Table Report Formatting Report Pages Calculating Values
Lab 2: Designing a Simple Report Exercise 1: Creating a Basic Table Report Exercise 2: Formatting Report Pages Exercise 3: Adding Calculated Values Exercise 4: Referencing Global Values (optional)