Reporting Services – Data Driven Subscriptions

Slides:



Advertisements
Similar presentations
Topic Reviews For Unit ET156 – Introduction to C Programming Topic Reviews For Unit
Advertisements

11/2/2013 2:02:38 AM 5864_ER_FED 1 Importing Certificates into Lotus Notes R6.
MFA for Business Banking – Security Questions with Reset Multifactor Authentication: Quick Tip Sheets Note to Financial Institutions: We are providing.
User Guide TE Connectivity Data Collection Tool (DCT) January 2012.
1. XP 2 * The Web is a collection of files that reside on computers, called Web servers. * Web servers are connected to each other through the Internet.
S the of partnership power Evaluation Code 030 Presenter: Laura Key, Taylor University Monday, April 9th - 8:30 AM Building a Self- Refreshing MS Access.
BASIC SKILLS AND TOOLS USING ACCESS
Click to edit Master title style Page - 1 OneSky Teams Step-by-Step Online Corporate Communication Support 2006.
1 NatQuery 3/05 An End-User Perspective On Using NatQuery To Extract Data From ADABAS Presented by Treehouse Software, Inc.
Report Card P Only 4 files are exported in SAMS, but there are at least 7 tables could be exported in WebSAMS. Report Card P contains 4 functions: Extract,
MySQL Access Privilege System
Microsoft Access.
1 of 27 DA1241 Archive Companies Last updated: March-2004 DA1241 Archive Companies.
State of Connecticut Core-CT Project Query 8 hrs Updated 6/06/2006.
CC SQL Utilities.
Web Designing Using Microsoft FrontPages Kashif Haqqi, M.D.
1 1Line Training Capacity Release - Phase II Awards and Recall/Reput.
Benchmark Series Microsoft Excel 2013 Level 2
HORIZONT TWS/WebAdmin TWS/WebAdmin for Distributed
1 Welcome to SAPS Webmail. 2 Things we will learn about: 1. Login to mail.
CREATING A PAYMENT REQUEST FOR A NEW VENDOR
4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3-1.
Presented by Douglas Greer Creating and Maintaining Business Objects Universes.
Light User Guide BVPortal June 30th, p.m. Charles - Henri Varin KM DTP For the benefit of business and people.
Learning the Basics – Lesson 1
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
School Census Summer 2011 Headlines Version Jim Haywood Product Manager for Statutory Returns.
® Microsoft Office 2010 Browser and Basics.
Slide 3Slide 3-Introduction Slide 4Slide 4-Home Page Slide 5Slide 5-Adding New Group Slide 6 - 7Slide Naming of groups and settings Slide 8 - 9Slide.
Useful Tips  How to quickly verify if you are logged on or not  Get the full navigation menu window for e- application  What is a time-out and how to.
Using Outlook Benefits of Using Outlook Now – Better formatting of HTML mail (with bullets, fonts, etc.) – Great calendar, ability to send meeting.
Using the SmartPLS Software
WaveMaker Visual AJAX Studio 4.0 Training
Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 2Advanced Reports, Access Tools, and Customizing Access Chapter 8Integrating Access Data.
Benchmark Series Microsoft Excel 2013 Level 2
Order of Operations And Real Number Operations
Exony Reports User Guide Estimated Timings:
Chapter 8 Improving the User Interface
Subcontract Manager is only available in Valuations The Subcontract Manager Introduction The Subcontract Manager is used to define and maintain subcontract.
Newsletter Plugin The newsletter plugin allows you to create and send newsletters to a managed list or multiple lists of users. Your users can subscribe.
Automating Tasks With Macros
The Internet. Telnet Telnet means using your computer as a terminal. All commands you type are sent to the host computer you are connected to and executed.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Tutorial 11: Connecting to External Data
Completing the Form PLAINTIFF’S CLAIM FORM 07A. On the Plaintiff’s Claim (FORM 07A) change your FORM STATUS by clicking once on the white box. A dropdown.
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Informer Web Reporting Basic Reporting
SQL Server Reporting Services for Application Developers – Attendees pick topics Kevin S. Goff.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
Creating a Web Site to Gather Data and Conduct Research.
PHP meets MySQL.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
Virtual Interaction Manager
1 Working with MS SQL Server Textbook Chapter 14.
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
SIGNZ Mail Merge / Merge / Labels SIGNZ Mail Merge / Merge / Labels.
Slide 1 of 35 Welcome to GSA’s Vendor and Customer Self Service (VCSS) course Section 3: Basic Navigation This presentation is compliant with section 508.
 Product Recommendations  Managing Product Recommendations  Types of Product Recommendations  Product Out of Stock  Out of Stock Management  Let.
