Unable to publish main report from Jaspersoft studio, only the sub report shows up

Document ID : KB000122917
Last Modified Date : 12/12/2018
Show Technical Document Details
A Jasper Report (consisting of main report and sub report) was published to the Jasper Server and was functioning fine.

However, a further deletion of the report on Jasper Server followed by a re-publish of the same report via Jasper Studio ended up with a situation where, the sub report shows up on the Jasper Server repository but not the main report (or vice versa).  

No matter if the report was published to a totally different location in the repository, the issue remained the same.
In Jasper Studio, ensure that the correct sub report expression (in the Publish to JasperReports Server wizard) exists on the main report as documented here https://community.jaspersoft.com/wiki/deploy-report-unit-multi-level-sub-reports-jasperreports-server

User-added image

The option to "Overwrite" in this wizard should be set to: "Overwrite" as opposed to "Overwrite Only Expression"