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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run the same report with different parameter defaults 1

Status
Not open for further replies.

SteveBell

Technical User
Mar 23, 2001
40
US
I have a report that I'd like to schedule in ePortfolio to run on the 1st of each month with a date range of the previous month. I'd also like to run it on demand with a parameter prompting for a date range. Is this possible? Steve Bell
[sup]There's nothing better than a friend, unless it's a friend with chocolate.[/sup]​
 
Hi Steve,

I don't think this can be done. You either respond to a date prompt, or, the dates are kind of "hard coded".

My suggestion would be to have 2 slightly different reports.
One that's scheduled, and one that's on demand.

Hope this helps...

Nuffsaid.
 
That's the same conclusion I reached. I don't like it because I'll have two reports to change every time someone requests a modification, and I'll eventually get them out of sync. I was hoping someone would point me to a function that would check the environment, but if it's not there, it's not there. Steve Bell
[sup]There's nothing better than a friend, unless it's a friend with chocolate.[/sup]​
 
Why not? You can keep the report with a date range prompts for on demand viewing, also can use a job file wrote in VB or VB Script run at Task Scheduler something. The job file may implement some logic like run that report at the 1st day of every month, and assign the last month as the range prompts current value. That is it.
 
You should be able to do this in CMC. On demand prompt: Check the 'prompt the user...' box on the parameters tab when publishing the report. Schedule: set the parameters when you create the monthly schedule using a 'special' date, say 1/1/1999, that the report or stored procedure recognizes as a scheduled run and dynamically sets the date range to current month -1.
 
Well, using VB is one solution, but it's not available to me. Our corporate policy is to use ePortfolio for reports.

What's "CMC"? Steve Bell
[sup]There's nothing better than a friend, unless it's a friend with chocolate.[/sup]​
 
OK, I'm in Monday mode since it's the first day back from the new year holiday. CMC is, of course, Crystal Management Console. Steve Bell
[sup]There's nothing better than a friend, unless it's a friend with chocolate.[/sup]​
 
Correct (CMC). We don't use VB either. All our reports use Oracle stored procedures to collect the data, so we can use this logic prior to data selection. How do you schedule with a dynamic date parameter of last month? Or is it not a recurring schedule?
 
I am currently doing this using the 'special date' suggestion from earlier. I have 2 parameters - start and end dates - and 2 formulas that convert the dates to previous month if they = 1/1/1970. It works great
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top