Chart with stacked bar gives different result query or table
Hi,
I have a query to display a chart type HorizontalBar property MultiBar mbStacked. The result of the query contains office-numbers and counts for the years 2011, 2012 and 2013. I want to make a stacked bar per office-number. Some office-numbers don't have counts for 2013 at this moment. The chart displays for those office-numbers counts for 2013 (from bottom to top in the chart) even if I don't have records for those office-numbers and year. The top of the chart don't get a stacked bars for 2013, and is exactly the number of the office-numbers that don't have counts for 2013. The option "show data" confirms the existence of (no)counts for those office-numbers. I guess that the query don't look for the office-number to show corresponding counts but just draws stacked bars from the bottom of the chart up to the top.
When I use the same query to fill a table and build the chart of the data from that table, the chart don't show counts for 2013 for the office-numbers that indeed have no counts (and I don't have records for those office-numbers for the year 2013 with the count-value 0 or NULL). The top of the chart now shows counts for 2013 (is correct).
The option "Lining up X values" is enabled with the use of the table, with the use of the query it's not possible, I get the error (Dutch, the message goes about empty labels not allowed for the X-axis):
FastReport.Net v2013.2.3
Als u gegevenspunten wilt uitlijnen op X-aslabels, moeten alle punten unieke AxisLabels binnen ?©?©n reeks hebben. Deze labels mogen niet leeg zijn.
System.InvalidOperationException: Als u gegevenspunten wilt uitlijnen op X-aslabels, moeten alle punten unieke AxisLabels binnen ?©?©n reeks hebben. Deze labels mogen niet leeg zijn.
bij System.Windows.Forms.DataVisualization.Charting.ChartImage.AlignDataPointsByAxisLabel(ArrayList seriesList, Boolean sortAxisLabels, PointSortOrder sortingOrder)
bij System.Windows.Forms.DataVisualization.Charting.ChartImage.AlignDataPointsByAxisLabel(Boolean sortAxisLabels, PointSortOrder sortingOrder)
bij System.Windows.Forms.DataVisualization.Charting.Chart.AlignDataPointsByAxisLabel()
bij FastReport.MSChart.MSChartObject.GetData()
bij FastReport.BandBase.GetData()
bij FastReport.Engine.ReportEngine.PrepareBand(BandBase band, Boolean getData)
bij FastReport.Engine.ReportEngine.ShowBandToPreparedPages(BandBase band, Boolean getData)
bij FastReport.Engine.ReportEngine.ShowBand(BandBase band, Boolean getData)
bij FastReport.Engine.ReportEngine.ShowDataBand(DataBand dataBand, Int32 rowCount)
bij FastReport.Engine.ReportEngine.RunDataBand(DataBand dataBand, Int32 rowCount, Boolean keepFirstRow, Boolean keepLastRow)
bij FastReport.Engine.ReportEngine.RunDataBand(DataBand dataBand)
bij FastReport.Engine.ReportEngine.RunBands(BandCollection bands)
bij FastReport.Engine.ReportEngine.RunReportPage(ReportPage page)
bij FastReport.Engine.ReportEngine.RunReportPages()
bij FastReport.Engine.ReportEngine.RunReportPages(ReportPage page)
bij FastReport.Engine.ReportEngine.Run(Boolean runDialogs, Boolean append, Boolean resetDataState, ReportPage page)
bij FastReport.Report.Prepare(Boolean append)
bij FastReport.Report.Prepare()
bij FastReport.Design.ReportTab.Preview()
I am expecting that the query should give the same results as the same data from a table.
The problem exists in the registered FastReports for VCL version 4.12.1 but also in the demo-version for .NET.
I can overcome the error to use a table or let the result of the query contains "empty" records for those office-numbers and year with no counts, but I don't like the solution to use this solution everywhere.
So could you please fix this problem that a query gives the same results as a table ?
I have a query to display a chart type HorizontalBar property MultiBar mbStacked. The result of the query contains office-numbers and counts for the years 2011, 2012 and 2013. I want to make a stacked bar per office-number. Some office-numbers don't have counts for 2013 at this moment. The chart displays for those office-numbers counts for 2013 (from bottom to top in the chart) even if I don't have records for those office-numbers and year. The top of the chart don't get a stacked bars for 2013, and is exactly the number of the office-numbers that don't have counts for 2013. The option "show data" confirms the existence of (no)counts for those office-numbers. I guess that the query don't look for the office-number to show corresponding counts but just draws stacked bars from the bottom of the chart up to the top.
When I use the same query to fill a table and build the chart of the data from that table, the chart don't show counts for 2013 for the office-numbers that indeed have no counts (and I don't have records for those office-numbers for the year 2013 with the count-value 0 or NULL). The top of the chart now shows counts for 2013 (is correct).
The option "Lining up X values" is enabled with the use of the table, with the use of the query it's not possible, I get the error (Dutch, the message goes about empty labels not allowed for the X-axis):
FastReport.Net v2013.2.3
Als u gegevenspunten wilt uitlijnen op X-aslabels, moeten alle punten unieke AxisLabels binnen ?©?©n reeks hebben. Deze labels mogen niet leeg zijn.
System.InvalidOperationException: Als u gegevenspunten wilt uitlijnen op X-aslabels, moeten alle punten unieke AxisLabels binnen ?©?©n reeks hebben. Deze labels mogen niet leeg zijn.
bij System.Windows.Forms.DataVisualization.Charting.ChartImage.AlignDataPointsByAxisLabel(ArrayList seriesList, Boolean sortAxisLabels, PointSortOrder sortingOrder)
bij System.Windows.Forms.DataVisualization.Charting.ChartImage.AlignDataPointsByAxisLabel(Boolean sortAxisLabels, PointSortOrder sortingOrder)
bij System.Windows.Forms.DataVisualization.Charting.Chart.AlignDataPointsByAxisLabel()
bij FastReport.MSChart.MSChartObject.GetData()
bij FastReport.BandBase.GetData()
bij FastReport.Engine.ReportEngine.PrepareBand(BandBase band, Boolean getData)
bij FastReport.Engine.ReportEngine.ShowBandToPreparedPages(BandBase band, Boolean getData)
bij FastReport.Engine.ReportEngine.ShowBand(BandBase band, Boolean getData)
bij FastReport.Engine.ReportEngine.ShowDataBand(DataBand dataBand, Int32 rowCount)
bij FastReport.Engine.ReportEngine.RunDataBand(DataBand dataBand, Int32 rowCount, Boolean keepFirstRow, Boolean keepLastRow)
bij FastReport.Engine.ReportEngine.RunDataBand(DataBand dataBand)
bij FastReport.Engine.ReportEngine.RunBands(BandCollection bands)
bij FastReport.Engine.ReportEngine.RunReportPage(ReportPage page)
bij FastReport.Engine.ReportEngine.RunReportPages()
bij FastReport.Engine.ReportEngine.RunReportPages(ReportPage page)
bij FastReport.Engine.ReportEngine.Run(Boolean runDialogs, Boolean append, Boolean resetDataState, ReportPage page)
bij FastReport.Report.Prepare(Boolean append)
bij FastReport.Report.Prepare()
bij FastReport.Design.ReportTab.Preview()
I am expecting that the query should give the same results as the same data from a table.
The problem exists in the registered FastReports for VCL version 4.12.1 but also in the demo-version for .NET.
I can overcome the error to use a table or let the result of the query contains "empty" records for those office-numbers and year with no counts, but I don't like the solution to use this solution everywhere.
So could you please fix this problem that a query gives the same results as a table ?