Data Dynamics Analysis 1.0.464.0 Released

I just uploaded the latest version of Data Dynamics Analysis to the website!

This version has been in the making for quite a while now.  It introduces several important features.  First is that we’ve done away with the convoluted licensing process for the ASP.NET control!  DDA now makes use of the licensing facilities provided in ASP.NET and Visual Studio.

Second, we’ve introduced part-to-whole calculations.  With this feature you can see how each member relates to the whole picture, a particular row/column, or row/column group.  Perfect for when you’re interested in seeing how the data changes within the table, row/column, or group but don’t really care what the actual values are.

I don’t have the feature pages updated yet because I didn’t want to hold back this release any longer; I’ll get them updated sometime this weekend though.

New favorite band for the month

Not technology focused, but I’ve been rocking out to All That Remains for a couple days now.  I’m very fond of the melodic-rock/metal sound these guys have (and have previously rocked out to Avenged Sevenfold for the same reason).

As with most of my musical discoveries the past few years, I first heard them on Sirius XM Radio.

So far I’ve only purchased their latest album, Overcome; but if this sound is on their previous albums I’m sure I’ll be picking them up too.

LINQ to SQL quick tip

Quick tip:  If you are going to composite method calls together in order to make use of multiple method calls to refine the SQL Query to be generated, make sure the calls are made against IQueryable<T> objects and not IEnumerable<T>.

LINQ method calls (Where, Skip, Take, Count, etc) against IQueryable<T> have different extension methods that get called compared to those that get called when called against an IEnumerable<T> argument.

To illustrate this, consider the following design.  I have a model which only does a few things, but to reduce the amount of code duplication I split the query refinements into individual methods.  I have a base method which just selects the data from the table.  Another method which will perform a Where query on data passed in, another which will Page the data passed in, and another which will just count the number of rows in the data passed in.

In other words, I can do this:

IEnumerable<TEntity> GetSearchResults( string search, int page )
{
  IEnumerable<TEntity> results = QueryData();
  results = SearchData( results, search );
  results = PageData( results, page, Constants.ResultsPerPage );

  return results;
}

If these methods take and return IEnumerable<T> bad things start to happen, foremost is that the base query selects everything out of the table.  The Where query is all performed client side rather than being generated into the SQL query, and the same for the paging and counting!

Swap out IEnumerable<T> for IQueryable<T> and things begin to work well though.  The Where query is generating Where clauses in SQL and the same goes for the other methods.  And since IQueryable<T> requires implementers to also implement IEnumerable<T>, at any point in time I can decide to stop chaining calls and revert to IEnumerable<T> so method callers have no idea what the internal implementation of getting that IEnumerable<T> really is.

The only changes I need to make to the code I have above is to change the results variable to IQueryable<T>, as wells as the return type and the parameter type of QueryData, SearchData, and PageData to deal with IQueryable<T>.  The return type of the GetSearchResults method doesn’t need to be changed!

Edit: I tried to use the syntax highlighting feature of WordPress provided by a google code project, but it failed miserably on the generics.

Data Dynamics Acquired by GrapeCity

I just finished posting the press release to the Data Dynamics website, Data Dynamics has been acquired by GrapeCity.

The name probably isn’t very familiar to those in the US; however, GrapeCity has been our partner for a while now.  They have been responsible for localizing the entire ActiveReports product for consumption in Japan, translating not only the strings in the control but creating documentation, advertisements, and even putting the product on store shelves!  Visual Studio Magazine wrote an article on GrapeCity in Feb. 2006 that discusses some of the unique aspects about the company.

For our current and future users, this acquisition won’t change things much.  The website will be getting an update, but the products will remain the same.

ActiveReports will still be the #1 report writer available for .NET developers, and we’re still going to release ActiveReports 6 sometime in the first half of next year.

My team is still hard at work on Data Dynamics Reports 2.0, though we may change the name to match the new owner.  We’re continually working on improving Data Dynamics Analysis based on the feedback we’ve gotten so far.  And we’ve also got a brand new product in the works that I can’t wait to tell everyone about, but that’s for a future post.

Personally, I’m excited to see what the future holds for us.

New Release of Data Dynamics Analysis

Earlier today I pushed out a new release of Data Dynamics Analysis.

This release introduces many bug fixes as well as several new features including trend lines and selection of members in the pivot view.

This release quickly follows on the introduction of the fall promotional discount on Data Dynamics Business Intelligence products, bringing the price down to as low as $499 for Data Dynamics Analysis!

Fall Discount on Data Dynamics Business Intelligence products

A quick post for everyone.   First, my apologies for not writing more Feature of the Week Moment posts, I’ve got one half written and will hopefully get a chance to finish it this week and get it posted.

