datatset from collection

Posts   
 
    
jspanocsi
User
Posts: 145
Joined: 04-Mar-2005
# Posted on: 14-Mar-2006 19:30:20   

I have a need to get a dataset from a collection.

Here is what I have: An employeeentity with 2 child enitites, payrollchecksentity and directdepositsentity.

the 2 child objects are for the entire life of the employee. I am going to do a collection of employees and use prefetch paths to filter the payroll and direct deposit children down to the current year.

I need to take the end result collection and get a dataset out of it so I can pass it to a crystal report. is this possible? If not, can I get 3 datatables out of it? One of all the employees, one of all payroll entities in the collection and one for direct deposits etc.

Thanks

Posts: 1268
Joined: 10-Mar-2006
# Posted on: 14-Mar-2006 20:09:50   

I am no expert on LLBLGen, but speaking out of turn and in general of ORM tools, they all stop when it comes to reporting.

From what I have seen, it seems this way across the industry.

I assume you are asking if there is some generic method to create a dataset from an object graph? If so, that would be cool and cannot speak to if there is something like that or not for sure. However, converting what you have into a Dataset can be done fairly easy with code. You can just create a dataset, create the tables, populate them with the data from the objects, etc. You might even could use the templates to generate something to map an Entity onto a DataTable - that might be very useful.

I would like to see something like a SQL Reporting Services assembly that let me use LLBLGen pro to do reports in SSRS! That would be nice!

Wayne

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 14-Mar-2006 20:32:57   

WayneBrantley wrote:

I am no expert on LLBLGen, but speaking out of turn and in general of ORM tools, they all stop when it comes to reporting.

Err... not LLBLGen Pro. Take a look at dynamic lists and typed lists simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 14-Mar-2006 20:34:29   

jspanocsi wrote:

I have a need to get a dataset from a collection.

Here is what I have: An employeeentity with 2 child enitites, payrollchecksentity and directdepositsentity.

the 2 child objects are for the entire life of the employee. I am going to do a collection of employees and use prefetch paths to filter the payroll and direct deposit children down to the current year.

I need to take the end result collection and get a dataset out of it so I can pass it to a crystal report. is this possible? If not, can I get 3 datatables out of it? One of all the employees, one of all payroll entities in the collection and one for direct deposits etc. Thanks

You can convert an entitycollection into a datatable easily, both during fetch and in memory. see for example: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=3861

You can also do it like this: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=4133

Frans Bouma | Lead developer LLBLGen Pro