
Hello,
and thank you in advance for any help with this issue.
I need to write a report with shows items and sales history.
Each item should have six columns for each month. So six month of history.
I created six calculation fields with this formula:
Local DateVar d := CDate ({p21_sales_history_report_view.invoice_date});
If Month({p21_sales_history_report_view.invoice_date}) = Month(DataDate) - 4
Then
{p21_sales_history_report_view.qty_shipped}
Else
0
I changed the - 4 to - 5 -6 etc. Unfortunately for some reason it does not pull any information beyond January. Probably because we are in April and if the formula says April(4) - 5 the return value is -1 which is not a valid month. How can I tell Crystal only to count until 1 and then start at 12 again so I can see history from December.
Thanks
Gunar
Crystal XI
Edited by gunar - 10 Apr 2008 at 10:53am