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!

Desire specifying a date period with a parameter

Status
Not open for further replies.

maurella

Technical User
Mar 12, 2002
32
0
0
US
I would like to generate a report which tabulates results periodically. That is, weekly, monthly, hourly.
So far, I have created a group based on a date field, and I can hard define that group to break on a period. But I don't see anyway that I can manipulate that period using a formula.

Any suggestions? This is CR 10, but I will soon have CR XI.
 
Manipulate a period means dynamically change which period to use? You're better served to be specific, manipulating isn't a very descriptive statement.

If you wish to dynamically change what period of time you group on, you have options.

One is to create a parameter and in the parameter place daily, weekly, monthly etc., then create a formula as in:

if {?Parm} = "Daily" then
totext({table.date},"yyyyMMdd")
else
if {?Parm} = "Weekly" then
totext({table.date},"yyyy")&totext(datepart("ww",{table.date}),"00")
else
if {?Parm} = "Monthly" then
totext({table.date},"yyyyMM")
else
...etc...

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top