Introduction to the SSRS development environment

Source: Internet
Author: User

The report definition for SSRS is based on the report Definition language (LANGUAGE,RDL), providing a richer visual representation.

Introduction to the SSRS development environment

1. Report Items

The first step in designing a report with Report Designer is to build the report project first, click Start, all Programs, Microsoft SQL Server 2012, SQL Server Data Tools.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image002[14] " alt= "clip_image002[14]" src= "http://s3.51cto.com/wyfs02/M00/58/CB/wKioL1S822KSCNipAAFBSV60pjc385.jpg" border= "0" Height= "393" width= "/>"

In the New Project window, on the left, select Business Intelligence, Reporting Services, select Report Server Project on the right, name enter Bisample, Then enter the appropriate save directory, then click "OK" to save. In this folder, there will be a file with the extension "*.sln", which will be responsible for integrating all the data files in the folder, and to open the project later, just double-click the file.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image004[6] " alt= "clip_image004[6]" src= "http://s3.51cto.com/wyfs02/M00/58/CB/wKioL1S822OynabRAAMphRQ5Pd0522.jpg" border= "0" height= "615" width= "1134"/>

A Visual studio project also supports a tree-like project structure, in which projects can be embedded within a project, and this inline project can be a different project type, for example, you can embed an SSIS project that is responsible for this report ETL in a report project. To join a new project, simply click "File", "Add", "New project ..." To decide to add the new project to the existing project.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image006[6] " alt= "clip_image006[6]" src= "http://s3.51cto.com/wyfs02/M01/58/CB/wKioL1S822TjMOL5AAEUbz2YcRc561.jpg" border= "0" height= "Width=" "502"/>

The report server project is one of the templates for a business intelligence project, and in the templates listed, the Report Server project and the Report Server Project Wizard are related to SSRS. Where the Report Server Project Wizard uses the consumer interface to produce a report structure, it is only appropriate for a relatively simple report type.

2. Report Designer

After the new project is established, the "solution Explorer" tree appears on the right side of the screen. Used to enumerate the shared data sources (*.rds files), shared datasets (*.rds files), and report definitions (*.RDL files) that are required for the report project.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image008[6] " alt= "clip_image008[6]" src= "http://s3.51cto.com/wyfs02/M01/58/CE/wKiom1S82pKwGtrdAABK4mJBvTE703.jpg" border= "0" height= "123" width= "217"/>

Report Designer is a visual integrated development interface that can be used to set features such as data sources, datasets, report page configurations, property settings, Report previews, and deployment reports. The Report designer itself inherits the features of Visual Studio, placing different functions in a separate window where users can drag and drop their own windows to form a favorite interface. If you want to restore, you can click on the toolbar window, reset window Layout to revert to the default configuration of the development environment.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image010[6] " alt= "clip_image010[6]" src= "http://s3.51cto.com/wyfs02/M02/58/CE/wKiom1S82pWBqoUNAAT75kieedg538.jpg" border= "0" height= "661" width= "1187"/>

The top right of the Report Designer screen is the scenario explorer that you described earlier. The center of the screen is the report design area, a total of two tabs, respectively, "Design" and "Preview", respectively, to be responsible for the report design and preview the design completed report.

When you click a different report in the design area, the Properties window at the bottom right switches to the corresponding property content. The Properties window lists the list of properties that can be set by the report, and the designer can choose to modify the attribute values by sorting the fire alphabetically and using the drop-down menu fire direct input.

The Toolbox is designed to provide all the items needed to design a report, and the user can drag and drop the report into the report design area. The items provided in the Toolbox can be categorized into two categories, where data items such as data tables, matrices, lists, icons, gauges, and maps can display data breakdowns or aggregate results within a dataset, and are therefore referred to as "data area items".

Data region

Layout description

Support Group Hierarchy

Group mode

Data table (table)

Table to render data with fixed number of columns

Multilayer

Rows (rows)

Matrices (Matrix)

A row or column can be generated dynamically (determined by the retrieved data)

Multilayer

Columns (Columns) and rows (rows)

Listing (list)

Freely select layout to render the data in the report

First floor

Icon (Chart)

Visualize aggregated data in a graphical manner

Depending on the type of data

Depends on the type of icon

Meter (Gauge)

Displays the relative size of the summary values in the form of a measurement meter

Depending on the type of data

According to the instrument type, it is decided

Map

To mark values as geographic information

Multilayer

Point, line, polygon

As with other text boxes, shapes, line charts, rectangles, and subreports, these report items can be arbitrarily configured anywhere on the report and are therefore called "stand-alone report items."

In addition, some are between data regions and independent report items, they cannot exist independently but can design groups themselves and have their own data rendering mode, also known as micro-graphics (micro-charting), these micro-graphics include data bars, sparklines and indicators.

The "Report Data" window on the left side of the screen displays the dataset, built-in fields, parameters, and data sources for the entire sheet. The built-in field lists, parameters, and datasets can provide designers the ability to drag and drop into data regions in the report design area.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image012[6] " alt= "clip_image012[6]" src= "http://s3.51cto.com/wyfs02/M00/58/CE/wKiom1S82pbA7p39AADVfHRFbNI292.jpg" border= "0" height= "346" width= "/>"

3. Set up a shared data source

The first step in developing a report is to establish the connection information needed to read the report data. Connection information can be stored in two different ways. The following were:

n Shared Data sources: the shared scope of the so-called shared data source includes the data provider type, the connection string, and the security settings connected to the database. Shared data sources are stored separately from the report server and can be shared across reports.

n Embedded Data sources: Although the data provider type, connection string, and security settings connected to the database are also included, the embedded data source is not isolated from the report store, but embedded in the report definition, and the embedded data source is only available for single datasets within the report.

