Passing Parameters to a Scheduled Report

Hello Experts!

Is it possible to pass or somehow set two date parameters for a Scheduled Report???
Typically this report is executed on an On-Demand bassis prompting the user for these values. But I would also like to run it as a scheduled report where I pass two dates that populate the params automatically…

Thanks

Dan


gridironcoach (BOB member since 2009-05-15)

You can set specific parameter values for a recurring schedule, but then those same values apply every time the report runs. Since you’re talking about date parameters, I assume that they need to change in relation to the date the report is being run.

For WebI reports, I usually handle this by setting up two reports that are exactly the same except that one prompts for the dates and the other uses a filter that’s been configured in the universe. I have filters for things like:

Became delinquent yesterday.
Became delinquent in the last 7 days.
Posted last month.
Posted last 30 days.

I haven’t tried this, but with Crystal you may be able to do something with optional parameters and default values where you set a default date for somewhere in the far past. It then would work like this:

  1. In your report, create a formula to calculate the relative start date. Do the same for the relative end date.
  2. In your Selection Formula, add something like this:
    (({?start date} = Date(1900, 01, 01) and {table.datefield} >= {@relative start date}) or ({table.datefield} >= {?start date}))
    and
    (({?end date} = Date(1900, 01, 01) and {table.datefield} <= {@relative end date}) or ({table.datefield} <= {?end date}))

-Dell


hilfy :us: (BOB member since 2007-04-16)