Internal and Confidential Cognos CoE COGNOS 8 – Event Studio.
SQL SERVER 2008 Installation Guide A Step by Step Guide Prepared by Hassan Tariq.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
Subscribers – DatA Extensions
Module 6: Administering Reporting Services. Overview Server Administration Performance and Reliability Monitoring Database Administration Security Administration.
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
Microsoft SQL Server Reporting Services Subscriptions Overview and Introduction to Windows Powershell NOVA SQL Users Group August 23, 2010.
Core LIMS Training: Entering Experimental Data – Simple Data Entry.
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Using SQL*Plus.
Report Subscription.
Presentation transcript:

Reporting Services – Data Driven Subscriptions

General Steps Step 1, Create report and Identify report parameters Step 2, Deploy the report to a server Step 3, Create the Subscription Definition Table Step 4, Define the schedule Step 5, Try to add a data-driven subscription Step 6, Store Secured Credentials for the Report’s Data Source Step 7, Try to add a data-driven subscription again Step 8, Tell SSRS about the definition table Step 9, Map columns from definition table to what SSRS expects Step 10, Set the report parameters Step 11, Define the schedule

Overall view SSRS reports with parameters, deployed to SSRS Server Shared data source to report data, with stored credentials Subscriptions need Shared schedules, Parameter definitions, shared data sources with stored credentials, table definitions for how to execute (delivery method, recipients, output destination, render format, etc.) Data-Driven Subscription for report A Data-Driven Subscription for report B Definition table for data driven subscription – with recipients, output locations, parameters, output render formats, etc. Shared schedule for execution (written out as a SQL Agent job)

What we want to do Deployed report that prompts for Manufacturer, shows monthly shipped tons We want to have the server run the report automatically on a schedule, for specific parameters (one run for Ford, one for Chrysler, etc) We want the scheduled executions to be emailed to specific recipients (maybe managers associated with each manufacturer) We also want the scheduled executions to export the report output to a file share We can populate a SQL table that holds the specifics on the executions, and tell the scheduled job about the table And anytime we want to add, change, or remove recipients, all we need to do is modify the contents of the table, and nothing else. We do this through SSRS Data Driven Subscriptions

Step 1, Identify report parameters When this report was created in Visual Studio, the actual parameter name is called “Manufacturer” (which might be different from the caption) Identify the actual values used behind the scenes in the query for the report, as you’ll need to provide those values in a table. In this case, the possible parameter values are simply the names of the Manufacturers (“Ford”, “Chrysler”) However, that might not always be the case. The display value might be “Ford”, but the underlying key used for the query might be an integer foreign key or some kind of business key. Either way, make sure you’ve identified the possible parameter values!

Step 2, Deploy the report to a server Deploy the report to an existing SSRS Server You can’t create a data driven subscription until you first deploy the report

Step 3, Create the Subscription Definition Table Param1 through Param3 will hold parameter values for executions. Generically named, since some reports might prompt for dates, some for products, etc. If you know you might have a report with as many as 10 parameters, then create 10 parameter buckets here Create two tables (preferably in the same database that holds the source data for the report, but it doesn’t have to be there) One table will hold email recipients for report executions, the other will hold file share locations Store the deployed report name, render format, email address or output path, etc. This maps to what the report’s parameter values would be. So it could be an integer key instead of a string

Step 3, Create the Subscription Definition Table So for the first table, we want to run the report twice, once for Chrysler and once for Ford, and write out PDF files to the Path specified For the second table, we want to email PDF output for Chrysler and for Ford, and email to specific recipients (You can separate multiple recipients in a single run with a semicolon) Valid Render Formats are PDF, MHTML, Excel, Word, TIFF, CSV, XML

Step 3, Create the Subscription Definition Table Note, in this example, there’s just one report definition in each of the tables. Each of the tables can have many report definitions. So the table that defines File Share and/or email output could have entries for a dozen reports Creating these tables (in itself) doesn’t create the data driven subscription. We need to tell the SSRS server about these tables and the columns Note the AutoIncrement value for Write Mode: will cover later

Step 4, Define the shared schedule On the SSRS server, click on “Site Settings”, then “Schedules”, then “New Schedule” On the SSRS server, click on “Site Settings”, then “Schedules”, then “New Schedule” On the SSRS server, click on “Site Settings”, then “Schedules”, then “New Schedule” 1 2 3 Next, on the SSRS Server where the reports are deployed, we need to define a shared schedule This will define the days/time that the job(s) run. Eventually we’ll tie the shared schedule to the actual data driven subscription The recommended practice: create the minimum number of shared schedules to serve the greatest number of report jobs Note: SQL Server Agent MUST be running on the database server associated with the SSRS Server Schedule details

Step 5, Try to add a data-driven subscription On the SSRS Server, go to the folder where the report is deployed, click the Dropdown, and go to Manage. This will give us a dialog of the server properties for the report, including the ability to define a data driven subscription

