On solutions of constrained KP equations