Second, Data Dynamics has a special promotion going on, giving over 60% off on purchases of Data Dynamics Analysis and Data Dynamics Reports.  Get either one for $499 or you can get both for $899.

If you’ve held off on purchasing for any reason, now is the time to do it, as these pricing will only last until November 30th!

Data Dynamics phones/email affected by windstorm

Update: Late afternoon - The servers were back up and running this afternoon.  Phone-based sales and technical support will resume at 9am EDT Wednesday morning.  E-mail and forum technical support have already resumed, and urgent sales e-mails have already been answered.

Update: 3:00pm - Scott just called (and TimP and Pilgrim just msg’d) to let me know that power was back on at the office.  The servers may be down for a short time while they switch them back over to regular power.

Update: 12:05pm - Scott has brought in a generator and restored power to the website and databases.  Phone and e-mail are still down.  Please post all questions to the support forums.  Thanks!

Thanks to a comment from Jim, I realized I should at least put this up so that others wondering the same thing can find the answer.

The remnants of hurricane Ike swept through central Ohio Sunday afternoon, knocking out power to many people and businesses in the area, including Data Dynamics.  Without power the website and phones are out of service.

Once power is restored the office will again be open and we’ll get the website back online as soon as possible.

Lambda expressions prove their use to me

With the office closed I’ve been working on a research idea for the next version of Data Dynamics Reports.

First a little background:  The idea of what is going on here is to take a collection of objects that implement an interface.  This interface defines generic attributes about the appearance of the object.  Because not all objects support all of the possible appearance options its necessary to have both a property for the appearance and a boolean “Supports” property to indicate whether the first property is usable.

For example, if I have a TextBox and an Image control.  Both implement this interface, and certain properties apply to both controls (f.e. Size and BackColor) however there are certain properties that could only apply to some of the controls (f.e. ForeColor on the TextBox and ImageSizing on the Image).

What the code I’m writing needs to do is, first determine whether the object in the collection supports the property being get/set, and if it does support it get/set it.  When I was writing the code for this, it became obvious that the only things changing between any two sets of properties was just the name of the property.  This made it a prime candidate in my mind for refactoring, but how?

It’s clear that the method needs to accept 2 delegates, the first is a delegate which returns a boolean and takes in the object in the collection (a Predicate<T> in .NET 2.0+).  The second is one to do the actual property setting on the object in the collection (an Action<T> in .NET 2.0+).

If I were writing .NET 1.x, I’d have to create a method for each of the properties so I could create a delegate to them, or use reflection…I’m not sure which is worse there.  Beginning with .NET 2.0 I could create anonymous methods, but that’s almost as much typing as the .NET 1.x way.

Thankfully I’m using .NET 3.5 for this project, so I can make use of lambda expressions.  The result of calling the methods looks like so:

SetAggregateValue( p => p.SupportsForeColor, p => p.ForeColor = value );

As I mentioned before, this allows me to make use of the two delegates, the first a predicate; the second the action.  In the corresponding get method, the compiler even takes care of inferring the return type so I don’t need to deal with typing it out, yet again.

A slight concern I have is that it isn’t readily apparent while reading the code that the first parameter is a predicate. Fortunately, this is just a research project and since we target .NET 2.0; I know there no chance this code will make it into the real code base :-)

Just an observation at 3am :)

.NET 3.5 SP1 install WTF

I’m in the process of updating my laptop to .NET 3.5 SP1 and received the notification below.

Wonderful, I’m going to click Ignore and cross my fingers :) [Update: It did eventually install]

Posted in Technology. Tags: , . 4 Comments »

FotW - Normalized Data

This week’s feature makes it easier to report on data already loaded into your application.

Typically when you create the object hierarchy to represent the data stored in your database you create a series of classes that are interrelated.  A customer object that has orders, each order object has order details, each order detail refers to a product, and so on.  DataSets are usually modeled in similar ways.

Normalized Object Graph

Products such as Reporting Services, make it difficult to use this existing data in your report.  They require the object hierarchy to be flattened, that each relationship be traversed and the required data combined with the same row of data.  This isn’t a big problem if the data is being pulled directly from the database, simply change some of the SQL and its flattened.  But if you already have the data in memory then putting it in this format can be difficult.

Data Dynamics Reports on the other hand understands data.  DDR can traverse your object hierarchy or make use of the DataRelations available in your dataset, properties on your business object, or XPath queries in your XML to get to the data needed in your reports.  Now instead of you having to write the code to flatten the data, the data engine inside of Data Dynamics Reports has done it for you.  Now you can get on with creating the report and not have to write code to first fetch the data, yet again.

You can see a sample of how to use this feature with each of the data providers that support it in the NormalizedDataSet sample included with Data Dynamics Reports.