You will have to modify your SP. One option is to change it likeWHERE Date_Created >= DATEADD (YYYY, - 2, GETDATE()) AND Date_Created <= GETDATE() AND ((LTrim(RTrim(Customer)) = @customername) OR (@customername IS NULL))
SO when you dont pass any value to @customername it picks up all customers.EDIT: Also I would change this Date_Created >= DATEADD (YYYY, - 2, GETDATE())
to thisDate_Created >= DATEADD (YYYY, - 2,dateadd(d, datediff(d, 0, getdate()), 0))