Hi Shashidhar,
Thanks for the reply. I tried it. I changed @rid to varchar in both SP and my report. but still i am getting the same error.
if i run the query alone it works fine. but as SP, it is cusing prob.
so can you suggest me something? also, i didnt get your getorder() function.
Thanks,
Malavika