Which sentence is more formal?

 - The president and prime minister discussed new trade regulations and announced that they were in agreement.
 - The president and prime minister discussed new trade regulations and announced that they were on the same page.
The second sentence is less formal. You can tell because it uses an idiom (on the same page).
The first sentence uses formal language in place of the idiom, so it is more formal overall.