A general formulation of the relativistic multipole moments in axistationary electrovac spacetimes is introduced in a closed analytical form. We give a complete description of how the Ernst potentials on the symmetry axis can be completely characterized by these arbitrary multipole moments. Some concrete applications are also developed.