Jump to content

dr_pompeii

Members
  • Posts

    24
  • Joined

  • Last visited

dr_pompeii's Achievements

Contributor

Contributor (5/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Dear Members here a concrete tutorial about Spring Web MVC - JasperReports Integration (even with Spring Web Flow) http://java.dzone.com/articles/spring-web-mvc-spring-web-flow I hope this be useful for you. Best Regards__________________
  2. lucianc wrote: Do your subreports have top and bottom margins? If so, you'll have to set them to 0. Regards, Lucian Hello Lucian thanks so much, god bless u ;) ,it works now but i only could do this editing the file jrxml by hand how i can do this directly with IReport? only i can change the height to the bands thanks in advanced
  3. lucianc wrote: positionType="Float" only works when the second subreport is actually placed below the first one. Try to set y="10" for the second subreport. HTH, Lucian Hi lucianc i have 2 subreports in the same masterreport, both in the "Detail Band", both are Float how you suggested, ok, i dont have overlap problem anymore between them here my code Code: <detail> <band height="13" isSplitAllowed="true" > <subreport isUsingCache="true"> <reportElement x="16" y="1" width="474" height="5" key="subreport-1" positionType="Float"/> <subreportParameter name="hijoOwn"> <subreportParameterExpression><![CDATA[$P{papaOwn}]]></subreportParameterExpression> </subreportParameter> <dataSourceExpression>new JRBeanCollectionDataSource($P{mylistPapa}) </dataSourceExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"> <![CDATA[$P{hijoSubReport}]]> </subreportExpression> </subreport> <subreport isUsingCache="true"> <reportElement x="16" y="6" width="474" height="5" key="subreport-2" positionType="Float"/> <subreportParameter name="hijoOwn"> <subreportParameterExpression><![CDATA[$P{papaOwn}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="listaChild"> <subreportParameterExpression><![CDATA[$P{mylistPapa}]]></subreportParameterExpression> </subreportParameter> <dataSourceExpression>new JRBeanCollectionDataSource($P{mylistPapi}) </dataSourceExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"> <![CDATA[$P{hijoDosSubReport}]]> </subreportExpression> </subreport> </band> </detail> and the x,y, positions and height it seems correct like post before here one sub report Code:[code] <field name="i" class="java.lang.String"/> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="0" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="0" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="18" isSplitAllowed="true" > <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="145" y="0" width="100" height="18" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{i}]]></textFieldExpression> </textField> <staticText> <reportElement x="10" y="0" width="111" height="18" key="staticText-4"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <text><![CDATA[i:]]></text> </staticText> </band> </detail> <columnFooter> <band height="0" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="0" isSplitAllowed="true" > </band> </pageFooter> <summary> <band height="0" isSplitAllowed="true" > </band> </summary> one parameter and the unique band with height not zero is Detail Band the other subreports is the same in logic, the unique difference is the name of the paramter the problem is when i execute the master report i see both subreports, not overlapping between them, thats fine and correct, but i see a huge empty space (like a separator) between them, how i can avoid that? thanks in advanced
  4. Hello guys i have 2 subreports in one master report after to see this thread http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=9&id=26407#26407 to resolve that one subreport overwrite other support (before both subreports was located in Detail Band) well now each subreport in located in 2 group like the below code Code: new JRBeanCollectionDataSource($P{mylistPapa}) new JRBeanCollectionDataSource($P{mylistPapi}) [/code] ok, i dont have overwrite anymore, but i have a huge area of separation between them (even for each subreport only "Detail Band" has a height) like the photo you can see 2 blocks how i can avoid the huge separation? thanks in advanced [file name=report-f5f9017543304dc9b02720d5f29cf30f.jpg size=4859] Post edited by: dr_pompeii, at: 2008/05/17 04:33
  5. Hello guys after to see in reference documentation, i saw how send from a master report to subreport primitives objects but how i can send a Collection? (Many pojo for example inside of some ArrayList) some link of reference can help i appreciate thanks in advanced regards
  6. Hello svenn thanks for the reply Sorry I can not open your compressed file but I think i understand your issue.why?, i compressed in linux but winzip can open, wondered why you cant Foe the details you could put your query in a subreport. You can then set the subreport element to "Remove line when blank".i see, but sadly i cant integrate yet Spring with subreports with JR only i can work in peace Spring with JR other approach , i appreciate regards and thanks in advanced
  7. Dear Members i work with jasperreport and ireport i have the next situation, the only way to explain this is with pics the case is that a customer can buy many motorcycles 1 to 4 and 0..N motorcycles parts in the same buy the sql query is a union of 2 select like (SELECT....)UNION(SELECT....) why in this way?, the reason that the first SELECT is to get all the motorcycles to sell (the minimum is 1) and the second SELECT is for the motorcycles parts (0 to N, thats the problem) ok with the theory, pls see ireport.PNG, thats the ireport editor, both circles (color red,green) are located in the Detail Band, the red are for motorcycles and green for motorcycles parts when i execute the JasperViewer i get this page1.PNG, page2.PNG (practically a white page with the bottom with the data of the all price to pay of the buy) maybe you are asking why the behaviour of the page2.PNG the reason is for the (SELECT....)UNION(SELECT....) it gets a lot of NULL results, but i have for all Detail Band objects the option Blank when null and remove line when blank i dont have some idea how to resolve this, please help, maybe some option in ireport that i unknown is there i cant change my query because the report is very special my object is get page like ideal.PNG (edited by hand of course) thanks so much in advanced [file name=good.gz size=76710]
  8. Dear Members i used to work with jasper/ireport report and i am fine usually i generate pdf reports with many pages i noticed that if in the IReport JasperViewer i save the preview with extension .pdf, well i get this file the problem is when i save this to XLS format i have 2 choices, single/multiple sheets if i choice single sheets, well the file is created but cant be open in windows and even linux (open office) i must choice multiple sheets, but each page from the IReport JasperViewer generate a sheet in the XLS file why? even worst, pls see the attachment file why the ugly presentation of rows and columns?? normally i work with spring framework i generate for my application in this way the pdf report Code: of course that for XLS report should be Code: but the results are the same can i fix this?, how? thanks in advanced [file name=xls.png size=46318] Post edited by: dr_pompeii, at: 2008/05/04 19:04
  9. thanks so much C-Box it works with your help and my research in the forum i did this Code: ($F{tipoCambio}.compareTo( new BigDecimal("1.00"«») ) == 0) ? "Dolar" : "Soles" of course that my Variable is type String thanks again
  10. Hello guys i have a jrxml with a db query and works fine, in my fields retrieved by the query appear a field call for instance "moneychange" it would be 1 or #.## my problem that i want to resolve is that the "Variable" prints value "Dolar" when "moneychange" has 1 how value and value "Euro" when "moneychange" has #.## (3.15 , 5.18, etc) how value how i can do this??? thanks so much for advanced
  11. hello codyjasperForge thanks for the reply i see that the solution is directly related with the db in this case for Oracle thanks, but i work in mysql, so..... it shouldnt work i thought that ireport can offer a special option in some place thanks anyway regards
  12. Dear members i see that ireport offer the option when i recieve a null value i can choice the option to display empty the field, but i need this, in some report i need show by rows (related of articles) stock initial - sum num entries - sum num outs- amount some times in a range of dates never happens an out/extraction of articles from the warehouse, so this value return like "null" but i need instead the value 0 with this sql i get the num of entries and outs Code:SELECT a.*,a.descripcion as nombrearticulo,m.nombre,lc.idLineaCategoria,lc.descripcion as nombrelinea, (select sum(cantidad) FROM HistorialArticulo h WHERE h.idArticulo=a.idArticulo AND h.tipo = 'HISTENTALM') as entradas, (select sum(cantidad) FROM HistorialArticulo h WHERE h.idArticulo=a.idArticulo AND h.tipo = 'HISTSALALM') as salidas, ....... where entradas=entries and salidas = outs for each row make this operation amount = (stock initial+ sum num entries)- sum num outs again to make this operation if the value of entries or outs return null all the operation show null, how i can do that? thanks for advanced
  13. Hello Dear members i have a project with Spring and i use jasperreports and all works fine the problem is when i use a lot of times JR to genereate pdf reports , suddenly i am out with my pool connections asking in the Spring Forum, it seems that i should close my ResultSet how i show below [code:1] protected ModelAndView handleRequestInternal( HttpServletRequest request, HttpServletResponse res)throws Exception{ Connection connection=null; //Statement statement; PreparedStatement ps=null; ResultSet resultSet=null; ModelAndView mav = null; try{ String idnumero = (String) request.getParameter("idnumero"«»); AlmacenPK almacenPK = new AlmacenPK(); almacenPK.setIdnumero(idnumero); almacenPK.setSerie("SAL"«»); String query = "SELECT * FROM CabeceraAlmacen c, DetalleAlmacen d, Articulo a, Medida m WHERE " + " c.idnumero=d.idnumero AND c.serie=d.serie AND " + " d.idArticulo=a.idArticulo AND a.idMedida=m.idMedida AND " + " c.serie='SAL' AND c.idnumero=?"; connection = dataSource.getConnection(); //statement = connection.createStatement(); ps=connection.prepareStatement(query); ps.setString(1, almacenPK.getIdnumero()); //resultSet = statement.executeQuery(query); resultSet = ps.executeQuery(); JRResultSetDataSource resultSetDataSource = new JRResultSetDataSource(resultSet); Map<String,Object> parameterMap = new HashMap<String,Object>(); parameterMap.put("datasource", resultSetDataSource); mav = new ModelAndView("transaccionsalidaalmacenjasperreport",parameterMap); } catch(Exception e){ logger.info("n TransaccionSalidaAlmacenJasperReportController handleRequestInternal Exception: n"+ e.getMessage() ); } finally{ logger.info("n TransaccionSalidaAlmacenJasperReportController handleRequestInternal B4 CLOSE RS"«»); //resultSet.close(); logger.info("n TransaccionSalidaAlmacenJasperReportController handleRequestInternal A4 CLOSE RS"«»); } return mav; } [/code:1] i work with pool ComboPooledDataSource now if i follow the suggestion resultSet.close(); i recieve this wonderful message the suggestion to close the ResultSet is right? , remember that after of generate a good amount of JR i am out of connections in the pool, how i known that?, i did a thread dump pls help thanks for advanced
  14. pls see my photo attached the part of html option to export is White Page background now is selected (by default no) and the next option is disabled now (before enabled by default) Is Using Images To Align how i can do this by code??? , is there an option there??? thanks for advanced Post edited by: dr_pompeii, at: 2007/05/01 22:51 [file name=option.png size=52791]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/option.png[/file] Post edited by: dr_pompeii, at: 2007/05/01 22:51
  15. i just discover that when i create a html report with ireport it creates for example these 2 files the html itself reportehistorialsaldofisicoalamcenrangosfechas.htm l and a folder reportehistorialsaldofisicoalamcenrangosfechas.htm l_files what contains the folder??, one unique file a, photo px.gif so in the html code appear a lot of these bold part src="reportehistorialsaldofisicoalamcenrangosfechas.html_files/px" Code: <td><img alt="" src="reportehistorialsaldofisicoalamcenrangosfechas.html_files/px" style="width: 38px; height: 1px;"/></td> <td><img alt="" src="reportehistorialsaldofisicoalamcenrangosfechas.html_files/px" style="width: 50px; height: 1px;"/></td> <td><img alt="" src="reportehistorialsaldofisicoalamcenrangosfechas.html_files/px" style="width: 5px; height: 1px;"/></td> <td><img alt="" src="reportehistorialsaldofisicoalamcenrangosfechas.html_files/px" style="width: 5px; height: 1px;"/></td> <td><img alt="" src="reportehistorialsaldofisicoalamcenrangosfechas.html_files/px" style="width: 58px; height: 1px;"/></td> of course that with springmvc , i use only the jasper file and org.springframework.web.servlet.view.jasperreports .JasperReportsHtmlView so what is missing???? pls help
×
×
  • Create New...