Ok here is the question. I have subclassed a strataframe combobox (seemed like an easy control to start with) and added a property called ReportsLibrary to it which is a component class containing a collection of report objects.
Everything is good I can set the report library etc.. what i can't figure out is how to set the datasource in the custom control. If I set it on the forms load event everything does work as expected the report prints!! Hopefully you can point me in the right direction on how to set the datasource and member for with in the control as that is how it should be.
TIA
Paul
Here is the code
Imports System.ComponentModel
<TypeConverter(GetType(ReportLibraryTypeConverter))> _
Public
<Category(
DescriptionAttribute(
m_ReportLibrary = Value
End
Just FYI, a combo box is a little more complicated since it has the ability to populate automatically based on the properties. The simplest control there is would be a TextBox.
I will look into the ParentFormLoading event as soon as I get home. This is sort of an after hours spare time project due to workload of critical projects. One of which has lots of reports which made me really miss the Reporting Classes I created in VFP so figured why not try to do something about it and learn more aobut .Net.
Basically what I am trying to accomplish is something like this.
Drop a Report Library component from toolbox on to form, Set property on report library to load appropriate reports.dll.
Drop combo onto form set Report Library property to the reportlibrary I just added. Run form and see list of reports in combo box without having to write code in the form load event. Kind of like a Bus object of reports.
hope that makes sense.
Thanks alot
I am doing things a bit different.
I was just going to tell you that you can use the BusinessBindingSource to make things a little easier as it related to wrapping a BO in a report. This will give you all of the strong-typed fields for each row within the report and may keep you from having to tie directly to the CurrentDataTable. There are other ways as well, I just though I would throw this out there.