SQL Server Reporting Services (SSRS) For Application Developers

Slides:



Advertisements
Similar presentations
Anil Desai. Independent Consultant (Austin, TX) Author of numerous SQL Server books Certification Training Instructor, Implementing and Managing SQL Server.
Advertisements

Run with PC speaker on for narrative Welcome to the Narrated Guided Tour of Cizer.Net Reporting for Microsoft SQL Server Reporting Services
Reporting Services – Data Driven Subscriptions
Introduction to ETL Using Microsoft Tools By Dr. Gabriel.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin TECHNOLOGY PLUG-IN T3 PROBLEM SOLVING USING EXCEL.
© 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post.
Technical BI Project Lifecycle
November 13, Excel Features that Developers Should Know (Hosted by SQL PASS BA VC) The Baker’s Dozen Business Intelligence 13 SQL Server / Business.
Reporting In Visual Studio 2005 An in-depth look at Reporting Internals Vijay Shandilya Software Engineer.NET Elite Team Aithent Technology.
1 Chapter 12 Working With Access 2000 on the Internet.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Developing Effective Reports
Cognos 8.4 Upgrade Business Intelligence. Why Cognos 8.4 Increased Performance on Database due to optimized SQL and more filters passed in native SQL.
Tutorial: Crime & Violence Data Cubes at NCOVR Data Center Last Update:September 12, 2005 by:Jacqueline Cohen.
04 | Building Stellar Data Visualizations Using Power View.
Systems Analysis I Data Flow Diagrams
Chris Baldwin Program Manager Microsoft Corporation Session Code: DAT201.
Microsoft SQL Server 2000 Reporting Services ( 주 ) 아이티즌 서정만 선임연구원
XP New Perspectives on Microsoft Access 2002 Tutorial 71 Microsoft Access 2002 Tutorial 7 – Integrating Access With the Web and With Other Programs.
Developing Effective Reports
SQL Server Reporting Services London Database Developer Forum Anoop Patel.
Tim Leung SQL Bits October  Features and Advantages  Architecture  Installation  Creating Reports.
Classroom User Training June 29, 2005 Presented by:
SharePoint 2010 Business Intelligence Module 10: Reporting Services.
SQL Server Reporting Services for Application Developers – Attendees pick topics Kevin S. Goff.
Introducing Reporting Services for SQL Server 2005.
TATA CONSULTANCY SERVICES
Chapter 6 SAS ® OLAP Cube Studio. Section 6.1 SAS OLAP Cube Studio Architecture.
Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! With Microsoft ® Office 2007 Intermediate Chapter.
XP. Objectives Sort data and filter data Summarize an Excel table Insert subtotals into a range of data Outline buttons to show or hide details Create.
Building Dashboards SharePoint and Business Intelligence.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Working with Data Lists.
John Ykema, Director of Sales & Marketing. Agenda  Understanding the NEW Tool  Table JOINS & Database Views  Building your first report  Charts and.
Drill-Through Features Cognos 8 BI. Objectives  In this module we will examine:  Cognos 8 Drill Through Overview  Model / Package Drill Through  Cross.
25 Copyright © 2009, Oracle. All rights reserved. Showing Results with Pivot Tables.
21 Copyright © 2009, Oracle. All rights reserved. Working with Oracle Business Intelligence Answers.
DAT 378 SQL Server 2000 Bringing The Best of Reporting Services and Analysis Services Together Sean Boon Program Manager, BI Systems
24 Copyright © 2009, Oracle. All rights reserved. Building Views and Charts in Requests.
Report 1: SSRS Performance Gauge 1  Report that shows groups, sparklines, performance gauges, and interactive sorting Grouping is by Employee Sales and.
Excel Services Displays all or parts of interactive Excel worksheets in the browser –Excel “publish” feature with optional parameters defined in worksheet.
Power BI Presentation Content Kevin S. Goff Microsoft SQL Server MVP.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Copyright © 2015 Varun Varghese
Practical MSBI(SSIS, SSAS,SSRS) online training. Contact Us: Call: Visit:
Extending and Creating Dynamics AX OLAP Cubes
Data Visualization with Tableau
Presenter Date | Location
Introducing SmartView
Active HTML Rediscovered
Creating Oracle Business Intelligence Interactive Dashboards
Working in the Forms Developer Environment
Access Reports.
What's New in OLAP Clients
Leveraging BI in SharePoint with PowerPivot and Power View
Tips and Tricks for Reporting Services
Reporting.
Creating Reports and Dashboards with Power BI
IBM COGNOS online Training at GoLogica Technologies
Getting Started with Dreamweaver
PASS Business Analytics Virtual Chapter
IVend Retail 6.5 Dashboard Designer.
ISC440: Web Programming 2 Server-side Scripting PHP 3
SAP BUSINESS OBJECTS WEB INTELLIGENCE RICH CLIENT
Microsoft Power BI for Office 365
Patrick Flynn | Link Group Australia
Web Development Using ASP .NET
Fordham Connect Train-the-Trainer Training Reports
Tutorial 7 – Integrating Access With the Web and With Other Programs
Presentation transcript:

