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

patobarrientos

Members
  • Posts

    28
  • Joined

  • Last visited

patobarrientos'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. well, sorry but it didn't work for me... I don't know why when using a XML as datasource I can't see the subreports. I'm gonna give it another try as soon as I have some free time. Bless.
  2. Hi. Did you check the "Stretch With Overflow" option on parameter properties? Cheers!
  3. can you post your code to check what's wrong? Cheers!
  4. I tried this. SELECT Field1, Field2, (SELECT COUNT(*) FROM TABLE ) AS TotalRows FROM TABLE it isn't an elegant solution but it works bringing the TotalRows as field, anyways.. this way execute the 2nd select query as many times as rows you have in your table. good luck!
  5. can you post your code or a sample to see how are you getting the TotalRows field? It did work how I told you but I'm getting data from a XML file.
  6. well... you can't join the variables because one of them is evaluated at the end of the report and the other one is evaluated on each row. So I can recommend use another field as TotalRows, you can try lenght method. Then you have "QueryResult.length() - actualRow" where QueryResult is the resultset with all your data and actual row is the same you had before. I hope it works for you. Cheers! Post Edited by patobarrientos at 05/23/2011 16:23
  7. Hi, Vertic. Well ... what you need to do to get that sum is create a new variable for each type of transaction(PURCHASE, TOPUP, STORNO....) and it should be an integer with calculation method as SUM. for example create a new variable called "purchaseSum" thats gonna calculate total amount for transaction type "PURCHASE", right? and then into the Variable Expression property you should put this: $F{transactionType}.equals("PURCHASE") ? $F{transactionAmount}:0 where transactionType and transactionAmount are your fields to fill the report detauil. This means that everytime that transactionType matches with "PURCHASE" the transactionAmount is gonna be added to variable purchaseSum, so you have to put all the variables that you create in the column footer to show them. The ones that don't appear on your report will show value 0. I hope it works ... good luck! ps: if transactionAmount is a String you should cast it as Integer.parseInt($F{transactionAmount})
  8. please post the code or any sample to reproduce this issue ... cheers!
  9. can you post a sample or your report code to try to understand better ? cheers!
  10. Hi Kaz! well ... for change the default font you have to go to this menu: Tools -> Options -> JasperReports Properties and then look for this property: net.sf.jasperreports.default.font.name then put Arial into the value field. I hope you find it. Cheers! PS: I don't know if the menu is exactly like that, because I have the spanish version. good luck!
  11. Hi Dave. I think that if a .jar file is looking for a XML file it should be setted within the .jar (and it could be the same directory where the jar is) Anyways, when you create a report, first you have to set the directory where you're gonna save the file and this is the same default directory for your report (for example if you wanna put images on it you should save the images into that directory an then you can call them like "/image.jpg" to show them) Also check that there's a folder to put your .jar files into this path (I think this folder is for that): C:\Program Files\Jaspersoft\iReport-3.7.4\ireport\libs Good Luck!
  12. To export into Excel format I use this code. Check if it works for you. Cheers! Code:JasperPrint print = JasperFillManager.fillReport(fileName, parameters, dataSource); JRExporter exporter = new JRXlsExporter(); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, outFileName); exporter.setParameter(JRExporterParameter.JASPER_PRINT, print); exporter.exportReport(); File archivo = new File(outFileName); FileInputStream fis = new FileInputStream(outFileName); ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte[] buf = new byte[1024]; try { for (int readNum; (readNum = fis.read(buf)) != -1;) { bos.write(buf, 0, readNum); } } catch (IOException ex) { ex.printStackTrace(); } bytes = bos.toByteArray();
  13. It looks like the query is ok ... check the quotes in the where section WHERE SO."CUSTOMERPO" IS NOT NULL AND SO."STATUSID" IN (20,25) AND SO."CUSTOMERPO" LIKE 'KA%' I saw that all the other sections in your query have the quotes... that error 104 usually means that you're using some keywords, for example word WEEK. sometimes you can't do this Select week(date) from table Instead you have to write EXTRACT(WEEK FROM DATE) Good luck!
  14. Hi there! did you try options "Reprint header" and "Keep Together" on the group header properties? I don't know if I understand exactly what you want ... can you post the code or jrxml?
  15. Hi Notta. Pay attention on the keywords when you create the query ... can you post the query to see if there's any keyword in there. Cheers!
×
×
  • Create New...