ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bjorn I <b...@rocketmail.com>
Subject Pivot table / cross tabs
Date Tue, 02 Dec 2008 14:40:04 GMT
Have anybody done any work with pivot tables/cross tabs using Ibatis?

My query returns a list of employees and hours they can charge to each contract. The contract
IDs are dynamic in name and number, so my cross tab would be a list of employees, with n columns
with the contract id, and the hours they can charge. 
Name        #123        #456        #789    ... ... ...       
J. Smith        44            55            12

The only way I am able to return tthis using Ibatis is to use hashtable or IList. But the
result does not match well when binding to a web control such as gridview. First of all, I
won't know the header/column name, and second, .NET does not populate the gridview automatically,
I would have to do it behind the scene for each row. 

(the reason for doing a cross tab is that the big boss man wants to recreate an excel spreadsheet
he has)

View raw message