mikij
Members-
Posts
70 -
Joined
-
Last visited
Content Type
Forum
Downloads
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Security Advisories
Events
Profiles
Everything posted by mikij
-
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.
-
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
-
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
-
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
-
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
-
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
-
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
-
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.
-
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
-
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.
-
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 ?
-
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
-
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 ?
-
Actually, my report was empty because there was no data returned from SQL query. Sorry.
-
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
-
What do you ask actually ? You just have to select device, vendor, sum (price) and to group by device, vendor.
-
I defined 12 queries like this, for every range: SELECT '0-1000' as Order price, sum(Value) from Order... where price >= 0 and price <=1000 union all SELECT '1000-2000' as Order price, sum(Value) from Order... where price >= 2000 and price <=1000 union all ... but I don't like this solution, because in this case I need to have 12 such queries, and I'm afraid that it's too much. Anyone have maybe some better solution ?
-
Hi, I need to define a report that have predefined multiple ranges for rows. I have simple table Orders, and I need to define report like this, e.g. for a year: ------------------------------------------------------------------------------ Order price | Value | Percent | ----------------------------------------------------------------------------- 0-1000 | someValue$ | % (of all values) | ----------------------------------------------------------------------------- 1000-2000 | someValue$ | % (of all values) | ----------------------------------------------------------------------------- etc., to 9000-10000. | ----------------------------------------------------------------------------- I tried to do this with select CASE WHEN (price > 0 and price < 1000) then '0-1000' END as price ...group by price, but in such case I cannot see those ranges (rows) where I don't have value, and for these rows value and percent should be 0 in Value and Percent columns. Do you have ANY HINT how can I define report like this in JasperReports (iReport), because I don't have :-( ? -- Thx in advance!!
-
Hi, I have simple Date field in my database and it is returned in iReport query. But now I want to know which day is in that Date (e.g., 21/4/2008, is 21). I cannot do it with Calendar.getInstance()... because iReport doesn't allow two lines, and I cannot put this expression in just one line. How can I do this ? -- Thank you in advance, Miki
-
Is it possible that JasperReports doesn't have solution to such a common thing, like a summary for multiple groups in a subreport ?! I sum some variables from my subreport, and now I want to make final calculaction in summary of my main report, it is simple like that and my EVERY report have this.
-
Dear Lucian, thank you very much on such a fast answer! O.K. But, the problem is that my actually var3 need to divide these two variables var1 and var2 and show it in my main report ? I cannot just show var1 / var2 in textfield, because I need var3 to use it with some other (also returned from subreport - var4) variable to compute new value, i.e., when var3 is computed in main report (as var1 / var2) and var4 also returned from subreport I need to show following expression: var3/var4 * 1000 ? -- Thank you, Miki
-
Hi, I have in my main report three Double variables: var1, var2 and var3, and a subreport. var1 and var2 are define in "Subreport return values" of my subreport properties (with sum as Calculaction type). I've set those var1 and var2 as following: Calculation type = System, Reset Type = None, and Report for Evaluation time. I show these two variables in the summary band of my main report. They are shown OK, but when I define another variable, var3 (with Nothing as Calculaction type), whose expression is: var1 + var2, var3 is always null!! I tried ALL Evaluation Times for var3, from Now to Auto and it doesn't work!! What can I do, please help because I'm stuck with this stupid problem for days now :-(((((! I asked the same thing here but nobody answered: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=47773 -- Thank you VERY MUCH in advance, Miki
-
This explained here: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=29420, doesn't work in iReport 3.0!!
-
Can someone from JasperForge answer this, because I think that this is a serious BUG in iReport (or JasperReports) ?!
-
I cannot edit my posts, because there is no "Save" button in edit mode, so I must post a new message. The same question is asked here: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=11424, but an answer on sourceforge doesn't exist anymore :-(.