Q: When should I stand for prayer in the masjid? Before or after the iqamah?
A: If the follower sees the Imam, it is preferred that he stand when "qad qamatis salat/the prayer has been established" is uttered by the caller to prayer. If he does not see the Imam, he should remain seated until he sees him.
Source: Sharh al-Muntaha