Creating an inbox

I have spent a fair bit of time on Reporting Services news groups lately. I have seen several people asking how to generate reports and go back and render them later. I'll do this via multiple blog entries mostly because I'm too tired to write the whole solution out now. :)

This is not a trivial problem, to figure out. Yet it's quit easy to do. So lets first define the requirements. I want to select a report and generate it, then be able to go off and do something else. Then come back to an inbox of reports later and render the report I generated earlier. The solution utilizes several areas of reporting services.

First you can use the ListChildren( ) method to get a list of reports available to be rendered. Tip: ListChildren returns all items so you should loop through and check which one's are reports so you don't end up displaying a list of DataSources and Folders.

MyLocalReportService.ReportingService rep = new MyLocalReportService.ReportingService();
   rep.Credentials = System.Net.CredentialCache.DefaultCredentials;
   MyLocalReportService.CatalogItem[] cat;

   cat = rep.ListChildren("/",true);

   foreach (MyLocalReportService.CatalogItem item in cat)
   {
    if (item.Type == MyLocalReportService.ItemTypeEnum.Report)
    {
     this.ReportslistBox.Items.Add(item.Name);
    }
   }

Next time I'll show you how to create a linked report that can be used to generate snapshot history items.

The Da Vinci Code

A friend of mine told me I should read The Da Vinci Code by Dan Brown. I would like to publicly thank him for that. Terry, thanks.

I couldn't put it down. Dan Brown is a great story teller. This Book is intelligent, suspenseful and fun. Full of codes to solve and rich thought provoking European history. I loved it. Do yourself a favour read it. You will not be disappointed.

Splitting Logs

Over the Thanksgiving weekend I rented a log splitter. Now I love everything electronic, I am a fairly typical developer. But I also love a good power tool and this was a beauty.

I had two trees in my yard that had been taken down for one reason of another and left for me to one day split into fire wood. The people who took them down were good enough to cut them into 16 inch (40 cm) pieces. Which was great but some of them were over 2 ft (61 cm) in diameter. I actually spent $15 at Canadian Tire and bought a wedge that you hammer into the log to split it. I tried that for about an hour one day. looked up at all the wood to be done and gave up.

This is when I decided to rent a Log Splitter. This thing was great. Although this is not a picture of the one I used. It gives you an idea of what one looks like.

It's hard to describe how much fun this was. Not to mention how much easier it makes splitting two trees worth of wood. Just put a log of apparently any size into it and pull the leaver. It splits the log like slicing cold cuts. :)

P & P Summit Day 3 (Enterprise Library)

In an earlier blog entry I mentioned Enterprise Library. At day three of the Summit we spent the morning talking about Enterprise Library.

The Enterprise Library has an amazing resemblance to the PFC (PowerBuilder Foundation Class). Not that it's similar code or anything, but here we have a vendor with a development platform, and that vendor has written the starting of a framework we as developers can use to make it easier for us to get started building applications. If you use the application blocks this is going to be a good thing. Seven of the eleven available Application Blocks have been wrapped up and cleaned up and documented, and will be released around January 2005 to the general public.

What comes with the Application Library?

  • Data Access Application Block
  • Exception Handling Application Block
  • Configuration Application Block
  • Caching Application Block
  • Logging & Instrumentation Application Block
  • Security Application Block
  • Cryptography Application Block

The Enterprise library should make it easier to install and use the application blocks. They come with documentation including templates and samples. The Blocks are designed to work together, but they can still be used individually. The configuration tool that comes with Enterprise Library makes it look pretty easy to start using any part of Enterprise library.

Some promises from Microsoft.

  1. We will continue to enhance Enterprise Library, providing new Application Blocks to assist with additional scenarios
  2. We are planning a Microsoft® .NET 2.0 “Whidbey” compliant release around the time that .NET 2.0 and Microsoft® Visual Studio® 2005 are released

P & P Summit Day 2

Today was not as good as yesterday. Don't get me wrong the speakers where great. I mean really great. But the topics were not new to me. DataAccess Layers, Middle Tier, Smart Client, Configuration. All topics I have a great deal of familiarity with.So my opinion of the day is slanted by the fact that I wasn't really learning anything new.

Actually I'm lying I did learn a few things. Mostly from the key note speaker. Johnathan Zuck was a developer and is now a lobbyist. I found him very interesting. He told stories of Lawyers in Europe wearing wigs arguing over interoperability of servers in a cluster. :) We had a very interesting discussion during his presentation. I enjoyed it thouroughly.

Fernando Guerrero did a presentation on DataAccess Layers. good speaker and very nice man. He actually said he prefers to call ExecuteNonQuery with output parameters then to fill a Dataset or to execute a SqlCommand. He claims this is how you get the best performance. That maybe true but what a pain.

