The Genealogy of Rama (ancestors as well as descendants) is found in Book IV of Vishnu Purana, the Shrimad Bhagavatam and the Brahma Purana.
Chapter 1 of Vishnupurana mentions that Brahma created Daksha out of his thumb. Daksha had a daughter Aditi, who was mother of Sun. From the Sun was born Manu. Since the Sun-god was Manu's father, his lineage came to be known as the Suryavansha(the descendants of Sun).
Manu had many sons of whom 50 perished quarreling with one another. Ten sons survived, one of whom was Ikshvaku. The Brahma PuranaChapters 7 and 8) provides details on Manu's 10 sons and their descendants as follows:
Manu also had a child named Ila(aka Sudyumna) who gave birth to Pururavas after intercourse with Budha, the son of Soma. Pururavas was the first king of Aila dynasty or the Somavamsha/Chandravansha.
Rama was born in Ikshvaku's line. The lineage from Ikshvaku to Rama is as follows:
After Saudasa, the Brahmapurana gives the descent until Raghu as follows:
After Saudasa, the Vishnupurana gives the descent until Raghu as follows:
After Raghu, all the puranas give the descent as follows:
The Genealogy of Rama is provided in the Ayodhya Kanda of Valmiki Ramayana as follows:
After Trishanku the Valmiki Ramayan continues with Yuvanasva as below:
The lineage of Rama starting from him is as under:
The Brahma Purana gives the descent from Ahinaga to Vajranabha as follows:
The Vishnu Purana gives the descent from Ahinaga to Vajranabha as follows: