5087 - Undefined subroutine nameofsubroutine!

This error is generated when the subroutine called from WhizBase function $WBSUB does not exist. Check if you have spelled the subroutine name correctly, and if the subroutine is defined in main wbsp file or in any sub reports and include files called from main wbsp file.