spatial data with sql server reporting services

32
Spatial Data with SQL Server Reporting Services Using SQL Server Reporting Services you can visualize spatial information in a report or dashboard alongside other business data in the form of tables, charts, or graphs that present other facets of related information. ihail Mateev enior Technical Evangelist, TL @ Infragistics

Upload: mihail-mateev

Post on 22-Dec-2014

3.890 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Spatial Data with SQL Server Reporting Services

Spatial Data with SQL Server Reporting ServicesUsing SQL Server Reporting Services you can visualize spatial information in a report or dashboard alongside other business data in the form of tables, charts, or graphs that present other facets of related information.

Mihail MateevSenior Technical Evangelist, TL @ Infragistics

Page 2: Spatial Data with SQL Server Reporting Services

About me

Mihail Mateev is a Senior Technical Evangelist, Team Lead at Infragistics Inc.

Mihail worked in various areas related to technology Microsoft: Silverlight, WPF, Windows Phone 7, Visual Studio LightSwitch, WCF RIA Services, ASP.Net MVC, Windows Metro Applications, MS SQL Server and Windows Azure

2 |

Page 3: Spatial Data with SQL Server Reporting Services

Agenda

Creating a Simple Report Map SQL Server Spatial Data SRSS Map Control Data Sources

Map Gallery (Installed Maps) ESRI Shapefile SQL Server Spatial Query

Customizing the Map Viewport Adding an Analytic Dataset Adding a Bing Maps Tile Layer Windows Azure Reporting Services and Spatial Data

3 |

Page 4: Spatial Data with SQL Server Reporting Services

Spatial Data

Analyzing sales trends

Analyzing the best placement depending of

different criteria

Navigating to s destination using a GPS device.

4 |

Page 5: Spatial Data with SQL Server Reporting Services

Spatial Data

Allowing customers to track the deliveries

Finding the optimum route for transportation

tasks

Reporting geospatial information on the map

rather than in a tabular or chart format

5 |

Page 6: Spatial Data with SQL Server Reporting Services

Representing Geospatial Features

Points Polylines Polygons.

6 |

PointsPoints PolylinesPolylines PolygonsPolygons

Page 7: Spatial Data with SQL Server Reporting Services

Comparing Raster to Vector Data

Vector Data:describes discrete

spatial objects by defining the coordinates of geometries

Raster Data: represents spatial

information using a matrix of cells.

7 |

X,Y

Rows

ColumnsX,Y

X,Y X,Y X,Y

Page 8: Spatial Data with SQL Server Reporting Services

Geographic and Projected CS

Geographic Coordinate System

Projected Coordinate System

8 |

- X+ Y

- X- Y

+ X- Y

X

+ X+ Y

Data

usually here

Y

Page 9: Spatial Data with SQL Server Reporting Services

Spatial Data and SQL Server

Geospatial Data Types SQL Server supports two different spatial data types:

GEOMETRY and GEOGRAPHY

9 |

Page 10: Spatial Data with SQL Server Reporting Services

Spatial Data and SQL Server

Using Spatial Objects Create Spatial Objects

10 |

Page 11: Spatial Data with SQL Server Reporting Services

SQL Server Reporting Services

SQL Server Reporting Services (SSRS) is a server-based report generation software system from Microsoft.

Administered via a web interface, it can be used to prepare and deliver a variety of interactive and printed reports.

11 |

Page 12: Spatial Data with SQL Server Reporting Services

SRSS and Spatial Data

Map Report Item and Sources for Spatial Data

Spatial data can be provided to the Map Report Item (Map Report Control) in three ways:

1. Map Gallery Reports

2. ESRI Shapefiles

3. SQL Server spatial data stored in a database

12 |

Page 13: Spatial Data with SQL Server Reporting Services

Map Layers

Multi layer support Each layer can contain

spatial data used to draw the map, analytical data, and other properties such as color and size.

13 |

1. Polygon – used to show geographic areas such as countries or states.

