infinitizon
MIS
thread767-438413
Hi all,
I have a report (created from Crystal reports in VS2008) with a date field and then amounts thus:
I also have a discreet string parameter with two options "by value" or by records".
Now what I want is that the field are grouped by week, so I did a formular like so:
What I want however is that the group heading have a serial number for weeks e.g week 1, Week 2 and for weeks that are skipped (maybe because there is no posting on that week), it should still record for that week as "Week x" (Where x is the serial number for the week).
Similarly, if the parameter "by value" is picked, then, It gives the group total, otherwise, give the total count of records in the group
For more information, please ask.
Thanks a whole lot in advance.
Hi all,
I have a report (created from Crystal reports in VS2008) with a date field and then amounts thus:
Code:
Creation Date | Total Cost | 0-7 days | 8-30 days | >30 days
11-Jun-2012 | 70,314.51 | 0.00 | 70,314.51 | 0.00
11-Jun-2012 | 46,307.42 | 0.00 | 46,307.42 | 0.00
11-Jun-2012 | 79,503.50 | 0.00 | 79,503.50 | 0.00
11-Jun-2012 | 113,817.12 | 0.00 | 113,817.12 | 0.00
11-Jun-2012 | 106,234.20 | 0.00 | 106,234.20 | 0.00
11-Jun-2012 | 10,162.43 | 0.00 | 10,162.43 | 0.00
05-Apr-2012 | 14,931.30 | 0.00 | 14,931.30 | 0.00
12-Jun-2012 | 70,269.44 | 70,269.44 | 0.00 | 0.00
12-Jun-2012 | 207,047.36 | 207,047.36 | 0.00 | 0.00
12-Jun-2012 | 207,047.36 | 207,047.36 | 0.00 | 0.00
31-May-2012 | 330,581.16 | 330,581.16 | 0.00 | 0.00
08-Jun-2012 | 10,500.00 | 10,500.00 | 0.00 | 0.00
12-Jun-2012 | 11,045.32 | 11,045.32 | 0.00 | 0.00
12-Jun-2012 | 132,985.29 | 132,985.29 | 0.00 | 0.00
12-Jun-2012 | 8,750.97 | 8,750.97 | 0.00 | 0.00
12-Jun-2012 | 4,586.80 | 4,586.80 | 0.00 | 0.00
Now what I want is that the field are grouped by week, so I did a formular like so:
Code:
datevar Sunday;
datevar Saturday;
stringvar week;
sunday := dateserial(year({useWipByAgeReport.Creation Date}),month({useWipByAgeReport.Creation Date}),day({useWipByAgeReport.Creation Date})-((datepart("w",{useWipByAgeReport.Creation Date},1)))+1);
saturday:=dateserial(year({useWipByAgeReport.Creation Date}),month({useWipByAgeReport.Creation Date}),day({useWipByAgeReport.Creation Date})+(7-((datepart("w",{useWipByAgeReport.Creation Date},1)))));
week := "Week " & sunday & " - " & saturday
What I want however is that the group heading have a serial number for weeks e.g week 1, Week 2 and for weeks that are skipped (maybe because there is no posting on that week), it should still record for that week as "Week x" (Where x is the serial number for the week).
Similarly, if the parameter "by value" is picked, then, It gives the group total, otherwise, give the total count of records in the group
For more information, please ask.
Thanks a whole lot in advance.