What is SSRS?

What is SSRS?

SSRS or SQL server Reporting Services which is also called Microsoft SQL reporting is a component of the Microsoft BI stack. Reporting Services has intergraded into a mature and flexible reporting Tool.

Organizations can leverage Reporting Services and the Microsoft Business Intelligence Platform to implement a variety of reporting solutions, including enterprise reporting, Internet reporting, ad hoc reporting, and embedding reports in custom applications.

 

Why Use Reporting Services?

Reporting Services can help you implement a wide variety of type reporting. For example, Reporting Services can address two of the most pervasive reporting needs in every organization: standard reporting and ad hoc reporting.

Standard reporting

A standard report is a conditioned report whose layout is not meant to be changed by end users. Sales by Product marketing reports and Balance Sheet financial reports are good examples of standard reports. Standard reports can be rather complex. For instance, features a standard report that has multiple tables and chart sections:

 SSRS Standard reporting

 More...

Localization

All previous topics were about Azure and how to work with that great technology. But each large project should be localized. We had a case when a project was under development for several years, had a big database and a lot of pages and needed to be localized.

In this article I will show you architecture for that localization. I will do it in simple way and will show general moments: how to save a current language? Work with localized database and localized strings in code or HTML.

 

First we need to open out MVC solution and database project.

Let's change our database project. In very first step we should create table “Language”:

Localization Table “Language”

Table “Language”

  More...

Convert List to DataTable

This post is related to the previous one - List instead of DataSet, with the ways how to convert DataTable to List.

Another side

However, it could be the case - when you need to do backfire - convert List to DataTable

For example, it could be useful when you are working with Syncfusion and want to export your list to Excel document. This Syncfusion framework does the method that will export a list to Excel. We just have:

 

  •  ImportArray
  •  ImportDataColumn
  •  ImportDataTable

 

But there are no methods that will get as input parameter some List and return to Excel in the result.

So we have created an extension method for List that allows us to convert List to DataTable. It is very useful. You can work in your solution with List. And just in the end when you want to export that List to Excel - you can call the method that will convert your List to DataTable. The code is very simple:

ConvertToDataTable

ConvertToDataTable

 More...

DataSets. List instead of DataSet

DataSet

A DataSet is a collection of data.

Most commonly a DataSet corresponds to the contents of a single database table, or a single statistical data matrix, where every column of the table represents a particular variable, and each row corresponds to a given member of the DataSet in question. The DataSet lists values for each of the variables, such as height and weight of an object, for each member of the DataSet. Each value is known as a datum. The DataSet may comprise data for one or more members, corresponding to the number of rows.

Our experience tells that using DataSets in projects is not the best solution. But in some situation, it could be the case when, for example, we need a project for support and there won't be another way except -  to work with DataSets.

The term DataSet may also be used more loosely, to refer to the data in a collection of closely related tables, corresponding to a particular experiment or event.

 

List instead of DataSet

DataSet are not useful. Because property name should be as the string. 

For example:

var age = Convert.ToInt32(members[i]["MemberAge"].ToString());

 

But if someone will change column name - application still build without errors but at runtime you will receive an exception "Column abc does not belong to the table?"

And this is not quite easy to work with DataSets during Debugging and it is not very useful. Plus there are some other minor reasons why we should not use DataSet.

Instead of DataSet we can use List. But this is not a method that can convert DataTable (item of DataSet) to List.

 

Solutions

There are two solutions how to convert DataTable to List.

 

  • First solution - with Automapper.

Here is the code:

 

AutoMapper DataSets

AutoMapper

 More...