Dear John,
Ok ... are you stating that the array contains the sum of some column/data, one element in the array representing each month?
If so, then I would create 12 separate formulas. For example, 01_Mo, 02_Mo and so on. Now the sum of these formulas can be used in a chart to do exactly what you state.
Here is an example from one of my reports, where I have done a "manual crosstab". I generate the column header in one formula and then in another and check the date of my record to see if it in the range of that month and print a 1 or 0... you could change the then 1 else 0 part to then {table.Column} holding the value for that month.
The nice thing about this is that I can group my report by whatever I want and get grandtotals for the month and summaries at each group level.
I can also chart on the data.
Here is the formula for the column header:
dateadd("m", -12,{?Pm-@ReferenceDate})
I just place that on my report and format it to show Month only.
Next, is 01_Mo formula and represents the month that is 12 months from the reference date parameter (I prompt user for "Run As" date).
if {Incident.Open Date & Time}
in
CDATE(
Year(dateadd("m", -12,{?Pm-@ReferenceDate})),
Month(dateadd("m", -12,{?Pm-@ReferenceDate})),01)
to
cdate(
dateadd("M",-11,cdate(year({?Pm-@ReferenceDate}),month({?Pm-@ReferenceDate}),1))-1
)
then 1
else 0
I hope that helps...
regards,
ro
Rosemary Lieberman
rosemary-at-microflo.com,
Microflo provides expert consulting on MagicTSD and Crystal Reports.
You will get answers more quickly if you read this before posting: faq149-3762