I had morning (all day) sickness pretty bad so most of my office guessed that I was PG before I told them. I told my boss early (~10weeks) because I work with stuff that could be a risk to the baby so I needed to go through the occ-med dept to be able to avoid such exposures.
I would think that you should tell him/her before he/she finds out "through the grapevine". Other than that, I don't think it matters much.