This is a migrated thread and some comments may be shown as answers.

Best Way to Bind to a Business Object

3 Answers 274 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
C
Top achievements
Rank 1
C asked on 07 May 2009, 02:04 PM
I'm having trouble figuring out the best way to bind my object to the report. My object represents a sales order. I have set the DataSource to the Items property of my object and that works fine for the line items of the order. I've added a public property on the report that is set to my Sales Order object. However, I haven't figured out how to access the header information, such as the sales order number, in a text box. If my property is called Order, specifiing =Order.SoNo in the text box gets an error saying object Order is not defined in the current context.

Other than setting text box value manualy in New(), I haven't been able to get this to work. Is there a clean way to do this?

3 Answers, 1 is accepted

Sort by
0
Chris Gillies
Top achievements
Rank 1
answered on 08 May 2009, 02:43 PM
I guess this thread: http://www.telerik.com/community/forums/thread/b311D-bgkkce.aspx should shed more light on the matter. Actually now that I think of it, there is a demo report on the site as well ..

Here it is: http://demos.telerik.com/reporting/examples/databinding/defaultcs.aspx
0
C
Top achievements
Rank 1
answered on 08 May 2009, 03:57 PM
I've been getting the reports to bind to a list, like in the example report and the book store example in that thread. Which works good for the line items of the sales order. I'm having trouble with the top level information. Neither the book store example or the car dealer example show any top level info, only detail level. Alot of the reports we have now are in Crystal, and we would usually drive those from a database view that joined top level and details together, so that top-level info was included in each row. I could do the same idea here, create a new collection object that contains top level and detail info in each element and set that as the datasource. I was hoping there would be an easy way to use the existing objects that we already created.


0
Chris Gillies
Top achievements
Rank 1
answered on 08 May 2009, 04:04 PM
Does this help: http://www.telerik.com/community/forums/reporting/telerik-reporting/how-to-display-hierarchical-collections.aspx

Cheers!
Tags
General Discussions
Asked by
C
Top achievements
Rank 1
Answers by
Chris Gillies
Top achievements
Rank 1
C
Top achievements
Rank 1
Share this question
or