2. Line – used to show paths and routes.

3. Point – used to show specific geographic places.

4. Tile – used to display Bing maps in reports.

Page 14: Spatial Data with SQL Server Reporting Services

Creating the Report Project

SQL Server Data Tools

Report Server Project Map Report Control Spatial Data Source

14 |

Page 15: Spatial Data with SQL Server Reporting Services

Spatial Data Source

Tile Source Shapefiles SQL Server Spatial

Data

15 |

Page 16: Spatial Data with SQL Server Reporting Services

Customizing the Map Viewport

Map Projections Center and Zoom Fill, Border, and

Shadow

16 |

Page 17: Spatial Data with SQL Server Reporting Services

Analytical Data

Add an analityc dataset

Match an analityc dataset to a spatial dataset

17 |

Page 18: Spatial Data with SQL Server Reporting Services

Thematic Maps

18 |

Distribution Options Optimal Equal Interval Equal Distribution Custom

Page 19: Spatial Data with SQL Server Reporting Services

Zoom and Transparency

19 |

Page 20: Spatial Data with SQL Server Reporting Services

Deployment

Select TargetServer URL

20 |

Page 21: Spatial Data with SQL Server Reporting Services

Assigning Actions to Map Elements

it is possible to add a degree of user interaction to SSRS maps by assigning actions to elements on the map.

An action is triggered when the user clicks on a particular report element, which can redirect them to a new report or URL

Redirect to report with parameter:

SELECT CODE, CNTRY_NAME, POP_CNTRY, FIPS, geom.STArea() AS area FROM world WHERE (CNTRY_NAME = @country)

21 |

Page 22: Spatial Data with SQL Server Reporting Services

Assigning Actions to Map Elements

22 |

Select Polygon Properties Select the Action tab Select the Go to report

action and Specify other report

Add a parameter

Page 23: Spatial Data with SQL Server Reporting Services

DEMO

Create a report with spatial data from Bing Maps, shapefiles and SQL Server spatial data

Page 24: Spatial Data with SQL Server Reporting Services

Windows Azure SQL Reporting

Windows Azure SQL Reporting works the same as SQL Server Reporting Service – but runs on cloud with some limitation such as it connects only with SQL Azure database.

24 |

1. Preparing a database.

2. Creating a New SQL Azure Reporting Server

3. Developing a Report in BITS

4. Using Spatial Data with Windows Azure SQL Reporting

5. Publishing Reports

Page 25: Spatial Data with SQL Server Reporting Services

Preparing a Database

Windows Azure SQL Database

25 |

1. Create a new SQL Windows Azure Database server

2. Set Firewall Rules

3. Import Spatial Data

Page 26: Spatial Data with SQL Server Reporting Services

Creating a New Azure SQL Reporting Server

Windows Azure SQL Reporting Server

26 |

1. Create a new Azure SQL Reporting Server.

2. Get the Web Service URL

Page 27: Spatial Data with SQL Server Reporting Services

Developing a Report in BITS

Create a Report

27 |

1. Create a new Reporting Server Project.

2. Add a Report

3. Add a new data source

4. Provide the query for fetching the record from database

Page 28: Spatial Data with SQL Server Reporting Services

Developing a Report in BITS

Create a Report

28 |

1. Add a Map control.

2. Choose a dataset with SQL Server spatial data

3. Create a thematic map

Page 29: Spatial Data with SQL Server Reporting Services

Developing a Report in BITS

Create a Report

29 |

1. Select TargetServer URL

2. Publish the Project/Report

3. Verify the Reports in SQL Azure Reporting Service

Page 30: Spatial Data with SQL Server Reporting Services

DEMO

Create a report with spatial data from Bing Maps, Windows Azure SQL Database spatial data using Windows Azure SQL Reporting

Page 31: Spatial Data with SQL Server Reporting Services

QUESTIONS

Q & A

31 |

Page 32: Spatial Data with SQL Server Reporting Services

Sponsors