Reputation: 450
I've been building a graph in SSRS for a client and I keep running into this error "The added or subtracted value results in an un-representable DateTime. Parameter name: Months" when I try to add a particular series to the graph:
Now what's interesting here is that it's reacting to the data, and here's a screenshot of what my dataset looks like:
The problem child is the "Trailing_12_Month_Sum" column. For whatever reason it just doesn't like those numbers. Point in case, if I edit the proc that returns them to simply return 0 (or even a constant like 80,000!), then the graph works fine. Here's what happens when I monkey with the proc:
And the graph is now happy (You can see the flat 80K line below):
I also tried higher numbers like 10 mil and that rendered fine as well. The only other data point I have on this is the error I pulled from the SSRS error logs, which isn't really that helpful since it doesn't tell you where the error came from in relation to the chart.
library!WindowsService_44!2268!10/06/2014-18:18:47:: i INFO: Call to CleanBatch() ends reportrendering!ReportServer_0-90!2244!10/06/2014-18:24:19:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.RenderingObjectModelException: , Microsoft.ReportingServices.ReportProcessing.RenderingObjectModelException: Not a legal OleAut date. ---> System.ArgumentException: Not a legal OleAut date. at System.DateTime.DoubleDateToTicks(Double value) at System.DateTime.FromOADate(Double d) at Microsoft.Reporting.Chart.WebForms.AxisScale.CalcInterval(Double min, Double max, Boolean date, DateTimeIntervalType& type, ChartValueTypes valuesType) at Microsoft.Reporting.Chart.WebForms.Grid.Paint(ChartGraphics graph) at Microsoft.Reporting.Chart.WebForms.Axis.PaintGrids(ChartGraphics graph, Boolean selectionMode, Int32 x, Int32 y, Object& obj) at Microsoft.Reporting.Chart.WebForms.Axis.PaintGrids(ChartGraphics graph) at Microsoft.Reporting.Chart.WebForms.ChartArea.Paint(ChartGraphics graph) at Microsoft.Reporting.Chart.WebForms.ChartPicture.Paint(Graphics graph, Boolean paintTopLevelElementOnly, RenderingType renderingType, XmlTextWriter svgTextWriter, Stream flashStream, String documentTitle, Boolean resizable, Boolean preserveAspectRatio) at Microsoft.Reporting.Chart.WebForms.ChartImage.GetImage(Single resolution) at Microsoft.Reporting.Chart.WebForms.Chart.Save(Stream imageStream, ChartImageFormat format) at Microsoft.ReportingServices.OnDemandReportRendering.ChartMapper.GetImage(ImageType imageType) --- End of inner exception stack trace ---;
I don't have any idea why in the world simply added that series (as you saw there were several others working just fine) is causing this error. It's just a column of ints, why the data error is occurring I have no idea.
I'm using VS2012 for report development and we're on ssrs 2012.
If any SSRS gurus out there can help me out I'd be extremely grateful. Thanks.
Upvotes: 0
Views: 2084
Reputation: 1
The problem is with your axis settings. You need to make sure that the vertical and horizontal axis both have the right "interval type" settings.
Upvotes: 0
Reputation: 11
I had the same problem. Try casting column to maximum decimal, it helped in my case...
CAST(Trailing_12_Month_Sum AS DECIMAL(38,0)) as Trailing_12_Month_Sum
Upvotes: 1