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

Schedule report with dynamic parameters

Status
Not open for further replies.

naga5566

Technical User
Mar 14, 2003
90
US
Hi All,

Is it possible to schedule a report on daily basis which takes the date (sysdate) parameter dynamically ?
 
Use the CurrentDate function, which is equivalent to Oracle's sysdate
 
Thanks for the reply.

Further Elaborating my question,
My report has a date Parameter which can be supplied when i refresh the report.The User could pass any date to it( not necessarily sysdate).I want to schedule this report with passing the sys date parameter.

I could have passed the sysdate to the Sql,then it always refresh the report with current date. I need sysdate only when i schedule the report.If the User wants to refresh the same report with any date,he should be able to do it.
FYI ,I am Using CE 10.

Thanks
 
Then simply create a date parameter.

Click on Insert->Field Object->Parameter

Give the parameter a name (UserDate)
Type in the prompting text (Enter Date)
Click on Dropdown and select Date

If you want the ability to use a range of dates, then check Range Values


For your record selection formula, enter the following

{table.date} = {?UserDate}

or if you want a date range

{table.date} in {?UserDate}

Without more specific information, it's difficult to provide you with the right solution.

Crystal Version (provided on the 2nd post)
Database and connectivity
Sample input date
Expected output

-LW
 
Hi

Create a parameter with 2 default values, "Recurring and "On Demand"

Then use something like this in your record selection;

(if {?Schedule Type} = "Recurring" then
{Periods.Date} = currentdate
else
{Periods.Date} = {?Report Date})

Nuffsaid.
 
Thanks again,

I thin k i am not clear enough.

I already have date parameter in my report.It is working fine.I wanted a way to automate this report so that it is refreshed everyday for that particular day( Sysdate) and is sent to different users automatically.I have scheduled the report,but i am looking for a way to pass the date parameter with sysdate value dynamically when the report is refreshed without user interaction.Is this possible in
CE 10.

Regards
NAGa
 
Sounds like you want a scheduler. Check 3rd party sources that will also do e-Mailing. Do a search on the forum for "scheduler" I thought I saw some earlier.

However, once the report is started by the scheduler, then you can use currentdate or any other Crystal date function to accomplish what you need to automatically set any date selection criteria such as lastfullmonth, yeartodate, etc

Again had you been more specific with your information, you wouldn't be frustrated at the roundabout way of solving your problem.

-LW
 
OK, let me get this right. You want to schedule the report to run every day using currentdate (sys date) as your date parameter, and you want to let your users run the report for any day they wish, correct? If this is the case use the example provided in my previous post.
To have the report run every day you would select the Recurring option from the {?Schedule Type} parameter and select a “dummy” date for the {?Report Date}(the dummy date is required because the parameter cannot be null.). Your record selection formula would evaluate to currentdate and ignore the {?Report Date} parameter. To run the report for a specific date you would select On Demand for the {?Schedule Type} parameter then provide the date for the {?Report Date} parameter. Your record selection formula will then ignore currentdate and select the records based on the date you provided.

I hope this clears things up….


Nuffsaid.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top