or
| RptScope = ReportScopeProvider.GetNewObjectScope(); |
| using (RptScope) |
| { |
| InspectionReport result = (from ir in RptScope.Extent<InspectionReport>() select ir).First(); |
| this.DataSource = result; |
| } |
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 ?
| _gideonChart.PlotArea.Appearance.FillStyle.MainColor = Color.White; | |
| _gideonChart.PlotArea.Appearance.FillStyle.SecondColor = Color.White; | |
| _gideonChart.PlotArea.YAxis.Appearance.MajorGridLines.Color = Color.Gray; | |
| _gideonChart.PlotArea.YAxis.Appearance.MajorGridLines.Width = 1; | |
| _gideonChart.PlotArea.YAxis.Appearance.MajorGridLines.PenStyle = DashStyle.Solid; |
Unfortunately the above code has no effect. Am I using the wrong properties? What are the right once then?
What else might prevent the changes from showing up?
Help would be highly appreciated.
Thanks in advance and kind regards,
Gerald
Hi
I configure the report with no DataSource and the following NeedDataSource event:
| private void AnalisiSconfinamenti_NeedDataSource(object sender, EventArgs e) | |
| { | |
| WSClass ws = new WSClass(); | |
| List<Analisi> elenco = null; | |
| elenco = ws.analisi(9, new DateTime(2008, 5, 20), new DateTime(2009, 5, 20)); | |
| (sender as Telerik.Reporting.Processing.Report).DataSource = elenco; | |
| } |
The method ws.analisi is the following
| public List<Analisi> analisi(int id_cliente, DateTime fromData, DateTime toData) | |
| { | |
| UnicaDataContext db = new UnicaDataContext(); | |
| //linq query to db | |
| var elencoFC = from e in db.Analisis ............ | |
| return elencoFC.toList(); | |
| } |