I am making a report that contains all service providers, and has the following hierarchy: City - > Specialty - > Provider.
In ireport stayed the main report containing a city subreport, within the city subreport has a subreport of specialties and within the specialties has a subreport of all service providers.
My problem is in the main report that needs that each page has the name of the city and on the side the name of the specialty. Passing information from the subreport to the main report I get through a variable, I just can not put it in the header because it is compiled before the band that is the subreport of cities, and when I put in another band it only shows the name of the last city . And also put the name of the specialty on the same side of the name of the city.
The report has a standard to follow, which is according to an example I made below. Example