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

mikij

Members
  • Posts

    70
  • Joined

  • Last visited

mikij's Achievements

Enthusiast

Enthusiast (6/14)

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

Recent Badges

0

Reputation

  1. My qustion is actually very simple, in Struts 2 there is JasperReportsResult.java class which is used to produce JasperReport in following way JasperFillManager.fillReport(JasperRerpot, Map, JRDataSource), where JRDataSource is in Struts 2 implemented with ValueStackDataSource. I just need to pass my data (List) to ValueStackDataSource constructor and that's it! But, what I don't know, how to set-up this datasource in iReport for my report ? -- Thx, M.
  2. Hi, I need to pass from my S2-baed web application List of some Java objects to Jasper report, so that this report use that list for data source. I want to call this list to fill from my web application Java class and then to call JR.fillReport(...). Like shown here: http://struts.apache.org/2.0.14/docs/jasperreports-tutorial.html. Which data source should I use in iReport and how to set-up such data source ? -- Thx, Miki
  3. Dear Lucian, O.K. But I'm not sure what you propose now ? I have put ARIAL.TTF and ARIALBD.TTF for pdfFont in my reports, as in your example. Should I change this or should I remove FontFactory registering or something else, because when I remove FontFactory.register(...) I also get the same exception ("Could not load the following font: ARIALBD.TTF, etc.) ? Update: I put Arial and Arial Bold in my report and it works now in my web app when I register fonts with FontFactory.register. But in this way, when my report is shown in JasperViewer and I save it to pdf I just get an empty page. So, I cannot have both ? I'm just curious, but certainly I need more the first variant. -- Thank you in advance, Miki Post Edited by Miki Ziki at 12/12/08 12:59
  4. Actuall I have a problem. This is the worst thing, it worked first but now it doesn't work :-(! I set font like this in my Web app: FontFactory.register("c:\windows\fonts\ARIAL.TTF"); FontFactory.register("c:\windows\fonts\ARIALBD.TTF"); before calling fillReport(...), ffter this I try to look which fonts I've succesfully registered: Code: System.out.println("These fonts were registered at the FontFactory:rn"«»); for (Iterator i = FontFactory.getRegisteredFonts().iterator(); i.hasNext(); ) { System.out.println((String) i.next()); System.out.println("rn"«»); } [/code] And It shows correctly the fonts I've installed, and it worked fine, but now I get an exception and I don't know why because I didn't change a thing, and these fonts exist on this location. Both fonts are registered because I don't get any exception, like IOException "file not found" or similar. What am I doing wrong ?! Please help! Code: Post Edited by Miki Ziki at 12/11/08 22:39
  5. Dear Lucian, O.K. I set everything, I registered fonts with FontFactory.register in my application and now works fine! -- Miki Post Edited by Miki Ziki at 12/11/08 17:07
  6. Dear Lucian, O.K. Thank you very much. I have found this example, and I opened it in iReport and passed one cyrillic string for its paramter, e.g. "ТЕСТ", and reports is shown good, but when I save it to pdf I just get an empty page!! I noticed this if I switch pdfEncoding of any field to Identity-H I just get an empty pdf document!! I noticed this earlier, for example I create new empty report in iReport, create just one (even non-cyrillic) text field on it with Identity-H for encoding, show this report and when I save it to pdf it is empty document! What is the problem ?! Thank you! -- Miki Post Edited by Miki Ziki at 12/11/08 12:11
  7. If I save it to xls then it is good, but I need to have pdf :(. When I set cp1251 my text in generated pdf is overlapped and if I set "In dentity-H" I don't see any text in my pdf. This problem is described here: http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=34919, but I don't see how can I solve this ? Maybe the problem is with used iText 1.3.1 and its support for cyrillic ? I'm using Helvetica for PDF and JasperReports 3.0 (with iReport 3.0). It seems that Helvetica doesn't have cyrillic, but I cannot choose e.g. from PDF Encoding list ? Please help, I NEED this and I'm totaly stuck :-(!! Post Edited by Miki Ziki at 12/10/08 22:01
  8. Actually, iReport show me good report in JasperViewer, but when I save it to PDF I get the same result as from my application. All cyrillic text (characters) is shirnk, so one character is drawn on another, etc. How can I solve this problem ? -- Thx.
  9. Yes, I have put "CP1251 (Cyrillic)" for PDF encoding, and it is good when I run my report from iReport, but when I run it from my Web application (Struts2-based), I get all such text, i.e. characters one on another, like there is no spacing between charaters ? -- Thx, Miki
  10. Hi, I have a report from which I need to allow access to one of my classes, i.e. I want to use my class method by applying some algorithm on database table to generate values for report in real type. Is this possible to be done ? -- Thx, Miki.
  11. Can someone acknowledge is this possible or not ? I want to print multiple reports based on some predefined parameters, but I don't know if is this possible. I want just to print reports, without showing them ?
  12. Hi, I'm using JasperFillManager.fillReport(...) in my Web application, and pdf as a servlet output stream. I'm wondering is it possible to create multiple reports in this way, so that e.g. 2-3 reports are shown one after another in the same pdf document ? Actually I want to show the same report multiple times, but with different parameters. -- Thx, Miki
  13. Hi, I have problem with setting Locale to report. In my iReport locale is set to "Serbian (Serbia and Montenegro)", "sr" and my report is running good. But, when I run my report (in PDF) programatically from Struts 2 application, I try to set Locale like this: Locale srLocale = new Locale("sr", "CS"); parameters.put(JRParameter.REPORT_LOCALE, srLocale); jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn); But it doesn't recognize this locale and I don't see those letters in generated PDF. Default encoding is UTF-8, both in iReport and Web app. How can I fix this ?
  14. Actually, my report was empty because there was no data returned from SQL query. Sorry.
  15. Hi, I'm trying to implement JasperReports in my Web application (Struts 2-based). But, when report is shown I get just an empty page for a report! I don't get any errors or warnings in console. This is the code which I use for calling the report: I first fill parameters: Map params = new HashMap(); params.put("param1", new Long(1L)); ... and then call the report: Class.forName(new String("com.mysql.jdbc.Driver")); Connection conn= DriverManager.getConnection(new String("jdbc:mysql://localhost/myApplication"), new String("root"), new String("")); jasperPrint = JasperFillManager.fillReport(jasperReport, params, conn); My Connection object is not null! What is the problem here ? -- Thx, Miki
×
×
  • Create New...