How to avoid "gender disappointment"

DON'T HAVE A BABY JUST BECAUSE YOU WANT ONE SPECIFIC SEX. Obviously there's a lot more to it, but I keep seeing people say they want to try for a girl or try for a boy. Now you know it's 50/50. So why set yourself up for that? And why set the child up for that? Try by all means, but don't he surprised or upset when it's not what you want.