Click to See Complete Forum and Search --> : URGENT - how to calculate the month to date


angelyin
May 12th, 2009, 05:41 AM
hihi..i'm new member and also new to use crystal report 11. Need some help from all member here......appreciate for all your help.

PURCHASING REPORT February, 2009

Num | Supplier Num| receipt value| percentage|month to date
1 | PERSAD | 1,089,908|26.32 | (jan+feb)
2 | ZHOZHO | 753,422| 18.19| ?
3 | PERVIE |603,878 |14.58 | ?

Total |3,754,869 | 90.66
Others |386,731 | 9.34
Grand Total |4,141,600 | 100.00

This report will appear top 20 record for each month, this oly the sample for few record.

The Question is, how i want to display month to date total for the record?

Let say for example: when i key in february to view the feb report, then month to date field will total up january and february value and show in column, or if i key in march then month to date field will show total up for jan+feb+march)

p/s: each month the top of 20 supplier will different. Maybe this month PERSAD is top 20, but at the following PERSAD will not in the top 20 list.

so, i don't know how to show the montht to date total.

thanks

angelyin
May 12th, 2009, 05:47 AM
Please help.....
thanks in advance.

DaveyC
May 12th, 2009, 07:21 AM
Month to date normally refers to all records for the past month.

Looks like you mean year to date, because you mention if you type march you want to go back to january?


Depends where you want to do the calulcation in the backend or in Crystal itself.

But it just a simple query on the dates .. get only records with dates between 01/09 - 03/09

What backend are you using?


Deece

sparker
May 12th, 2009, 04:58 PM
1. in the report selection expert, select the cell that contains the Dates.
2. for the formula provided in the drop down, select "is in the period".
this will provide you with pre-defined crystal options, select "MonthtoDate"

to also illistrate the report period dates that are returned in the report.
create a custom formual and copy and past the second value below.

Weekly
CStr(Minimum(LastFullWeek)) + "-"+ CStr(Maximum(LastFullWeek))

Moth To Date
CStr(Minimum(MonthToDate)) + "-"+ CStr(Maximum(MonthToDate))

Beyond this, I would recommend creating a Sub Report for your year to date totals and other required data sets.