I have played around with the ReportingService2005.GetItemDataSources() and the ServerReport.GetDataSources() (ReportViewer) methods, but with no luck.
I imagine that this functionality must be available becuase the Model fields are displayed in the Report Builder application once you select a Model.
Thanks!
Brian McCullough
OK...to get back to the Model do this:
New" size="2">Dim datasources() As DataSource = rs.GetItemDataSources(rptViewer.ServerReport.ReportPath)
For Each ds As DataSource In datasources
Dim modelPath As String = DirectCast(ds.Item, DataSourceReference).Reference
Dim modelItems() As ModelItem = rs.ListModelItemChildren(modelPath, Nothing, True)
For Each modelitem As ModelItem In modelItems
If item.Type = ModelItemTypeEnum.Attribute Then
'this is a field in the Model
'now how do i get the FieldType?
End If
Next
Next
Now how do I get the Field Type (i.e. String, Date, etc...)?
-Brian
No comments:
Post a Comment