Now the RS folks might be thinking but how does this help me as I need a dataset and a dataset can only be based on a Stored Procedure or a direct table. No problem create the following stored procedure:

Yeah, absolutely. It helped me a lot. I am a newbie here and having struggle to get the functions working. I was not able to add the default dates in services. Your coding helped me to solve this issue. All is working fine.