Mr. .NET

Thoughts from a Product Manager…Geek…Gamer

Archive for the ‘General’ Category

ActiveReports 6 Beta, now available!

without comments

The ActiveReports team has just released the first public beta for ActiveReports 6!

This new version has many new features in it, with a healthy mix of design-time and run-time enhancements.

My favorite new features are the Flash viewer control, designer snap lines, and RepeatToFill option.

Flash Viewer

The Flash viewer control makes it easy to provide a great looking report viewer on your web page.  It replaces the ActiveX control due to the obvious limitations that technology presented users, not to mention the security implications with using ActiveX that kept many people from using it.

Designer Snap Lines

Snap lines make it a cinch to line up the controls in your report.  Now table style layouts are easier than ever to create and avoid the issues that overlapping controls can cause when exported to Excel.

Repeat to Fill

Have an Invoice style document that you need to generate, where the report contents fills an area on the page?  Repeat to Fill to the rescue!  This new property makes it possible to generate green-bar reports that fill the page, even if there isn’t enough data to do it.

Read what Sanjeev had to say about the ActiveReports 6 beta release.

Written by James

June 3, 2009 at 11:29 am

Posted in General

Tagged with ,

LINQ to SQL quick tip

without comments

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.

Written by James

November 7, 2008 at 4:04 am

Posted in General

Tagged with , , ,

Data Dynamics Acquired by GrapeCity

with 3 comments

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.

Written by James

October 20, 2008 at 8:53 am

Data Dynamics phones/email affected by windstorm

without comments

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.

Written by James

September 16, 2008 at 3:00 pm

Lambda expressions prove their use to me

without comments

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 :)

Written by James

September 16, 2008 at 11:51 am

Posted in General

Tagged with ,

New Data Dynamics Reports homepage

without comments

As I finished off the last post I realized I never mentioned the new homepage design for Data Dynamics ReportsLucas and I worked for several weeks to create the new look and feel for the Data Dynamcis Analysis homepage.  Once it was finished I began the work to transform the Data Dynamics Reports page into the format.

All of the old links will continue to work thanks to some redirect magic as well.

Written by James

June 25, 2008 at 12:41 pm

Posted in General

TechEd 2008

with 5 comments

TechEd was a blast!  I didn’t post the notice here, but Data Dynamics was out in force for TechEd Developer this year.  Lucas, Scott, Issam, and I pulled booth duty at the event and we got to talk about our products till we couldn’t talk anymore.

I got to talk with quite a few people about reporting, data mining, and what people are doing with the newer technologies coming from Microsoft.

As the post I scheduled earlier on my blog mentioned we announced support for Excel in Data Dynamics Reports.  I didn’t get a chance to talk about it here much other than posting the press release, but I’ll save that for a future post.

In addition to the new Excel support in DDR, I was doing a few demos of Data Dynamics Analysis; though I tried to aim those people to Lucas because he does such a great job in the demo.  We of course, released DDA last month so there was a lot of proselytizing to show people there is more to data analysis than just awful 3D charts and pie graphs.

That job will be easier once the DDA screencasts start rolling out, because its such an interactive product its very difficult to tell people about the product and have them ‘get’ it with words and static pictures alone.

The hotel we stayed at for TechEd last year was sub-par so Issam booked us rooms at the Peabody hotel.  Those are the famous ducks in the gallery below.  Oddly, the rooms there weren’t anything to write home about; despite the prestige that followed the name.  The service and food at the hotel were great though.

I brought home a souvenir from the trip as well; Lucas gave me his cold so I’ve spent all day Sunday and Monday sneezing and blowing my nose :S

Ducks at the Peabody Hotel fountain Both halves together The left half of the Data Dynamics booth The right half of the Data Dynamics booth

Written by James

June 10, 2008 at 2:54 am

Data Dynamics Reports release slightly delayed

without comments

The team is currently wrapping up the testing of the latest version of Data Dynamics Reports and will be pushing it out as soon as their testing is completed.

Written by James

June 3, 2008 at 9:35 am

Posted in General

XM/Sirius merger line-up revealed

without comments

I don’t know how my dad found it, but he sent me a link to the proposed channel line up and packages for XM and Sirius radio after the merger.

http://fjallfoss.fcc.gov/prod/ecfs/retrieve.cgi?native_or_pdf=pdf&id_document=6519869225

As someone on avsforum said, “Where’s the merger?”

Written by James

May 3, 2008 at 11:39 pm

Posted in General

Tagged with , , , ,

Death of a legend

with one comment

As soon as I got home from work today a friend told me some sad news; Gary Gygax has died.

D&D is what brought me to a new group of friends my sophomore year of high school and kept me occupied through college.  While I no longer play D&D it has surely influenced the games I play today as a fantasy RPG junkie.  Not to mention all of the games that are based in some part on the D&D ruleset.

One of the best times I had at GenCon last year was being able to watch Gary “play” a bit of D&D during the “Killer Breakfast” event.  If I remember correctly Gary’s character just burrowed underground to avoid the incoming horde of undead, but it was kind of aweing to see the creator play the game he created so long ago.

Written by James

March 4, 2008 at 10:37 pm

Posted in General