In the Enterprise report Design architecture, it is recommended to use shared data sources, on the one hand, it is easier to manage through isolated data sources, and it can save the connection resources that are not necessary to duplicate the source database. To create a shared data source, in solution Explorer, right-click Shared Data Sources, select Add New data source, and in the Shared Data Source Properties dialog box that pops up, You can set the name of this data source while using the drop-down menu to select the connection type. The list of connection types is the data processing extension for the report server, where the default value of Microsoft SQL Server is used first.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image014[6] " alt= "clip_image014[6]" src= "http://s3.51cto.com/wyfs02/M01/58/CE/wKiom1S82pfyEUpKAAD_HtcatUM430.jpg" border= "0" height= "482" width= "664"/>

Next, click Edit at the connection string to make a connection to the SQL Server server location, validation mode, and database in the Connection Properties dialog box. After testing the connection, click the "OK" button to automatically output the required connection string.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image016[6] " alt= "clip_image016[6]" src= "http://s3.51cto.com/wyfs02/M02/58/CB/wKioL1S8227Qz6tIAAEcs-XiO94455.jpg" border= "0" height= "521" width= "383"/>

Next, switch to the "Credentials" tab, the previous connection properties are the connection information that is connected to the data source when the design phase is set, and the "Credentials" tab is the setting of which authentication mode the report uses to connect to the data source when it is in the execution phase. At present, the system supports four ways of setting up the connection data source authentication, respectively:

n Windows Integrated Authentication: This mode is recommended for development using the Windows account of future report readers. However, it is not really possible for the reader to read the report so that all people have access to the database account and permissions, so after the report is deployed, it will be modified to use user name authentication, but the simulation is Windows Integrated authentication.

n Use this user name and password: Specify a fixed account for the data connection.

N Credential hint: Let the user enter the account password by themselves.

n does not use credentials: The data source does not require authentication.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image018[6] " alt= "clip_image018[6]" src= "http://s3.51cto.com/wyfs02/M02/58/CB/wKioL1S823Cwo-CGAAETjZztb_8420.jpg" border= "0" height= "482" width= "664"/>

When you click the OK button, the settings for the shared data source are complete.

4. Set up a shared data set

After you set up the shared data source, you can set up the shared dataset as appropriate. Why is that the case? Because the data set is primarily the computational logic needed to maintain business analytics through SQL syntax. In general, if you want people to work out consistent results, it's best to use a shared dataset, such as a table that defines the parameter menu and the main analysis information, preferably with a shared dataset. However, if it is a single-sex, without the necessary analysis of sharing, it is not necessarily required to share the dataset.

To set up a shared dataset, in Solution Explorer, click the Shared Datasets folder, right-click to select Add New DataSet, and in the Shared DataSet Properties dialog box that pops up, You can set the name of this dataset and use the drop-down menu to select the data source. (Note that shared datasets can only use shared data sources.) In the query area, it is the input query statement.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image020[6] " alt= "clip_image020[6]" src= "http://s3.51cto.com/wyfs02/M02/58/CE/wKiom1S82p_jl6w3AAHQETQtUJ0004.jpg" border= "0" height= "641" width= "677"/>

When setting up a shared dataset, it is important to note that many it people are accustomed to simply summarizing it once in a query statement (to the point where it is most streamlined), for example, to see a large class hierarchy of products, so that statements are group by to product class, even if the dataset is set to a shared dataset, However, other analyses are difficult to reference, so when writing a statement, it is advisable to slightly relax the summary level. For example, this report is going to the product class level, and the data set is group by product fine, product category and product category, so the future practicality will be high.

5. Referencing report-level data sources and datasets

After the shared dataset Setup is complete, you will need to include a blank report in your project next. In Solution Explorer, click the Reports folder, right-select Add, new Item, and select Report in the Add New Item dialog box that pops up. You can also name the report in this dialog box. When you click the button, a new report is generated and the report design area appears.

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image022[6] " alt= "clip_image022[6]" src= "http://s3.51cto.com/wyfs02/M00/58/CB/wKioL1S823OTas_-AAGuREFKynk338.jpg" border= "0" height= "546" width= "946"/>

Note: It is not recommended to click "Add New Report" directly, which will start the Reporting wizard.

At this point, you can set up a report-level data source by "Data Sources" on the left side of the "reports" (always remember that not all shared data sources and shared datasets are set up to be able to rest and relax, and the first action to design each report Always set the report-level data source and dataset).

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" clip_image024[6] " alt= "clip_image024[6]" src= "http://s3.51cto.com/wyfs02/M01/58/CE/wKiom1S82qSRAqDGAAIM-z5wvdI760.jpg" border= "0" height= "489" width= "925"/>

In the Data Source Properties dialog box that pops up, you can choose to share a data source or set up an inline data source. If you are setting up a shared data source, you can select a data source in the drop-down menu that has been previously completed.

After you have set up your report-level data source, you can right-click the data source you just set up and choose Add DataSet. In the DataSet Properties dialog box that pops up, you can either select a shared dataset that you previously set up, or set up an inline dataset yourself. If you want to select a shared dataset, you can simply click the dataset icon and the inline dataset will need to enter the query statement yourself.

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px, "title=" clip_image026[6] "alt=" clip_image026[6] " Src= "http://s3.51cto.com/wyfs02/M02/58/CE/wKiom1S82qiw4bBXAAGHy-AkjmE608.jpg" border= "0" height= "640" width= "623" />



This article is from the SQL Server deep dives blog, so be sure to keep this source http://ultrasql.blog.51cto.com/9591438/1605893

Introduction to the SSRS development environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.