Help with Windows Controls


Author
Message
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
I am working in my "spare" time to create a reporting framework. I really like the way you have done the application framework and I am trying to emulate it. After burning up a few servers at google and bouncing around in the StrataFrame source code I have figured a few things out but still foggy on some things and was hoping you guys could help point me in the right direction.

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 Class RptComboBox

Inherits MicroFour.StrataFrame.UI.Windows.Forms.ComboBox

Private m_ReportLibrary As ReportEngine.ReportLibrary

<Category("ReportEngine"), _

DescriptionAttribute("Select the report library to bind to.")> _

Public Property ReportLibrary() As ReportEngine.ReportLibrary

Get

Return m_ReportLibrary

End Get

Set(ByVal Value As ReportEngine.ReportLibrary)

m_ReportLibrary = Value

End Set

End Property

Private Sub RptComboBox_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SelectionChangeCommitted

'Call the Print Options Method of the selected report

Me.ReportLibrary.ReportsCollection.Item(sender.selectedindex).ShowPrintOptions()

End Sub

Public Sub WhereCanIDoThis()

'This doesn't work because nothing is alive yet however if i call from form load everything is good how can I accomplish this

' Me.DataSource = Me.ReportLibrary.ReportsCollection

' Me.DisplayMember = "ReportName"

End Sub

End Class

  

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Paul Chase - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Paul Chase - 19 Years Ago
Trent L. Taylor - 19 Years Ago
                     Thanks alot Trent Paul
Paul Chase - 19 Years Ago
                         No Problem. ;)
Trent L. Taylor - 19 Years Ago
Daniel Essin - 19 Years Ago
Paul Chase - 19 Years Ago
Trent L. Taylor - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search