There is an method in the framework that takes the
full name of a type and returns its type (yep, I finally found it!):
Microfour.StrataFrame.Tools.Common.GetTypeFromReferencedAssemblies(typeName As String)
So, if you had a property, say
ReportForm, which was a string, then you could redo your code like:
'-- Get the System.Type of the report form
Dim reportFormType As System.Type
reportFormType = Common.GetTypeFromReferencedAssemblies(Me.ReportForm)
UI.FormManager.OpenReport(reportFormType, New Object() {Me.Vr_PolicyHolderListBO1}, False)
It would be harder to do this generically with the BO, as you passing an instance, not a type. So, you'd somehow need to actually get an instance of the correct type. Just knowing the name of the type wouldn't be helpful, as the BO is being passed to the constructor of the report form, and has the data that will actually drive the report. Thus it would need not only be instantiated, but also filled.
However, you could provide a generic BusinessObject property of the more general type BusinessLayer. This would then get set somehow with the actual BO that contained the data. The code would then become:
'-- Get the System.Type of the report form
Dim reportFormType As System.Type
reportFormType = Common.GetTypeFromReferencedAssemblies(Me.ReportForm)
UI.FormManager.OpenReport(reportFormType, New Object() {Me.BusinessObject}, False)
Hope that gets you moving some more!