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!
I not familiar with XtraReports but use Active Reports and at first tried to do something similar to what you’ve described. After searching through the SF source to determine what it would take to implement IContainerControl in Active Reports and reading some related posts on this forum I believe it’s more trouble than its worth. It may not even be possible to get design time support for SF business objects in the Active Reports designer since they do not supply souce code and have some issues with inheritance. Maybe it would be easier in XtraReports????
Now that I’ve been doing it for awhile I find it’s very quick to layout a report in the AR, designer entering my BO field names while referring to an ObjectMapper window (got to love dual screens). Once I’ve designed the report, it's a simple matter to drop the BO and BindingSource on the SF form that I will run the report from. Then all I need to do is add the BO to the BindingSource, populate the BO, create a new instance of my report, set the report’s DataSource to the BindingSource and run/show the report. It would be nice to be able to drop a BO on the AR report deisgner and have all the field names availabe in a drop down but probably not worth the effort.