Queen Anne (reigned 1702 – 14) had seventeen known pregnancies during her marriage to Prince George of Denmark (b.1653, d.1708) but she died without surviving issue. Only five of her pregnancies led to live-born children and all of them died before she even ascended the throne. One son, William, lived to the age of eleven, dying in 1700.
Did any other monarch have so many known pregnancies yet fail to produce a surviving heir? If not (and I suspect not), which monarch comes closest to this (unwanted) record?
The question applies to both men and women who were monarchs in their own right and could be with more than one husband or wife (in the case male monarchs, this obviously means their wife or wives pregnancies!).