facundote Posted July 9, 2010 Share Posted July 9, 2010 Hello, I have a problem with a chart...Description: I have a graphic on my report that appear in various pages and I want that it appears only at first page. Explanation: My SQL is:SELECT a.deportista_id,d.nombre, d.apellido,SUM(a.ausenteInjustificado), SUM(a.ausenteJustificado), SUM(a.lesion),SUM(a.presente), SUM(a.tarde), e.tipoActividad, c.nombre NOMBRE_CLUB, e.categoriaFROM asistencia a, deportista d, equipo e, club cWHERE $P{fechaDesde} <= a.fecha AND $P{fechaHasta} >= a.fechaAND a.deportista_id=d.idAND a.equipo_id=e.idAND e.nombre= $P{equipo}AND e.club=c.idGROUP BY a.deportista_idORDER BY deportista_id This query returns 16 rows, so the report shows 16 pages with the same chart in all pages.So my question is, How can I print only the first page (with the graphic) of my report?Thanks a lot.Facundo Link to comment Share on other sites More sharing options...
slow Posted July 12, 2010 Share Posted July 12, 2010 you can choose to place the chart in other bands different from detail band...the detail band is printed 16 times because there are 16 row from the db... Link to comment Share on other sites More sharing options...
facundote Posted July 12, 2010 Author Share Posted July 12, 2010 Hello Slow, thanks for your answer. Yes, I have tried to place the chart in other band, for example at the Page Header or at the Column Header, but in both cases the chart appear in blank. Yesterday I have found a medium solution, with the property "Print when expression...", so if I put $V{PAGE_NUMBER}.intValue()==1 the report appears in two pages, at the first, the report with the chart excelent, but the second page (That I don´t need) appears in blank. What do you think? Thanks again. Link to comment Share on other sites More sharing options...
slow Posted July 13, 2010 Share Posted July 13, 2010 Are you sure you place the chart correctly?I did a test this morning and it worked perfectly, even putting the chart in the background band... obviously if I put the chart in the detail band it's repeated more and more times. Link to comment Share on other sites More sharing options...
facundote Posted July 20, 2010 Author Share Posted July 20, 2010 Yes, I put it in the background band, and the same result, the chart appear in blank. I don´t know what is the reason. In your test, are you use a query similar to mine? for example with the SUM property and a GROUP BY clause? Thanks again Link to comment Share on other sites More sharing options...
slow Posted July 20, 2010 Share Posted July 20, 2010 Yes...I have created a simple test query with one sum (and obviously a GROUB BY clause)... and it works.have you tried to use a different version of iReport? what version do you use? Link to comment Share on other sites More sharing options...
facundote Posted August 6, 2010 Author Share Posted August 6, 2010 I am using 3.7.1 version, and you? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now