Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weekly report

Status
Not open for further replies.

JPCogAdmin

Programmer
May 22, 2006
110
US
Hi,

How would you create a cross tab report that would have the
weekly period on top?

For instance
| |
7/7/07 - 7/14/07| 7/15/07 - 7/22/07|
| |
Trip A 5 | 8 |
Trip B 14 | 27 |

The measure would be people on trip. I wonder how to arrange them in Report Studio. Thanks

 
_week_of_year
Returns the number of the week of the year of the date_exp according to ISO 8601, in which week 1 of the year is the first week of the year to contain a Thursday, which is equivalent to the first week containing January 4th.

Which may be the other defintion of week of year that you want.

If it suits the bill, you could write an elaborate case expression that would read:

Code:
CASE
WHEN _week_of_year(certaindate) = 1 THEN '1/1/07 - 1/7/07'
WHEN _week_of_year(certaindate) = 2 THEN '1/8/07 - 1/14/07'
..............................
WHEN _week_of_year(certaindate) = 52 THEN etc....

Use the weeknumber in the crosstab, but show the case object in the header.

But again the ISO week is probably the wrong one in this case..



Ties Blom

 
Ties,

Thank you very much for the example. That really helps. Also, do you know if this report format is normal?
 
Normal" like beauty is in the eye of the beholder!
I think many reports would try to conserve horizontal real estate by using "week of" or "week ending" headers rather than both start and end dates, but this would depend in part on how many periods you are trying to squeeze across the page...
"it's all good"...
 
I'd say it is a regular crosstab, but with additional formatting of the header columns?

In any case you can use both the weekno and the case object in the header, then apply the sort on the weekno,set the font to 1pt, the height to 1pt and the background color to black.

Ties Blom

 
Thank you Ties. Those are really good suggestions.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top