Report via stored procedure SQL server

ayh1

Registered User.
Local time
Today, 08:30
Joined
Dec 19, 2014
Messages
29
I have created a stored procedure parameter query and using access created a report that runs the procedure and creates a report based on a parameter entered:

1) I wanted to know if I can specify a default paramter so if I do not input it returns all records?

2) Can I create a stored procedure so it asks for month, for example if I had a createdDate field of data type datetime and wanted to return records for a specific month?

thanks
 
You should be able to set a default value of the parameter in your stored procedure.
Something like this: @Parameter as Int = 0

You should be able to use a date as a parameter although dates are handled differently in Access and SQL. I find that I need to convert it into something that I can use when I want to filter on a date.
 

Users who are viewing this thread

Back
Top Bottom