Recently I delivered a 3 day course in SQL Server Reporting Services (SSRS). The single delegate came from a company that works with risk management data for the financial services industry. The company provides its clients with detailed reports. Keeping data anonymous and secure is important. The delegate had a limited background in Reporting Services. She was however moving in to a role where she would create and maintain sophisticated reports. So she really needed some training. The in depth course included the Reporting Services architecture and its storage features. But, by request we concentrated the training on designing reports, as this was her main task. I provided explanations and demonstrations of creating reports. These ranged from basic to complex filtered reports. Typically the delegate then works through practical exercises to consolidate their skills. In this case, because it was a one-to-one, I could adjust the course to the delegate’s needs. She was the kind of person who learns best by doing things from scratch herself. So what we decided to do is discard the standard exercises that came with the course notes. When asked about the course, she wrote:
“I really enjoyed the class because … I understood everything and developed my own working examples, instead of using the lab examples. I am now confident I can use these.”
This was an important reminder for me on how people learn best. This is by having the opportunity to find their own solutions. As a result of completing the course, the delegate felt fully confident she could create complex reports.
SQL Server Reporting Services is a server-based report generation software system from Microsoft. SSRS allows data held in relational databases to be available as meaningful information. Queried data is presented in rich custom reports. SSRS is part of Microsoft’s Business Intelligence offering, along with Integration Services (SSIS) and Analysis Services (SSAS). Data can be drawn not only from SQL Server databases but a range of data providers. Data held in tables is queried to build datasets. Reports can then be created from these datasets. SSRS is multi-faceted tool that allows:
- Design of report layout
- Management and storage of reports
- Secure access to reports
- Rendering reports in variety of formats; web, PDF, MS Excel and Word
- Distribution of reports
To work with the Report Designer a SSRS project is first created in Visual Studio. With the designer rich and interactive reports can be created. Reports can include:
- Rows and columns of values
- Column totals and other calculations
- Page & report header and footers
- Rows that are grouped, e.g. products details grouped by category
- Dynamic hiding or showing parts of report
- Filtering visible data based on interactive parameters
Users can also use Report Manager to administer reports. This is a Web-based application that interfaces with the Report Server web service. With Report Manager, users can view, subscribe to, and manage reports as well as manage and maintain data sources and security settings. Report Manager can also deliver SQL reports by e-mail, or place them on a file share. For more see our SSRS course .
On April 25th I am giving a talk introducing web development with ASP.Net MVC. This will be at a major developer event in Bristol, DDD South West. By the way DDD stands for Developer Developer Developer. This will be my 5th DDD talk. My talks keep getting selected each year! The event is free and details are on the site. The talk will cover the benefits and architecture of MVC. It is really the very start of my 4 day MVC training course. I will demonstrate how to create a simple application. The emphasis will be on the core architecture. This is because I found that it was only on the 4th day of the course that delegates could really get this. This architecture provides many benefits, but the flow of control is not entirely intuitive. If you want an industrial strength application, there is another DDD talk. This is described as “A full walk through of a real life, well architected application.” Microsoft’s original web development offering is ASP.Net Web Forms. For more on the differences between Web Forms and MVC see the June 2014 TalkIT newsletter: How do you build enterprise websites? The MVC pattern is radically different from Web Forms. Much more of the underlying nature of the internet is revealed. Developers work more closely with HTML and HTTP. Here are the components of the pattern: Model; manages business logic classes and data access View; renders model objects with client-slide intelligence Controller; Handles incoming requests then chooses a view to render
Here are the key benefits:
- MVC pattern encourages separation of presentation and application logic
- Reusable and consistent model classes for application logic
- Easy to include unit tests
- You decide the application URLs via flexible routing system
- Tight control over HTML that is standards-compliant
- Employs rich features of the ASP.NET platform
For more see our MVC course.
Let’s look at estimating pi using the Monte Carlo method. Monte Carlo methods employ repeated random sampling to solve problems. Consider a circle inscribed in a unit square. Given that the circle and the square have a ratio of areas that is π/4, the value of π can be approximated using a Monte Carlo method.
- Draw a square on the ground, and then inscribe a circle within it.
- Uniformly scatter some objects of uniform size (grains of rice or sand) over the square.
- Count the number of objects inside the circle and the total number of objects.
- The ratio of the two counts is an estimate of the ratio of the two areas, which is π/4. Multiply the result by 4 to estimate π.
In this procedure the domain of inputs is the square that circumscribes our circle. We generate random inputs by scattering grains over the square then perform a computation on each input (test whether it falls within the circle). Finally, we aggregate the results to obtain our final result, the approximation of π. There are two important points to consider here: Firstly, if the grains are not uniformly distributed, then our approximation will be poor. Secondly, there should be a large number of inputs. The approximation is generally poor if only a few grains are randomly dropped into the whole square. On average, the approximation improves as more grains are dropped. Interesting, but how do we code this. Here is one approach.
- Scattering the grains can be simulated using random numbers.
- These repeatedly provide the X and Y coordinates of each grain in range of 0 to R (where R is the radius).
- Then find the distance from the origin of each grain using Pythagoras’s Theorem.
- Test if this distance is less than R, this means the grain is inside the circle.
- Finally find the ratio of grains in the circle to the grains in the square.
Thanks to Wikipedia
Thanks to Andy Olsen for MVC slides
David Ringsell MCPD 2015 ©