A
Avenger
Hello there, I'm using a OWC11 Chartspace and I'm encountering some
difficulties in grouping date with multiple categories.
For example I have some invoice orders that have a "date" field, they
also have a "company" field (that states which company made the order).
The numbers of orders must be counted and I then have to group them by
date AND by the other field, (GROUP BY Order.Date, Company.Name ...
something like that)
I made the dynamic sql expression and set that query as the
chartspace's datasource. By default it groups the dates by day, and it
works correctly. I have been unable to let the user choose to group the
date field by month or year.
Because in order to let this kind of query work I had to set the
"hasPlotDetails" to false. Otherwise it doesn't work, it gives me an
error in this call:
chartspace.SetData chConstants.chDimCategories,
chConstants.chDataBound, Array(q.groupF1, q.groupF2)
q.GroupF1 in this particular case is the Date field, whereas q.GroupF2
is the Name field.
So if i set the hasPlotDetails to false I'm then unable to change the
grouping unit.. it fails in this call:
ChartSpace.Charts(0).Axes(chConstants.chAxisPositionTimescale).GroupingUnitType
= chAxisUnitYear
If it is not enough clear the output that I expect is something like
this:
Year - Company - Order Ct
2004 - A - 10
2004 - B - 5
2005 - A - 15
2005 - C - 10
And so on.. I also have to group them by month but so far it only works
by day.
What do I have to do to get this working? thanks in advance!
difficulties in grouping date with multiple categories.
For example I have some invoice orders that have a "date" field, they
also have a "company" field (that states which company made the order).
The numbers of orders must be counted and I then have to group them by
date AND by the other field, (GROUP BY Order.Date, Company.Name ...
something like that)
I made the dynamic sql expression and set that query as the
chartspace's datasource. By default it groups the dates by day, and it
works correctly. I have been unable to let the user choose to group the
date field by month or year.
Because in order to let this kind of query work I had to set the
"hasPlotDetails" to false. Otherwise it doesn't work, it gives me an
error in this call:
chartspace.SetData chConstants.chDimCategories,
chConstants.chDataBound, Array(q.groupF1, q.groupF2)
q.GroupF1 in this particular case is the Date field, whereas q.GroupF2
is the Name field.
So if i set the hasPlotDetails to false I'm then unable to change the
grouping unit.. it fails in this call:
ChartSpace.Charts(0).Axes(chConstants.chAxisPositionTimescale).GroupingUnitType
= chAxisUnitYear
If it is not enough clear the output that I expect is something like
this:
Year - Company - Order Ct
2004 - A - 10
2004 - B - 5
2005 - A - 15
2005 - C - 10
And so on.. I also have to group them by month but so far it only works
by day.
What do I have to do to get this working? thanks in advance!