Rocky Lhotka did a presentation on Middle Tier. He mentioned SOA once in his presentation. I think he said. "SOA is going somewhere, either up or down" :)

After Rocky told us all about making sure you have all your business code and validation in a business layer. Billy Hollis said who are you writing this application for yourself or the user. He sees no problem is putting simple validation in the UI. He even Demoed his Windows Forms ValidationControls. Similar to the ASP.NET .Net version.

There was a reception last night hosted by Logic Library, at a place called the Drainsville Tavern. They had busses going there but I thought I would drive so I was not on anyone Else's schedule. Also I am staying at a hotel about 2 miles away as are others. So I offered to drive anyone there who wanted to get their rental cars back to the hotel before going out. No one took me up on my offer which was a good thing. I got lost trying to find the place. By the time I got their I had missed dinner and found only about 6 people left. It was a really hard to find. No lights no signs. People working in gas stations less than 1/2 km away had never heard of it. Others just told me completely wrong directions. :(

P & P Summit Day 1

Today was long but good. They kept getting behind so we had lunches and breaks in the room while someone spoke. The speakers were good thank god.

The key note was Tommy Morris who talked about an army field medical application that was pretty cool. They use IPAQ's and specially made sandisk SD cards with reinforced cases so they can't be bent and special connections so salt water does not affect them. When someone is hurt in the field a medic comes along with his IPAQ, gets the SD Card that is around the soldiers neck like a dog tag and puts it in the IPAQ. Immediately the application opens with that soldier and all their medical information. The Medic can add information about what happened to him or her and it's saved on the IPAQ and written to the card to it goes with the Soldier. Also apparently they used to carry 20 lbs of field manuals with them. Now all that information is on the IPAQ, and accessible via context sensitive help. There was lots more to this presentation but that was the cool part for me. :)

I particularly liked Jim Newkirk's presentation on Test Driven Development. Nothing new here but a good presentation all the same.

Ron Jacobs spoke for the next two sessions. I could listen to him speak all day. He filled in all the SOA holes for me. I've heard the presentations before but he has done the best job of making it clear to date. EDRA is the new name for ShadowFax. Enterprise Development Reference Architecture contains a framework, four quick starts, an application template, documentation and a sample application The Global Bank. If you are about to build a distributed application in .Net this is likely worth looking at.

Chris Kinsman did a presentation on security. Not one of my favorite subjects, not unlike most developers. But he did a good job and made it less frightening. There were some good practical ideas that have come out of MS that help you design a secure application. Too much to blog here tonight.

Tomorrow is another day.

Patterns & Practices Summit

This week I am in Reston Virginia at the Patterns & Practices Summit. I'm hoping this is a good week and I learn lots. So far I learned the hotel bar has Bass on tap. :)

I'll keep you posted of the goings on here at the summit.

Patterns & Practices Application Blocks

If you use the Application Blocks from the Patterns and Practices group. You might be interested to know that next year they will be releasing their Enterprise Library.

For those that don't know what they are: Application blocks are reusable software components designed to assist developers with common development challenges.

To date they have been available for download separately. The Enterprise Library will combine the most commonly used application blocks and try to make them more consistent, extensible,  and easier to use. You can read all about it on the Patterns & Practices site or gotdotnet.

Connecting a .NET Datawindow to SQLServer

You may have noticed during the install of .NET DataWindow that there are no native drivers for SQL server. Sybase expects you to use OleDB to make the connection.

In case anyone is having trouble here is how to do it.

First you create the OleDBConnection object and pass that to an AdoTransaction Object. The AdoTransaction Object wraps up an ADO.Net users connection and Transaction objects so they can be used by the Datawindow.

Your code would look like this:

'Create a new OleDB Connection Object, Populate the ConnectionString Property and open the connection
Dim theConnection As New System.Data.OleDb.OleDbConnection
theConnection.ConnectionString = "Server=localhost;Provider=SQLOLEDB;Initial Catalog=Northwind;User ID=sa;Password=sa;"
theConnection.Open()

'Create a new AdoTransaction Object the constructor takes the connection object you created
Dim ADOTrans = New Sybase.DataWindow.AdoTransaction(theConnection)
'Binds the ADO.NET connection to the database interaction layer so that the AdoTransaction object can be used by a DataWindow
ADOTrans.BindConnection()

'Tell the DataWindow what Transaction Object to use
Me.DataWindowControl.SetTransaction(ADOTrans)

 

The Smart Client Architects Breakfast

If you are a Manager or Architect thinking of starting a Smart Client project using .NET. You should come to this Architects Breakfast. The ObjectSharp Architects Breakfast happens every two months. The topics are current and relevant to what our clients are doing today.

To Find out more about what the Architects Breakfast series is all about.

To register for the Smart Client Architects Breakfast.

Hope to see you there. :)