• got an error compling my query in query designer for my SSRS report.

    Got an error , Incorrect syntax near '@PFromDate' . what wrong with this error.

    i already declare this parameter to dataset properties/parameter.

    even i setting up a SET keyword still have this error (Must declare scalar variable..@PFfromDate)

    how could fixed this problem? yourhelp is very much appreciated. thanks.

    IF @rowcount=0

    BEGIN

    @PFromDate=@PFromDate-1

    @PToDate=@PToDate-1

    END