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

Stored Procedure input parameter 1

Status
Not open for further replies.

RobbOrt

Programmer
May 27, 2010
16
US
When using a SQL stored procedure in Crystal Reports (XI), can you edit the input parameter that the user needs to fill in to run the report?
My SP input variable is set as DATETIME, but I would like the user to be able to input only the date.
 

SQL Server syntax:

Create a parameter in Crystal with a date datatype.

Base your report on a command object instead of the stored procedure itself:

exec yourspname {?DatePrompt}

Modify the date filtering in your sp to use a converted value:

Code:
create procedure timetest @cutoffdate smalldatetime
as

select  * from dbo.yourtable where
yourdatefield < convert(smalldatetime,@cutoffdate,101)



 
Thanks Brian, just what I was looking for.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top