• Yes. I'm using t-SQL but inside the SSRS reporting tool. Tried already to place a keyword Set @PFromDate but still got an error. i already stuck for a few days for this issue. your help is very much appreciated. thanks for your reply.

    Herewith is the error encounter from my query.

    Compiling my query from dataset properties->text query. the result is..

    Must declare the scalar variable "@PFromDate".

    Must declare the scalar variable "@PFromDate".

    Must declare the scalar variable "@PToDate".

    Must declare the scalar variable "@PFromDate".