Reports for remoting

Reports for remoting

Old forum URL: forums.lhotka.net/forums/t/1492.aspx


Skeeboe posted on Sunday, October 15, 2006

I'm wondering how others are doing reports over remoting.

Reporting services is one option but not everyone is using SQL2005 yet. Plus I don't want to force someone to purchase SQL if sqlexpress will work great for them.

I could use CSLA objects and convert them to datatables, but then I'm creating stored procedures, views and then making classes on top of those, then if I restructure the views/sps I have to rebuild the classes. Its an extra step that I'm trying to avoid.

So the other day I created a simple CSLA class that has a public variable called DT that's defined as a datatable and a shared public GetDataTable(strSql as string) method. Then I could send myobj.GetDataTable("Select * from Customer where id=545") or myobj.GetDataTable("Select make, model, year from SoldVehiclesView where stocknum='00124'")  and to my surprise it worked!

Am I going to run in to any issues doing this (aside from security related ones) or is there an easier way to accomplish reports when using remoting?

Thanks for your help.


JoeFallon1 replied on Sunday, October 15, 2006

I plan on using ReadOnly BOs and ROCs.

But there is no reason you can't use a DataTable (now that it is finally serializable in .Net 2.0).

I re-read the threads on reporting tools and tried out MS Reporting Services, Xtra Reports and Active Reports. I decided to go with Active Reports .Net 3.0 as it is the most powerrful of the 3 solutions. I have one very complex report which the others can't produce at all.

Active Reports uses .Net classes for everything so the model is quite simple to figure out and leverage. If your ROC gathered up all the data from a single query (like thier DataSet examples do in a single table) then you can bind every textbox on the report to the BO Property and just set the DataSource property equal to the ROC and it works. So you can think of the ROC as the same thing as a flat table (which is a DataTable.)

I am just more comfortable leveraging CSLA BOs than introducing a DataTable but YMMV.

Joe

 

 

eslater replied on Sunday, October 15, 2006

I use Dev Express XtraReports for my reports.  I have created reports using the method you describe by adding a property to a class that returns a typed dataset which I base the report on.  I have also used a class as the report source and simply add the binding via code.  Both methods work great.

Hope it provides some food for thought.

Elliot

Copyright (c) Marimer LLC