If I know there is a creature in range under the greater invisibility effect, can I do the ready action to cast dispel magic on the invisibility effect when the invisible creature reveals his position with attacks, spells or in any other way?
You can target invisible creatures
Given that you don't need line of sight to target the invisible creature with dispel magic, you can target the creature even when invisible.
Dispel magic (PHB, pg. 234) says:
Choose one creature, object or magical effect within range.
It doesn't say anything about "that you can see", meaning that you don't need to be able to see the invisible creature to attempt to dispel the effect.
This means you don't need to use your action to ready the spell, you can just cast the spell (unless you aren't sure they're within range, in which case you could ready the spell to be released upon the invisible enemy revealing their position when they attack, etc).
Yes, you can cast Dispel Magic on the creature
The text for Dispel Magic says you must
Choose one creature, object, or magical effect within range. Any spell of 3rd level or lower on the target ends. (PHB, p. 234)
...and Dispel Magic can also end higher-level spells with an appropriate roll. The important detail is that you must "choose one creature... within range," not one creature that you can see. Contrast this spell with:
Feeblemind - You blast the mind of a creature that you can see within range (PHB, p. 239)
As such, you can cast Dispel Magic on the invisible creature and end Greater Invisibility on it.