SQL Server Reporting Services (SSRS) For Application Developers Kevin S. Goff www.KevinSGoff.net Microsoft SQL Server MVP

Kevin S. Goff – Brief BIO Developer/architect since 1987 / Microsoft SQL Server MVP Columnist for CoDe Magazine since 2004, “The Baker’s Dozen” Productivity Series”, 13 tips on a SQL/BI topic Wrote a book, collaborated on a 2nd book Frequent speaker for SQL Server community events and SQL Live!360 Conferences Email: kgoff@kevinsgoff.net My site/blog: www.KevinSGoff.Net (includes SQL/BI webcasts) Releasing some SQL/BI video courseware in the future

Some SSRS articles I’ve written in CODE Magazine http://www.codemag.com/article/1705061 http://www.codemag.com/article/1605111 http://www.codemag.com/article/1108101

Attendees pick topics SSRS Drilldown capabilities Running Totals Matrix capabilities SSRS Data Driven Subscriptions Putting an SSRS report on an ASP.NET webpage Launching an SSRS report and exporting to PDF from inside an SSIS package Interactive sorting Building Charts with dual-Y axis definitions Generating Performance Gauge and sparkline data visualizations Implementing multi-valued parameter selections with a stored procedure Subreports Launching child report from parent report as a Report Action Nested page groupings/pagination Hiding columns based on user input or based on user security/authentication Reporting against OLAP cubes Building charts with multiple data series Cross highlighting/filtering Charts multiple report objects that stretch vertically Conditionally suppressing repetitive report subtotals LookupSet and custom VB code Launching an SSRS report from .NET with multiselect parameter values Launching a child SSRS report in a separate browser window/tab Conditional aggregations Implementing Running Aggregations in a report Implementing a tab-style interface for navigation to report page/sections Cascading parameters Some tips on Analytic Charts Annotating parameters correctly Multiline tooltips Determining which users have run reports

1 - SSRS Drilldown capabilities Initially everything collapsed, based on initial parameter settings Initially everything collapsed, based on initial parameter settings User can expand Grand Total label to show ship methods, and expand ship methods to see Vendors

1 - SSRS Drilldown capabilities To implement drilldown, there’s no actual drilldown feature Instead, it’s a matter of hiding a group level, and toggling the visibility based on a parent label For the Group, go to Visibility, and set the Toggle Item to a label at the parent level To initially suppress the group level, set Visibility “when report is initially run” to false. Or it can be based on report user parameter References textbox

1 - SSRS Drilldown capabilities And then to implement at further child levels, same concept Set toggle item to the label used for the parent group

2 – Running Totals (Running Aggregations) To implement running aggregation values, using the function RunningValue First Parameter is the column value being aggregated Second parameter is the aggregation (sum, Avg, Max, etc.) Third parameter is the scope of the aggregation (the group)

3 – Matrix capabilities Matrix example Years across the top, even though we don’t know how many years there could be The column group could be markets, or products, or quarters, etc. Matrix option for % of Total Years spread across in reverse order % of total based on sales with respect to totals across all years for the single shipper, or totals across all shippers for the year

3 – Matrix capabilities Matrix example Years across the top, even though we don’t know how many years there could be The column group could be markets, or products, or quarters, etc. We can insert columns inside the matrix to show more data or calculations The two calculation expressions (for % of row or column total) are expressions within the row/column group The SUM aggregation will occur for the scope of shipper/orderyear Result set columns for Shipper and OrderYear defined as Row and Column Groups

3 – Matrix capabilities The % of Total Calculations can refer to textboxes that are part of a spreading element column group

4 – Data Driven Subscriptions Requirement: must use SQL Server Agent! One report, many recipients for different parameters, on a schedule One report, many output destinations for different parameters, on a schedule We can populate a relational control table in SQL Server with information to drive the report subscription SSRS web interface will prompt us for necessary fields The source of data for the report (as well as the data source for the relational control table that contains the subscription information) must have credentials securely on the server (for unattended execution) This can be a time saver – if you have a large # of recipients Also dynamic – will pick up changes when we insert new rows to the relational control table Link on my website to more details: http://www.commongroundsolutions.net/SSRS_DataDrivenSubscriptions_Methodology.pptx Generated output name Can be UNC location, or SharePoint Document Library, or email address MHTML, Excel, PDF, TIFF, CSV, etc Relational source: Key parameters OLAP source: dimension key

4 – Data Driven Subscriptions Must provide source for the table holding subscription information Credentials must be stored securely

4 – Data Driven Subscriptions Interface will detect the parameters required by the report when it’s run unattended We can use our mapping table (note the first parameter was generally called “Param1”)

4 – Data Driven Subscriptions Next, provide the delivery method Then provide SSRS with all the columns from our mapping table, that correspond to the subscription requirements

4 – Data Driven Subscriptions Finally, provide a delivery event (preferably a shared schedule)

5 – SSRS Report on ASP.NET webpage Drop instance of SSRS Report Viewer on an ASP.NET webpage Also needs Script Manager We’ll need code in the code-behind to set report properties

