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!

New to CR - Passing Date / Date Range Type Into Report as a Parameter

Status
Not open for further replies.

csmcvey

Technical User
Mar 23, 2006
10
US
New user to CR - still green.

We use the Business Objects Infoview Website to schedule CR reports. I have a report called Open Orders. I would like to create one report that I can upload and then when I schedule it, I can pass it a parameter and based on that parameter it will run for a given date / date range.

For example if I pass it a parameter of priorday it will run for currentday - 1

if I pass it week, it will run for the WTD

if I pass it month, it will run for MTD

I could create three reports that run for these specific dates/ date ranges, but I think my envisioned process would be a little more efficient and only require one report.

Is this possible? I think I have an idea of how to do it, but just dont know what the next step is. Should I create a function that sets the date / date range of the report based on the parameter passed in? If so, any pointers or guides on CR formulas? I have searched online and through some books, but havent had any luck so far.

THANKS
 
You could set up a string parameter {?Period} with options "Yesterday", "Month", "Week", and then use a record selection formula like this:

select {?Period}
case "Yesterday" : {Table.date} >= currentdate-1
case "Month" : {table.date} in MonthToDate
case "Week" : {table.date} in WeekToDateFromSun

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top