Assigning a BO to BusinessBindingSource on XtraReport


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I have got to figure out how to use a BO with the XtraReport effectively.  I have been able to drop a BusinessBindingSource on the report with no problem.  It is actually assigning a BO to the BindingSource that I'm having problems with.  I'd like to create a base report which I will be able to just inherit and use for my reports which come from BOs.  So, I'd like to be able to drop a BO on my inherited report and then set the BusinessObject property of the BindingSource to be that BO.  I'm having a couple of major problems with this and I just need to know what I have to do to make it work.

1.  When I try to drop the BO on the inherited report I get the error that it does not implement the IContainerControl interface.  What code do I need to implement for these routines to make this work correctly?  The BO still drops onto the form, but I'm sure it causes my other error.

2.  When I try to assign the BO to the BindingSource's BusinessObject property I get this error: "Unable to cast object of type 'BBS.Reports.BaseReport' to type 'System.Windows.Forms.Control'.  I'm sure I need to be doing something when the BO drops onto the form, but I'm not sure what will make all this work together.

If I can get the BindingSource to correctly work with the BO and the XtraReport so that I can use the BO fields on the report, I will be extremely happy.  Please help me get this working correctly.  Thank you in advance!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search