5 – SSRS Report on ASP.NET webpage Note: suppose this parameter was a multi-select and you want to pass multiple values. Must pass string array: public string[] aYears; aYears = ListOfYears.ToArray(); Another example – where we pass in our own parameter(s)

5 – SSRS Report on ASP.NET webpage One more note! If you want to pop up the report in another browser or tab… "javascript:void(window.open('" + ReportServer + "rptName&Param1=" + Param1Value + _ "&Param2" + Param2Value + "','_blank'))"

6-Launching SSRS report inside an SSIS package C# code inside SSIS Script to run a report unattended .NET references required

7-Interactive sorting Runtime ability for user to sort on any column in the browser Design-time property in column header textbox, for Interactive Sorting

8-Charts with dual-Y axis definitions Chart plots two numeric columns on two different scales Helpful for plotting percentages on a different axis/scale Primary Y-Axis (sales in millions) Secondary Y-Axis, for percentages (since they need a different scale)

8-Charts with dual-Y axis definitions For the second measure, you can right-click to go to Properties for the data series, then go to the Axes and Chart Area Properties and set the vertical axis to secondary To render the percentages as a line instead of a bar chart, right-click and change the chart type

9-Performance Gauge/sparkline visualizations Video to create from scratch: http://www.commongroundsolutions.net/SSRSPerformanceGauge1_of_4.zip http://www.commongroundsolutions.net/SSRSPerformanceGauge2_of_4.zip http://www.commongroundsolutions.net/SSRSPerformanceGauge3_of_4.zip http://www.commongroundsolutions.net/SSRSPerformanceGauge4_of_4.zip

10-Multi-valued parameters with stored procedure Reporting Services passes a multi-valued parameter as a comma-separated string to a stored procedure Must create a table-valued function in the database, to convert a CSV string to a table variable Stored Procedure can receive the CSV string, call the TVF, and join the results to other tables

11-Subreports A single report can only render one instance of a one-many relationship. If there are multiple one-many relationships for multiple levels of detail, we need to implement subreports Basically, we create a main report where the primary dataset contains a key (in this instance, a product key) that can be passed to two child reports as parameters The 2 child reports are built with the expectation they’ll receive a product key parameter Then in the main report, add them as subreports Multiple levels of detail Main report shows each product, and then within each product, sales from both internet sales and reseller sales

11-Subreports In the main report, add references to the two child reports as subreports In the subreport properties, reference the child report, and pass the Product Key from the main dataset as a parameter to the child subreport

12-Launch child report from parent report User clicks on state (Oregon), and report launches a 2nd report (which shows sales for cities in Oregon) Can use Report Action feature in data point of main report to launch a second report, with parameters that the child report expects

12-Launch child report from parent report The connection point might be a textbox, or a data series point on a chart, or the Polygon properties of a map Find the Action Page, specify “Go to Report”, and define the child report. The interface will expose the parameters that the child report expects, and we can pass values from the main report

13-Nested page groupings/pagination Not only can SSRS show “Page X of Y”, it can also show pagination for groups within the report Just need to define some properties for the group

13-Nested page groupings/pagination For the group (in the properties sheet), need to define the Page Break properties Pagination won’t work correctly at the Group level unless we set these.

14-Hiding columns Column visibility Use SSRS global variable User!UserID to call a stored procedure to query a custom control table that holds rights definitions for specific columns SSRS does not have any built-in security feature to define whether users can see (or not see certain columns. But we can implement a custom solution using control tables based on User ID, and the SSRS column visibility feature

15- Reporting against OLAP cubes SSRS Allows reporting against OLAP Cubes Good news: you can use the visual designer to drag/drop fact table measures and dimension attributes Not so good news: sometimes/often you need to modify the generated MDX code, or even write your own MDX code Column visibility

16 – Chart with Multiple Series These 2 bars represent 2 different series for the same month: Inventory and Shipments

16 – Chart with Multiple Series An average (maybe average daily inventory for the month) rendered as a line chart Series type that breaks out Inventory by multiple definitions (Cyan, Yellow, Red, Blue, Grey) Series type that breaks out Shipped by multiple definitions (Green and Yellow) Result set that drives chart Within each month, a category group definition for (I)nventory and (S)hipped (XAxisType)

17 – Cross-highlighting charts Visual Studio Live! Orlando 2013 17 – Cross-highlighting charts User wants to click on U.K. for 2013 and highlight all relevant parts of that chart and other charts © 2013 Visual Studio Live! All rights reserved.

17 – Cross-highlighting charts Visual Studio Live! Orlando 2013 17 – Cross-highlighting charts All relevant areas for UK 2013 now in Yellow © 2013 Visual Studio Live! All rights reserved.

17 – Cross-highlighting charts Visual Studio Live! Orlando 2013 17 – Cross-highlighting charts First, create a hidden parameter called HotSelect Third, for each chart, go to series properties and Fill. Set Color Expression Second, for each chart, go to Series properties and Actions. Set action as the same report (to “relaunch”) and pass in HotSelect Parameter based on current Year and Country © 2013 Visual Studio Live! All rights reserved.

Right-click on the row selector for the subtotal row, select “Row Visibility” and then hide the row using the COUNTDISTINCT function