RptScope = ReportScopeProvider.GetNewObjectScope(); |
using (RptScope) |
{ |
InspectionReport result = (from ir in RptScope.Extent<InspectionReport>() select ir).First(); |
this.DataSource = result; |
} |
Here is the code...
But I get an Exception:'The 'IObjectScope' is already closed' when I preview the report design or when I run it.
But if I debug thru it , I do see the data being returned. ie. If I step through each line of code posted above , then the report shows the data else I get the exception.
Am I missing something ?