I really don't see why people compares so much LOTR with Harry Potter... I guess because both involve magic, I guess?
As for the books I can not tell, I haven't read any HP books and don't plan on doing so any time soon, but I have read LOTR (all the 3 parts) and it is amazing.
As for the movies, I have only seen the first HP movie. About a month later I watched The Fellowship of the Ring for the first time.
I liked LOTR 10000 times better than HP. Don't ask me why. :B