If you have designed your crystal report correctly with keeping the values those are supposed to be iterated in the details section, then you just need to do minor changes in the stored procedure.
You can make use of
LIKE
to do so.
ALTER PROCEDURE MySP
(
@ReceiptNoSample VARCHAR(20)
)
AS
BEGIN
SELECT * FROM MyTable WHERE ReceiptNo LIKE @ReceiptNoSample+'%'
END
Further study here -
SQL LIKE Operator[
^]
Hope, it helps :)