Continuing my intrepid journey in the SQL Server 2008 R2 land, I will discuss the new features of the recently-released CTP3. In this blog, I’ll talk about the first new feature that caught my attention – BIDS support for 2008 and R2 projects.
After hearing the outcry from many developers about project compatibility, in R2 Microsoft has decided to support both SQL Server 2008 and R2 report server projects. Similar to Analysis Services, Reporting Services now lets you target a server version in the project deployment settings. There is even a cool Detect Version link that would detect the SQL Server version based on the TagetServerURL setting.
So, you can have a project that targets either edition. What happens when you use R2-specific features, such as the map control, but set the TargetServerVersion to SQL Server 2008?
The map, Map1, was removed from the report. SQL Server 2008 Reporting Services does not support map report items.
I hope this message got improved before R2 ships because BIDS doesn’t actually remove the map control from the report; you just get a build error.
You should know that as with previous versions, you can deploy older RDLs to the server so you don’t have to upgrade your report definitions to R2. For instance, you can deploy RDL 2005 and the server will render the report via the compatibility interfaces without upgrading it to R2 RDL. Notice also that now we have more deployment settings, such as TargetDatasetFolder and TargetReportFolder but that’s a subject for another blog.
https://prologika.com/wp-content/uploads/2016/01/logo.png00Prologika - Teo Lachevhttps://prologika.com/wp-content/uploads/2016/01/logo.pngPrologika - Teo Lachev2009-11-10 20:01:412016-02-17 07:24:36BIDS 2008 and R2 Project Support
Microsoft announced release on SQL Server 2008 R2 November CTP (CTP3) with a build number of #1352.12. MSDN, TechNet Subscribers and TAP customers can download the SQL Server 2008 R2 November CTP today. Non-subscribers will be able to access the CTP on Nov. 11th. This should be a feature-complete build that includes all SQL Server R2 functionality.
Reporting Services
The new Reporting Services features include:
SharePoint Integration
SharePoint Integration has several new features that include the following:
Support for multiple SharePoint Zones.
Support for the SharePoint Universal Logging service.
A new data extension.
A query designer for SharePoint Lists as a data source.
Support for right-to-left text with Arabic and Hebrew in the SharePoint user interface.
In a report, the data extension supports include data from SharePoint lists for SharePoint Foundation 2010, SharePoint Server 2010, Windows SharePoint Services 3.0, and Office SharePoint Server 2007.
Report Parts.
Shared Datasets and Cache Refresh Plans
Shared datasets are a new type of report server item that can retrieve data from shared data sources that connect to external data sources.
Cache refresh plans let you cache reports or shared dataset query results on first use or from a schedule.
New Data Visualization Report Items
The November CTP introduces several new report items that depict data:
Sparklines and data bars are simple charts that convey a lot of information in a little space. These are often used in tables and matrices. Their impact comes from viewing many of them together and being able to quickly compare them, instead of viewing them singly.
Indicators are minimal gauges that convey the state of a single data values at glance.
Enhancements to Reporting Services Features
The November CTP provides the following enhancements to Reporting Services features that were released in earlier SQL Server 2008 R2 CTPs or SQL Server 2008:
Configuring a Map Layer—The Map wizard displays data from both the spatial data source and the analytical data source to help you choose the field on which to match.
Calculating Aggregates of Aggregates—You can create expressions that calculate an aggregate of an aggregate.
Enhanced Support for Expressions—New globals and a new property for report variables provide support for overall page numbering, naming pages, and information that is specified in the renderer.
Rotating Text 270 Degrees—Text boxes can now be rotated 270 degrees.
Report Pagination—Page breaks on tablix data regions (table, matrix, and list), groups, and rectangles give you better control of report pagination.
Naming Excel worksheet tabs—You can set properties on the report to name worksheet tab when you export the report to Excel.
Business Intelligence Development Studio Support for SQL Server 2008 Reports and Report Server projects
Business Intelligence Development Studio supports working with both SQL Server 2008 and SQL Server 2008 R2 reports, and with Report Server projects in the SQL Server 2008 R2 version of Business Intelligence Development Studio.
New Web Service Endpoint
The report server includes a new management endpoint named ReportService2010.ReportingService2010. This endpoint merges the functionalities of both the ReportService2005.ReportingService2005 and ReportService2006.ReportingService2006 endpoints, and can support management operations of the report server in both native mode and SharePoint integrated mode. It also includes new features that are introduced in SQL Server 2008 R2, such as shared datasets and cache refresh.
Analysis Services
The Analysis Services new features are centered around Gemini and include:
PowerPivot for Excel
PowerPivot Field List Enhancements
Numerous enhancements have been added to the PowerPivot field list. These include the following:
Automatic detection of relationships when columns from unrelated tables are used in a PivotTable.
Support for searching fields by name.
Support for named sets.
PowerPivot Data Source Editing
Support is available for the following data source editing tasks:
Refreshing data for table, for all tables from a data source, or for all the tables in the PowerPivot window.
Editing data source information such as server name, database name, and credentials.
Editing table settings such as data source table or query used, columns imported, and filters.
Support for More Types of Data Sources
Targeted support has been introduced for importing data from the following sources:
Microsoft Access 2003, 2007, 2010
Microsoft SQL Server 2005, 2008, 2008 R2 Analysis Services
PowerPivot workbooks published to Analysis Services running in SharePoint Integrated Mode
Text files
Excel 97-2003, 2007, 2010
Microsoft SQL Azure
Oracle 9i, 10g, 11g
Teradata V2R6, V12
Sybase
Informix
IBM DB2 relational databases 8.1
Enhanced Data Analysis eXpressions (DAX)
DAX functionality has been significantly expanded in the following ways:
User interface enhancements include better propagation of errors and easier creation of DAX formulas.
Several functions have been added, including a set of functions that operate on textual data, as well as those that provide common Date and Time manipulations.
Several performance and functional capabilities have been introduced, including automatic recalculation.
Support for handling referential integrity violations between related tables has been introduced.
Automatic selection of data types for expressions is available.
For more information, see the topic “Data Analysis Expression Language Reference” in SQL Server 2008 R2 Books Online.
DAX is also documented in the online Help of the PowerPivot for Excel add-in. For more information, see the Help file that is installed with the add-in.
PowerPivot for SharePoint
Management Dashboard
A management dashboard for IT has been introduced. This dashboard provides visibility into PowerPivot use on a SharePoint farm that includes information about the following areas, as well as a rich PowerPivot workbook that can be used to build custom reports:
Published PowerPivot workbooks, including number of queries executed, number of users and size per workbook in the dashboard.
Hardware resource utilization for the PowerPivot service, including CPU and memory, is reported on a daily basis to the dashboard.
Data refresh activity is reported for all PowerPoint workbooks that are accessed through the same PowerPivot service application.
For more information about this feature, see the topic “PowerPivot Management Dashboard” in SQL Server 2008 R2 Books Online.
Enhanced Infrastructure
The following enhancements to infrastructure are available:
Claims-aware support to enable a user’s identity to flow between SharePoint components in a secure manner.
Parallelized refresh of PowerPivot data.
Performance optimizations.
https://prologika.com/wp-content/uploads/2016/01/logo.png00Prologika - Teo Lachevhttps://prologika.com/wp-content/uploads/2016/01/logo.pngPrologika - Teo Lachev2009-11-10 03:13:432016-02-17 07:31:03SQL Server 2008 R2 November CTP (CTP3)
Reporting Services supports an Aggregate function to retrieve aggregated values directly from the data provider if the provider supports this feature. The Aggregate function is especially useful with retrieving data from Analysis Services because it may be difficult if not impossible to recreate aggregated values on the report, such as when the cube script overwrites the server aggregates.
It’s easy to use the Aggregate function. Just replace the default Sum() aggregate function with Aggregate() in the group subtotals. When you do this, the Analysis Services provider brings in additional rows that include the server aggregates which the report displays in the group subtotals.
Recently, I came across a report that would return the following exception after attempting to use Aggregate().
The Value expression for the text box ”<textbox.’ uses Aggregate with an invalid scope parameter.
I couldn’t find anything wrong with the way Aggregate() is used because it was in the right place on a crosstab report. Robert Bruckner from the Reporting Services team helped me understand the Aggregate() function limitations:
The Aggregate function can only be used if the current scope and all parent group scopes are all based on simple field references (e.g. =Fields!Accounts.Value), or constants. The Aggregate function also cannot be used in detail rows.
In my case, the report was using a parent-child Analysis Services hierarchy. To show the data recursively, the tablix Details group was set to group on =Fields!Account.UniqueName. This is an extended property that the SSAS provider supports and it’s not a simple reference. Changing the grouping to =Fields!Account.Value resolved the issue.
New OS (Windows 7 in this case) and new issues when trying to connect to Analysis Services on a remote server.
I installed Windows 7 and added it to a corporate domain. I can use SSMS to connect to some SSAS servers but there was one server (the most important of course) which refused the connections with the following dreadful message which I am sure you’ve seen somewhere along the line:
TITLE: Connect to Server
——————————
Cannot connect to <servername>.
——————————
ADDITIONAL INFORMATION:
The connection either timed out or was lost. (Microsoft.AnalysisServices.AdomdClient)
——————————
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. (System)
——————————
An existing connection was forcibly closed by the remote host (System)
I was able to connect to that server from other non-Windows 7 machines so I narrowed the issue to Windows 7. Interestingly, running the SQL Server Profiler on the server showed that the right Windows identity was passed so the issue wasn’t with the server itself either. Even more interesting, I had no problems connecting to SQL Server Database Engine on that server using Windows Authentication. Attempting to connect to the server using the SQL Server Profiler on the Windows 7 machine or attempting to browse the cube in BIDS would shown another enlightening message:
“The security database on the server does not have a computer account for this workstation trust relationship”
Binging the internet showed that Kerberos doesn’t agree with Windows Server 2008 on the server and Windows Vista (or Windows 7) on the client. But, in my case, the server was running Windows Server 2003 with SP2. More binging and an Eureka moment after reading KB 976419 which luckily has just been released.
Windows Live ID Sign-in Assistant 6.5 installs a new Security Support Provider (SSP) package. The SSP package causes the Security Support Provider Interface (SSPI) that is used by the Analysis Services OLE DB provider not to switch to NTLM authentication.
You gotta be kidding me! So, the unassuming Live ID Assistant, which every Live application out there recommends, nukes NTLM connectivity to Analysis Services? In case you are interested, since a hotfix wasn’t available yet, I went with method 2, which unregisters the livessp provider, and the problem when away.
I got to say that for the past two years I had my fare share of connectivity issues with Analysis Services. It looks to me that the Analysis Services team has to go back to the OLE DB Provider drawing board and solve these issues. If I can connect to the Database Engine, I should be able to connect to Analysis Services.
We are excited to announce the availability of an online Analysis Services 2008 class – no travel, no hotel expenses, just 100% content delivered right to your desktop! This intensive 3-day online class (14 training hours) is designed to help you become proficient with Analysis Services 2008 and acquire the necessary skills to implement OLAP and data mining solutions. Learn how to build an Adventure Works cube from scratch. Use the opportunity to ask questions and study best practices..
Applied Analysis Services 2008 Online Training Class with Teo Lachev
Date: November 16 – November 18, 2009 Time: Noon – 4:30 pm EDT; 9 am – 1:30 pm PDT 14 training hours total for only $799!
Attend this class for only $799 and get a free unrestricted e-book copy of the book Applied Analysis Services 2005 by Teo Lachev!
For more information or to register click here!
https://prologika.com/wp-content/uploads/2016/01/logo.png00Prologika - Teo Lachevhttps://prologika.com/wp-content/uploads/2016/01/logo.pngPrologika - Teo Lachev2009-10-24 22:54:002021-02-16 03:45:35Applied Analysis Services 2008 Online Training Class with Teo Lachev
An interesting “issue” popped up today. I did a fresh install of Windows 7 on my brand new HP 8530w laptop, which is a great laptop BTW. I install SQL Server 2008 followed by SP1 only to find that the Web Service URL and Report Manager URL don’t show up in the Reporting Services Configuration Manager.
The report sever would run just fine on http://localhost/reportserver and the URLs were registered correctly in the rsreportserver.config. I went as far as whipping out some WMI code and it would return the URLs as it should. But the darn URLs won’t show up. Not to mention that another user has recently reported the exact same issue to me. A bug? I started thinking of re-installing SQL Server.
Then, a Eureka moment! As with most things, there was an easy explanation. For some reason, Windows 7 has set the system font size to be 125%. Resetting it to 100% fixed the issue although it could have been a good idea to increase the label height in Reporting Services Configuration Manager to avoid such font scaling issues.
After retiring Office Web Components (OWC), which can hardly can pass the web test as it is implemented as an ActiveX control, Microsoft left developers with no web-based browser for Analysis Services. True, for those who can afford the hefty price tag, Microsoft Office SharePoint Server (MOSS) supports server-side Excel spreadsheets that render to HTML. However, while Excel rules the Windows-based OLAP browser space, HTML-based Excel spreadsheets with limited filtering can hardly meet the demand for web-based interactive reporting. Then, there is an option to author Reporting Services OLAP reports but outside limited interactive features their layout is pretty much fixed at design time.
What’s really needed is a Silverlight Analysis Services control that ships with Visual to let developers embed an Excel-like Analysis Services browser into their ASP.NET applications. You need this control and I need it but it’s not coming anytime soon. Meanwhile, third-party vendors rush in to fill the gap.
In a recent project, we used Dundas OLAP Chart for Analysis Services, which I mentioned in one of my previous blogs. Dundas has just released version 7 of this control and I really like what I see. It’s currently the best OLAP-based chart in the industry. The Dundas OLAP Chart for Analysis Services is a regular ASP.NET control with AJAX features for improved user experience. With Silverlight establishing as the web platform of choice for web developers, you may be looking for a Silverlight-based Analysis Services browser. This is where the Intelligencia for Silverlight comes in.
I blogged about Intelligencia for Reporting Services before and pointed out where I think it surpasses the MDX Query Designer included in Reporting Services. What IT-Workplace has done this time is bringing their product to the web and it has wisely decided to use Silverlight. The moment I saw the new version, it grabbed my attention. Users familiar with Excel PivotTable reports would find the Intelligenca metadata pane (Field List) very similar. Users can create a report by dragging and dropping objects to the report pane on the right. Actually, I would love to see IT-Workplace adding the Filter, Columns, Rows and Filter panes below it just like Excel. I’d welcome also in-place filtering just like Excel. You got the idea. For me and my users, the more Excel-like the browser is the better. This lowers the learning curve and unifies the desktop vs. web experience.
But Intelligencia for Silverlight is more ambitious than just bringing Excel-like reporting to the web. The control has scriptable interface and a filter control which allows management dashboards to be created by linking grids and filters, as the first link on the web page demonstrates.
In summary, while still rough around the edges (it’s currently in a beta phase), I think Intelligencia for Silverlight has a lot of potential and is positioned to fill in a wide gap left by Microsoft by letting web developers embed an Analysis Services OLAP browser in their applications. Powered by Silverlight, Intelligencia for Silverlight could bring Excel PivotTables to the web. Visit the Intelligencia for Silverlight web page, download and test the control, and provide feedback to improve the control
Relax…this blog is all about Analysis Services and not about polygamy or something worse.
SSAS 2005 went beyond the “classic” OLAP model by introducing flexible dimension-to-measure group relationships, including many-to-many, referenced, fact relationships. M2M relationships can solve some nagging business problems. For example, in a recent project where we had to implement a financial cube, there was a requirement that a G-L account can belong to multiple account groups. This is a classic M2M scenario which can be elegantly solved by introducing a M2M relationship. Adventurizing this, let’s take a look at this schema.
Here, I changed the Adventure Works schema by adding a DimGroup and DimGroupEmployee tables. The DimGroup dimension is a parent-child dimension that lets the end user slice data by territory. An employee can be associated with one or more territories (think of a sales manager that covers multiple territories. This M2M relationship (groups-territories) is resolved via the DimGroupEmployee table. In the cube, the DimGroup is configured to join the Reseller Sales measure group via a Group Employee factless measure group that is bound to the DimGroupEmployee table. This lets us browse the reseller measures by group.
So, everything is cool, right? Yes, at least until I realized that the aggregated totals need to be adjusted for some account groups. To demonstrate this, suppose that you need a scope assignment that overwrites the Georgia’s total.
Do you see the problem? The Group1 total didn’t budge. However, if you do the same on a parent-child dimension that joins the measure group via a regular relationship, the total would change. Microsoft declared this behavior with M2M by design. When you come to think about it, it makes sense. To aggregate the measures, the server must go via the bridge table (DimGroupEmployee) to find the qualifying members (DimEmployee) that belong to the member on the one side of the relationship. So, when you make an assignment, you are essentially overwriting this behavior.
If a calculation has a slice in a M2M dimension, it applies to a cell only if the cell coordinate matches the M2M slice. When a cell is at a higher level for the M2M attribute, the calculation does not apply and will not be rolled up to the parent level. Intuitively, M2M attribute is non-aggregatable. In this case, when calculating grand total, the SSAS calculation engine will not sum up the subtotals from each group. However, if the assignment is made on many side (DimEmployee in our case), then the aggregating on DimGroup will work as expected.
Now, of course as a modeler, you would hope of a magic switch to let you roll up the assigned values to align the M2M behavior with regular relationships but for now we have to deal with the “by design” behavior. Microsoft suggested a workaround to introduce a scope assignment that forces the M2M members to aggregate, something like:
This works but it may introduce a performance penalty with larger dimensions. Instead, in our case, we decided not to use an assignment at all. We introduced a new helper measure to the measure group (FactResellerSales in this case) that would perform the required calculations. Since the measure values are mapped multiple times to the many side, we use simple assignments to zero out the measure for the groups that it doesn’t apply.
One year after submitting this small article, SQL Server Magazine has finally published it. This article demonstrates how you can use table-value parameters (TVPs), a new feature in SQL Server 2008, to let you pass multivalued parameters from a report to a stored procedure.
The code can be downloaded from the SQL Server Magazine site or from here.
https://prologika.com/wp-content/uploads/2016/01/logo.png00Prologika - Teo Lachevhttps://prologika.com/wp-content/uploads/2016/01/logo.pngPrologika - Teo Lachev2009-09-11 16:14:022021-02-16 03:46:07Passing Multivalued Parameters in SQL Server 2008
Continuing my intrepid journey through the new Reporting Services R2 enhancements, in this blog I’ll demonstrate some of the cool map features. As you’ve probably heard, R2 brings a brand new map control that lets you visualize spatial data on your reports. Since mapping is the one of the major enhancements in R2, there will be plenty of resources to cover it in details. For example, Robert Bruckner has written a great blog to get you started with mapping. The SSRS R2 forum adds more resources.
But what if you don’t need to visualize geospatial data, such as restaurants in the Seattle area? You shouldn’t bother with the map, right? Not so fast. What’s interesting is that the map supports the two spatial data types in SQL Server: geography and geometry. The latter lets you visualize everything that can be plotted on the planar coordinate system. That’s pretty powerful when you get to think about it. If you have the item coordinates, you can map pretty much everything. A few weeks ago, for example, I saw a Microsoft sample map report that plotted floor layout. Today, I’ll show you a report that I whipped out during the weekend that demonstrates how to visualize a heat map.
The Heat Map Report
A heat map is a graphical representation of data where the values taken by a variable in a two-dimensional map are represented as colors. The most basic variation of a heat map is a tree map that lets you visualize data trends presented as nested rectangles. In our case, the sample report shows the Adventure Works reseller sales. As shown in the screenshot, the larger the rectangle is the more sales were contributed by that reseller. The same can be observed by analyzing the rectangle color which ranges from green (most sales) to red (less sales). The greener the color is, the more sales that reseller has. I chose to use the sales as a color variable although I could have used another measure, such as number of employees, profit, etc. You can download the source code from here.
Limitations
I’ll be quick to point out the following limitations of this reporting solution:
As it stands, producing the report requires a two-step approach. First, you need to prepare the dataset and save it in a SQL Server table. Second, you run the report from the saved data. Unfortunately, the ReportViewer control doesn’t support RDL R2 which means it doesn’t support maps, so you cannot bind the dataset and run the report in one shot. While we are waiting for Microsoft to update ReportViewer, you can use a server-side custom data extension that exposes the ADO.NET dataset with the spatial data as a report dataset. This approach will et you bind the ADO.NET dataset to a server report. Chapter 18 in my book source code includes such an extension.
The performance of the algorithm that I use to calculate the coordinates of the nested rectangles degrades after a few hundred rows in the dataset. If you need to map more results, you may need to revisit the algorithm to see if you can optimize it.
Understanding Rectangle Geometry
SQL Server describes polygons in Well-Known Text (WKT) standard sponsored by Open Geospatial Consortium. For instance, a polygon is described as five (surprise) points on the coordinate system, as shown below. The fifth point is the same as the first point.
You can convert WKT to the SQL Server geometry data type by using the STPolyFromText method, such as:
To calculate the nested rectangle coordinates, I used the excellent Squarified Treemaps algorithm by Jonathan Hodgson. Jonathan explains in details how the algorithm works. My humble contribution added the following changes:
I decoupled the algorithm from his Silverlight solution to a C# console application.
Instead of loading the sample dataset from a XML file, I load it from the Analysis Services Adventure Works cube. Specifically, the MDX query returns the top fifty resellers order by Reseller Sales.
I added Console.WriteLine statements to output insert queries which you can execute to populate the Test table.
CREATE TABLE [dbo].[Test](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](50) NULL,
[Shape] [geometry] NOT NULL,
[Size] [decimal](18, 5) NULL,
[Area] AS ([Shape].[STArea]()),
CONSTRAINT [PK_Test] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
Once you execute the INSERT statements to populate the Test table, you can use the SQL Server spatial data visualizer to view the results:
Authoring the Report
Once you have the data, authoring the report is easy.
Create a new report in Report Builder 3.0 Add a dataset that uses the following query: SELECT * FROM Test
Click the Map icon to start the Map wizard.
On the Choose a Source for Spatial Data step, choose the SQL Server Spatial Query option and click Next.
On the Choose the Dataset step, select the Dataset from step 1.
On the Choose Spatial Type, the map wizard should identify the Shape column as a geometry data type. At this point, the pre-release Report Builder 3.0 shows an empty map because it doesn’t recognize the coordinate system as Planar. Don’t worry, we’ll fix this later.
On the Choose Map Visualization, select the Color Analytical Map option.
On the Choose the Analytical Dataset step, select the same dataset because it has a Size column (reseller sales) that we will use for the color visualization.
On the Choose Color Theme step, choose =Sum(Fields!Size.Value) for a field to visualize and Red-Green as a color rule because the resellers with less sales will be coded red. Click Finish to exit the wizard.
In design mode, select the map and change the Viewport CoordinateSystem property to Planar.
Once you’ve changed the coordinate system, the polygons should magically appear. I’ve made a few more changes but you should be able to understand them by examining the map properties.
During my Reporting Services Tips and Tricks TechEd 2009 presentation, one of my most important tips was to encourage you to write more reports and less custom code. I showed a cool SharePointb-ased dashboard that we built by assembling report views. Following this line of thought, consider report maps instead of writing custom code when you need to visualize spatial data of any kind.