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!

Passing Stored Procedure date parameters when scheduled in CE XI

Status
Not open for further replies.

JimKSHC

Programmer
Mar 10, 2010
1
US
I have a Crystal Report based on a stored procedure that requires start and end dates as parameters. I am unaware of any way to setup the scheduled job to provide moving values for the first and last days of last month, and the parameters are required for the stored procedure to work.

If providing calculated values in the schedule isn't possible, is there a way that I can provide them programmatically within the report? I've tried looking for a way to change the datasource on-the-fly so that I can provide the values at that point, but can't find that either.

I'm a VB programmer first, so if it can be done, knowing where to put the code within the report is critical.

Thanks!
 
AFAIK, it can't be done in the report itself. You could write a separate program to calculate the dates and schedule the report using the SDK (not difficult once you know how to use the SDK.) However, I think the better option would be to modify the stored procedure, if possible. Set the start and end dates to default to null. Then have the stored procedre calculate the start and end dates if they're not passed in as parameters.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top