Jump to content
We've recently updated our Privacy Statement, available here ×

csilva2001

Members
  • Posts

    15
  • Joined

  • Last visited

csilva2001's Achievements

Apprentice

Apprentice (3/14)

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

Recent Badges

0

Reputation

  1. my friend, you're right! ... There was an error. To avoid duplication, I deletava the file before writing a new one. The code to delete file had an error: exclude other files too. Now it's all right. I appreciate your attention, patience and sorry for my bad english ... lol ... Thanks anyway. A big hug
  2. rs .. okay , my friend, ok... Sorry... pdfFileName is the full name of the pdf file ( c:folderrelatorio.pdf ) . I need to save to disk . I do not get the error message. But the file is not written . See this point : Iterator it = Repositorio.iterator ( ); / / a list of class content. Each class has different data for the report . while ( it.hasNext ()) { ctd content = ( content ) it.next ( ) ; List list = Ctd.getLista( ); / / data for the report PdfFileName String = ctd.getNomeArquivo; / / name of the pdf file of this report JRBeanCollectionDataSource BCD = new JRBeanCollectionDataSource(lista) ; JasperPrint impression JasperFillManager.fillReport = ( " relatorio.jasper " , null , BCD ) ; JasperExportManager.exportReportToPdfFile ( impression , pdfFileName ); / / Here I put a System.out.println ( " aquivo : " + pdfFileName ) // and see the file name in eclipse console , the filename . As if all was well . But the file is not written to disk. } When it is recorded..., I can open and close it . Any idea ? A hug .
  3. Sorry. I do not understand your question. Opening and closing what? My code is this: Repositorio.Iterator iterator it = () / / a list of class content. Each class has different data for a report. while (it.hasNext ()) { ctd content = (content) it.next (); List lista = ctd.getLista(); // data for a report String pdfFileName = ctd.getNomeArquivo; // name of the pdf file of this report JRBeanCollectionDataSource BCD = new JRBeanCollectionDataSource (lista); JasperPrint impression JasperFillManager.fillReport = ("relatorio.jasper", null, BCD); JasperExportManager.exportReportToPdfFile (impression, pdfFileName) / / sometimes saves. Sometimes not } Do you have any help for me? Thanks in advance. a hug
  4. Gentlemen, good evening. I have a strange problem. I have a code that generates multiple PDF files within the loop. Iterator it = repositorio.Iterator(); while(it.hasNext()) { conteudo ctd = (conteudo) it.next(); List lista = ctd.getLista(); String pdfFileName = ctd.getNomeArquivo; JasperPrint impressao = JasperFillManager.fillReport("relatorio.jasper", null, BCD); JasperExportManager.exportReportToPdfFile(impressao, pdfFileName); } Use this code to generate a forty files. But he always writes a smaller number. He 'jumps' some files, as if he had time to save the file. This same code outside of the loop is executed one by one, works great. There is no error msg. All lines are executed. But always fails to save some files. Has anyone experienced this? Can anyone help me? Using JasperReports 3.7 Thank you in advance. A hug
  5. Hi dnvsrikanth. Thanks for response. But dnvsrikanth, my problem is more hard. I need manager three options. See: if $F{A} == "this is A" I want report write "carlos alberto" if $F{A} == "this is B" I want report write "maria jose" If $F{A} != "this is A" and $F{A} != "this is B" then write $F{A}´ value OK? Please, again try help me. An embrace.
  6. Hi. This is CarloSilva, from Brasil and I want a help. In my report if $F{A} == "this is A" I want report write "carlos alberto" and if $F{A} == "this is B" I want report write "maria jose". If $F{A} != "this is A" and $F{A} != "this is B" then write $F{A}´ value. Is it possible to code that in Expression Variable? Can you help me? An embrace
  7. Hi nitin403. This time, no works. I create a new variable as you tell me. Bust the result is different of correct sun. Some new idea? Note: derby is the JAVA DB. An embrace
  8. HI, nitin403. Is it possible get a SUM of: MOUSE ------ 87,00 PENCIL------ 55,00 BOOK-------- 20,00 TOTAL: 162,00 ? I need create other group? Pleas, how I do this TOTAL? Thanks
  9. PERFECT!!!!!!! Thanks again. I use derby DB. An embrace.
  10. Hi nitin403. My problem is in problem.jpg. Please, try help me. TBL1 ID--------1----2---3------4-----5 PRODUCT---2----1---1------2-----3 PRICE-----25---32--55----30----20 TBL2 ID-----------------------1------- 2---------3 PRODUCT_NAME------MOUSE----PENCIL-----BOOK I WANT: MOUSE ------ 87,00 PENCIL------ 55,00 BOOK-------- 20,00 I hoop you understand. An embrace, Thanks
  11. Hi. Thanks for response. I´m printing in detail band. How I define a band? Do you want I put .xml report here? Thanks again, CArloSilva
  12. <variable name="SUM_TBLRECEITA_VALOR_1" class="java.lang.Double" resetType="Report" calculation="Sum"> <variableExpression><![CDATA[$F{TBLRECEITA_VALOR}]]></variableExpression> </variable> Hi! to all. In my report a variable Calculation Type:-Sum. In report I get 2 lines: line 1 = 750 line 2 = 1170 but in my database I have: goup1 = 750 group2 = 420 I try put resetType="Group" but I recei a error message: unknow reset group for variable.. Can you help me, please? An embrace, CarloSilva
  13. THANKSSSSSSSSSSSS A LOT. It worked!!!!!!11 An embrace, CarloSilva
  14. Hi. This is CarloSilva, from Brazil. I am trying to set up a connection to the Derby database. I have added derby.jar to the iReport classpath but in iReport JDBC Driver combobox, does not show org.apache.derby.jdbc.EmbeddedDriver. I see mysql driver... hsqldb driver... But I dont see Derby driver. Please, can anybody help me?
×
×
  • Create New...