CREATE procedure [dbo].[spItemBookingDateFilter]
@FomDate AS VARCHAR(20),
@ToDate AS VARCHAR(20)
AS
Begin
SELECT IB.ID, IB.CustID, IB.DeviceID, IB.Bookingtime, IB.RouteID, IB.IsCollected, IB.IsAllocated, IB.Status, IB.TotalAmount, IB.TotalWeight, AD.Id AS Expr1, AD.Name, AD.MobNo, AD.Location, AD.Address, AD.Post,
AD.PostalCode
FROM dbo.ItemBooking AS IB INNER JOIN
dbo.CustomerAddressDetail AS AD ON IB.AddressID = AD.Id
AND convert(VARCHAR(50),@FomDate,105) <= IB.BookingTime AND convert(VARCHAR(50),@ToDate,105) >= IB.BookingTime
end
GO
by giving a table it is just downloading as pdf file but how can I give stored procedure with parameter to filter date range and to print these data ??
somebody please guid me how to get to the correct result ??