Monthly Report error with January date!!!!

[ Follow Ups ] [ Post Followup ] [ Order Desk Pro Support ] [ FAQ ]

Posted by Sue Sloan on January 07, 2004 at 08:50:42:

A customer called and reported that the sales & marketing "monthly reports" are not working:
A. reports for "last month" are not finding any records for December 2003, but he has many records there.
B. reports for "this month" are not finding records for January 2004 even though he has a few orders for this month.

Upon investigation of situation A, it appears that one formula in the system that calculates the last day of the month desired for the "last month" reports is incorrect when the month = 1 (for January).

Fortunately, it is easy to fix the "last month" reports (A):

1) In Design Mode on any view, select Create on the top menu bar, then select Field Definition.

2) In the Field Definition dialog box, at the top there is a field labeled "View fields by" that defaults to "Custom Order". Change the selection there to "Field Name". This sorts the fields alphabetically within type (type being real field in database, variable type, then calculated type).

3) Scroll down the list of fields until you find a calculated type field named "LastMoEnd". It will have a formula:
Date(Month(VarDate), 1, LastYear2) - 1

Change the formula to look like this:
Date(Month(VarDate), 1,Year(VarDate)) - 1

What this formula does is find the last day of the prior month by taking the first day of the current month and subtracting 1 from it. This method takes care of the variance in the number of days per month (30, 31, 28 or 29).


Upon testing situation B, I could not reproduce the problem reported with "this month" reports.

Sue Sloan


Follow Ups:



Post a Followup

Name    : 
E-Mail  : 
Subject : 
Comments: Optional Link URL: Link Title: Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Order Desk Pro Support ] [ FAQ ]