i have a formula for determining and grouping on week numbers for a backlog report (SO) it comes out as below and does not order too well, unless i specify order and add all 52 to 53 weeks manually.
51.00-06
52.00-06
53.00-06
1.00-07
2.00-07
3.00-07
and so forth
but without a sort specification, it will do this
1.00-07
13.00-07
2.00-07
3.00-07
48.00-06
52.00-06
so the prob is the < 10s need to have a leading zero
we dont need the .00, but thats caused during the Round function. Do you have any input that i can do to fix this so i wont need to add 52 sort entries on 10 reports each new year?
"WeekNumberGeneral" - Group #2 Header Sorted
"WeekNumber07Year"
Heres is where i think we can make the "fix"
"WeekNumber07"
Other weeknumbers are the same with just the start date adjustment and an 06 or 05 in the year.
51.00-06
52.00-06
53.00-06
1.00-07
2.00-07
3.00-07
and so forth
but without a sort specification, it will do this
1.00-07
13.00-07
2.00-07
3.00-07
48.00-06
52.00-06
so the prob is the < 10s need to have a leading zero
we dont need the .00, but thats caused during the Round function. Do you have any input that i can do to fix this so i wont need to add 52 sort entries on 10 reports each new year?
"WeekNumberGeneral" - Group #2 Header Sorted
Code:
if {@WeekNumber06} > 53 then CStr({@WeekNumber07Year}) else
if {@WeekNumber05} > 52 then CStr({@WeekNumber06Year}) else
if {@WeekNumber04} > 52 then CStr({@WeekNumber05Year}) else
if {@WeekNumber03} > 52 then CStr({@WeekNumber04Year}) else
If {@WeekNumber03} <= 52 then CStr({@WeekNumber03Year}) else "0"
Code:
formula = {@WeekNumber07} & "-07"
Heres is where i think we can make the "fix"
"WeekNumber07"
Code:
formula = Round(datediff( "W" , #12/31/06# , {SO_SalesOrderDetail.PromiseDate},0 ) + 1)
Other weeknumbers are the same with just the start date adjustment and an 06 or 05 in the year.