Step 5, Try to add a data-driven subscription In the Manage dialog, click on Subscriptions And then on the subscriptions page, try to click on the “New Data Driven Subscription” link Note that the link has an exclamation point, indicating that there’s probably an issue In this case, we get the following message Basically, the report’s data source must have specific credentials stored on the server. Very likely the report’s data source is using Windows/SQL authentication, and that’s not sufficient

Step 6, Store Secured Credentials for the Report’s Data Source First, in the SSRS Data Source folder, create a new Data Source for the report to use. Define the Connection String that points to the Database Server and Database Then provide stored credentials, for when the report job accesses the server at execution time Finally, in the report itself, go to data sources, and then specify a shared data source, and point to the data source created in the first step This should be a special domain account set up by the DBA. Don’t use a normal user/developer account

Step 7, Try to add a data-driven subscription again Click on the Subscriptions page And then on the subscriptions page, try to click on the “New Data Driven Subscription” link Now, there’s no exclamation point in the link, which means we can proceed Will lead you to next page, where you’re asked to give the subscription a name, and then chose the delivery method. File Share and Email are separate steps, so if you have a data driven subscription for each of the 2 delivery methods, need to go through the process twice If the definition table (from step 3) is in the same database as the report source data, and if you created a shared data source with stored credentials in the previous step, then select “Specify a shared data source” SSRS also requires stored credentials for the connection (data source) to the definition table from Step 3. We might be able to use same shared data source with stored credentials from Step 6.

Step 8 – Tell SSRS about the definition table Next page will prompt for table. Since we specified “File Share” for the delivery method, we need to tell it about the definition table dbo.tblDataDrivenSubscriptionFileShare Provide a SELECT statement to return all rows for the specific report for which we’re creating the subscription Remember that the definition table might have subscription information for many reports, so the WHERE clause needs to reference the specific report Make sure to click VALIDATE – this will make sure that SSRS has the ability to read the table. (It doesn’t validate the columns, or even how many rows – it simply makes certain that the query can be executed)

Step 9 – Map columns from definition table to what SSRS expects From step 3, we had the following columns in our definition table that we need to tell SSRS about: FileName (the name of the output file for the specific definition) Path (where the file should go ) Render Format (the export type) File Extn (whether a file extension should be created on the file) Write Mode (Whether to overwrite any existing file on execution, or to auto-increment the file name by 1 with a numeric suffix on the output file) Notice that SSRS needs this information – so when it asks for the output file name, we give it our column….when it asks for a render format, we give it out column, etc. When we go through the steps for an email subscription, we’ll be promoted for columns specific to the other definition table (such as email address) Note that we haven’t yet been prompted for the report parameters or the schedule – that comes next. SSRS needs to have write access to the output path designation at runtime. So we need credentials. Again, this should be a special domain account, not a regular user domain account

Step 9 – Map columns from definition table to what SSRS expects For email subscriptions, we need to provide the following columns from dbo.tblDataDrivenSubscriptionEmail EmailAddress Render Format If you had additional recipients to CC: or BCC:, you would have had additional columns back in the definition table If you’re sending an attachment for the email (which will usually be the case), set “Include Report” to true You can also set priority, subject, and comment if you wish For Include Link, you would only set this to TRUE if recipients have access to the report server, and you want them to be able to run the report manually. But for people who can’t (or don’t want) to run the report manually, set this to false

Step 10 – Set the report parameters SSRS will now prompt for how to deal with parameters If the report had five parameters, it would prompt for all five We’re not entering the values for manufacturer – instead, we’re telling SSRS what column from our definition table to use, when running at runtime So in this example, the subscription will run twice – for Chrysler and for Ford, with 2 separate outputs Since we’d use this definition table across many reports, that’s why we’ve kept the parameter column names generic (“Param1”, “Param2”, etc)

Step 11 – Define the schedule Finally, tell SSRS when the subscription should fire Best practice is to select the shared schedule So we created the shared schedule first (independently of any subscription), and then we map multiple subscriptions to it. (This is better than creating 5 report subscriptions and hard-wiring the same scheduled date/time for each one) This will map the subscription directly to the SQL Server Agent Job

What we have at the end

Final notes/recommendations Make sure you’ve identified all report parameters (by name, and also what the underlying parameter values will be….whether they are string values, integer keys, dates, etc) Think ahead of time about execution schedules, recipients, overall strategy. Plan it out! Create 2 general definition tables for subscriptions – one for file share and one for email subscriptions Create a minimal number of shared schedules (independently of the subscriptions), and then apply them to the subscriptions as needed Create shared data sources with stored credentials Additionally, you’ll need to provide credentials for writing to the UNC/shared location when doing file share subscriptions