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

pawel_r

Members
  • Posts

    47
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by pawel_r

  1. Can you explain it a little more? I don't see in what way static text is an obstacle. Do you mean you have a lot of section and headers inside report? Then you should use groups or possibly subreports. Please claryfy your question
  2. I recommend tutorial - great source of information. The thing you are looking for is probably here: http://jasperforge.org/website/jasperreportswebsite/trunk/tutorial.html?group_id=252 <textFieldExpression> $F{FirstName} + " " + $F{LastName} + " was hired on " + (new SimpleDateFormat("MM/dd/yyyy")).format($F{HireDate}) + "." </textFieldExpression> HTH, Paweł
  3. Thanks a lot. If I understood you correctly then I need another query for my report (or possibly a new subreport with chart), because I cannot order by two different fields (group and systems are not connected anyhow). As far as I know groups do not provide mechanism for sorting so I simply need another query (datasource). Thanks again
  4. I have got another question related to the previous one. I would like to put two charts in single report and each of them would present the same data, but put in different categories (one for groups, one for system). I added additional report group for system and put systemType_Count as value for chart, but it gives me wrong results (seems like it sums up each next category - I include picture). Second question - I get ResultSet which contains some duplicated data (in sense that single id can be multiple times and I want to treat it as single instance in chart). I tried making reportGroup on id, but the result (group count) gives incorrect result. Am I missing sth?
  5. well, i tried a few examples from demo folder (however, maybe it wasn't enough) and i thought that i know enoguh to do reports myself. When it comes to documentation - I haven't found anything really usefull for me about iReports -except the Ultimate guide, which unfortunatelly is paid. I was simply looking for some kind tutorial/manual. However, as you said, I am still comming up with problems, which I cannot solve (I usually wait a day before I post my questions -sometimes I fell they are basic, but I cannot catch the idea so I look for help). Anyway, in simply words my question was: Can I put parameter (e.g.P{DATE}) into chart series (as on screenshot) or do I have to use external tools to get such result? BTW I really tried to put my question in simple words and from your post I see that I failed. However, you called it "high level talking", which sounded like compliement -thx :) I can include JRXML file, if needed.
  6. Actually, you are right, I haven't thought about any existing solution (probably because jasperreports is my first reporting system). How I imagine that? Well, the most tedious part is writing those conditions, so in perfect world I would like to have some field, when I can simply write all categories (especially when I think about numbers -the most intuitive would be simply giving intervals like 0,1-5,5-20,20-100). On the other hand - this solution is quite good. The only issue is that when I was trying to put some more java code(anonymous classes, some functions, etc.) in variable value I get exception that I shouldn't use fancy Groovy features since they are not managed by ireport. Well, I don't know Groovy so I don't think I was using its structure (well, I heard that Groovy is java extension so I am using it only as far as java goes) and it makes me a little confused. But that's maybe for other topic ...
  7. teodord Wrote: How do you plan to gather these 10 values? Have done anything about it, or do you expect the engine to keep lists of values for you? Well, yes, actually I thought tha engine generates all nedded data before displaying first page (title section) and keeps it till it generates the very whole report (including summary). Thanks for making me realize that I am wrong :) And yes, your answer helped me a lot (I saw examples in /demo section before, however I didn't think that scriplets could be a help in my problem)
  8. Hi I want to solve following issue in jasperreports. I would like to parametrize my chart. It seemed to me as quite easy, simply changing fields or variables used in chart series (category or value) into parameter and pass it during report generation. However, when I've done as I said I got different result. The field and variable was treated as simple chart, not as values they represent (I got simply chart with value equal to 1 and label equal to "$V{VariableName}"). In another report, when I tried this report didn't generated properly (or more precisely I got empty one). Anyone had simmilar problem? Is it solvable in jaspererports or I should try use some external XML tool to prepare proper JRXML file dynamically?
  9. If you say so... I was quite sure that problem lies not in SQL query. Thank you for your patience Code:SELECT chre.TYPE AS chre_TYPE, (Select count(chre2.id) from change_requests_h chre2 where chre2.id=chre.id) as "Liczba zmian", (Select count(chre2.id) from change_requests_h chre2 where (Select valid_from from change_requests_h Where executed_action = 'ZAMKNIECIE_ZMIANY' And change_requests_h.id = chre2.id) <= chre2.on_prod_introduction_date and chre2.id=chre.id group by chre2.id) as "Liczba zmian terminowych", chre.BUSINESS_ID AS chre_BUSINESS_ID, chre.TITLE AS chre_TITLE, SYSTEM_USERS.DISPLAY_NAME AS SYSTEM_USERS_DISPLAY_NAME, PROCESS_STAGES.NAME AS PROCESS_STAGES_NAME, chre.ID AS chre_ID, chre.ON_PROD_INTRODUCTION_DATE, USER_GROUPS.NAME AS USER_GROUPS_NAME, MY_DATA.NAME, MY_DATA_SOJOURNS.entry_timestamp, MY_DATA_SOJOURNS.EXIT_TIMESTAMP, MY_DATA_SOJOURNS.DUE_DATEFROM MY_DATA MY_DATA INNER JOIN MY_DATA_SOJOURNS MY_DATA_SOJOURNS ON MY_DATA.ID = MY_DATA_SOJOURNS.PRST_ID INNER JOIN CHANGE_REQUESTS chre ON MY_DATA_SOJOURNS.ID = chre.PRIN_ID INNER JOIN USER_GROUPS USER_GROUPS ON chre.USGR_ID = USER_GROUPS.ID INNER JOIN SYSTEM_USERS SYSTEM_USERS ON chre.SYUS_ID_PM=SYSTEM_USERS.ID INNER JOIN DATA_STAGES DATA_STAGES ON MY_DATA.PRSG_ID = DATA_STAGES.ID WHERE chre.type IN ('DEVELOP_STANDARD','DEVELOP_SHORT_PATH')ANDchre.ON_PROD_INTRODUCTION_DATE between $P{START_DATE} and $P{END_DATE} AND chre.ON_PROD_INTRODUCTION_DATE between $P{START_DATE} and $P{END_DATE}order by chre.type
  10. Hi I put my report data into ReportGroup and I wanted to have short summary about number of records of each category(in group) at the end of the report. However, at the end of report (Summary) I got only single result, not all data. After a few tries I noticed that the only place where this variable works fine is ReportGroupFooter - in all other places I got empty fields or only single result insted of all. Is there any solution? The only thing that comes to my mind is subreport, but I haven't tried it yet and don't catch how it exactly is supposed to work (grouping reports? getting data from more than one dataset?) Regards
  11. For now the only solution I found in order to get a chart was to prepare new variable (String) and based on multiple condition put data into correct categories. Then I prepared Report Group based on this variable and used reportGroup_count variable as value. Works fine, but it is really time consuming when you have more categories for data and it is not elastic at all - small change into categories makes you rewrite whole expression (like changing categories from 0-1, 1-5, and so on into 0,1-4, and so on). Someone know better solution?
  12. Hi I have following problem: My query returns some integer data (like number of users) and I would like to show this data (in form of list and chart), but in groups, not just as they are (e.g. 0 users=Count, 1-5 users=Count, 5-20 users=Count and so on). How can I extract such data from my report in jasperreport? I would also like to generate dynamically labels for those data (in form as I described). As for now I was just able manually create 4 variables and assigned for each condition, which when is true, return 1, otherwise null. By counting those variables I get what I wanted in report (however it's time consuming -definitely not for larger groups which I am aiming at). Unfortunatelly I didn't find a way to put those data (single values, not one variable) into chart series. Code: <variable name="userNumber0" class="java.lang.Integer" calculation="Count"> <variableExpression><![CDATA[( $V{user_nr}==0 ? 1 : null )]]></variableExpression></variable><variable name="userNumberMax3" class="java.lang.Integer" calculation="Count"> <variableExpression><![CDATA[( $V{user_nr}>0&&$V{user_nr}<=3 ? 1 : null )]]></variableExpression></variable><variable name="userNumberMax5" class="java.lang.Integer" calculation="Count"> <variableExpression><![CDATA[( $V{user_nr}>3&&$V{user_nr}<=5 ? 1 : null )]]></variableExpression></variable><variable name="userNumberPowyzej5" class="java.lang.Integer" calculation="Count"> <variableExpression><![CDATA[( $V{user_nr}>5 ? 1 : null )]]></variableExpression>
  13. The most important part here is (AFAIK) <parameter name="START_DATE" class="java.util.Date"> <defaultValueExpression><![CDATA[new java.util.Date()]]></defaultValueExpression> </parameter> <parameter name="END_DATE" class="java.util.Date"> <defaultValueExpression><![CDATA[new java.util.Date()]]></defaultValueExpression> </parameter> <parameter name="REPORT_TYPE" class="java.lang.String"> <defaultValueExpression><![CDATA["M"]]></defaultValueExpression> </parameter> In attachment there is the whole jrxml file (without SQL query)
  14. Hi I came across following problem - if I try to produce report, which contains soe parameters (all with default value set) JasperFillManager.fillReport doesn't fill report properly (it produces empty report). It wouldn't be a problem for me if there was some kind of exception thrown - which didn't happen. The servlet was working with no visible problem but all reports were generated empty. It happens if I one of parameters is not supplied in parameter Map(also when Map is empty or null is provided insted of Map parameter) I am using jasperreports engine in version 3.5.3 Post Edited by pawel_r at 08/26/2009 07:19
  15. Problem solved. I spent a few days thinking about mistake. As it truns out the parameters should be passed as P{START_DATE}, P{END_DATE}, no quotation or exclamation mark (as I read in some tutorial)
  16. Hi How is the docx support in jasperreports working? I am asking since I am very interested in possibility to export to Office formats in jasperreports and all I found till now was additional, quite expensive tools. On the main page of jasperreports 3.5.3 it is said that jasperreports now support export to DOCX files, however when I tried DocxJRExporter (As Far As I Remember) in my servlet it produces just a very small file, doesn't seem to be proper DOCX file (I am using Microsoft converter for Office 2007 files) - only 2KB, even thgough it should include some pie chart. The same servlet generates proper HTML and pdf files so I suppose it is some problem with Exporter class. Any ideas? EDIT: Problem solved. It turned out I changed report a little between checking html and docx functionality, so it did not compile (even though there were no errors thrown). THe docx export functionality works fine. Post Edited by pawel_r at 08/26/2009 07:12
  17. Hi I was trying to pass Date as parameter to report. Unfortunatelly, the default casting seems not to work good enough (or there is some error with my Oracle driver). I am using iReports(3.5) (and jasperreports 3.5.3) with following query as DataSource: SELECT (...) AND chre.ON_PROD_INTRODUCTION_DATE between '$P!{START_DATE}' and '$P!{END_DATE}' Both parameters are of java Date type. Parameters: <parameter name="START_DATE" class="java.util.Date"><defaultValueExpression><![CDATA[new java.util.Date()]]></defaultValueExpression> </parameter> <parameter name="END_DATE" class="java.util.Date"><defaultValueExpression><![CDATA[new java.util.Date()]]></defaultValueExpression> Driver: ojdbc14.jar Database system: Oracle 9i I got following error: Error filling print... Error executing SQL statement for : myreport net.sf.jasperreports.engine.JRException: Error executing SQL statement for : terminowosc at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:145) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:685) (...) Caused by: java.sql.SQLException: ORA-01841: (pełny) rok musi być pomiędzy -4713 i +9999 i nie może być 0 (eng. (full) year must be between -4713 i +9999 and cannot be 0) Error seems to be obvious, but, as you see above, the default Date is today, so definitely not year 0 and in given interval. Am I missing some cast? As a I language for report I choose Groovy. Is there any better way of passing Date parameter to report? I tried to use strings and then to parse them using Oracle build in function, however it gave me even more problems. Firstly, I couldn't set the format of string date properly (DD-MM-YYYY) and then jasperreport was throwing an error that it doesn't have proper executer for PL/SQL query (it seems the standard jasperreports library doesn;t have it, although it is somewhere in iReports libraries - I haven't found proper jar yet). Post Edited by pawel_r at 08/24/2009 21:36
  18. Hi I am trying to put variable as value of pie chart series. Unfortunelly, I don't know how to do that, even though example of pie chart suggests its possible. My problem is following: I extract from database some records, which includes column "Type". I would like to make a pie chart with this types as a key and without adding extra Count() columns to my query. Is that possible? E.G. name type me TYPE1 me2 TYPE2 me TYPE1 then I would get pie chart with 1/3 labeled by TYPE2 and rest labeled with TYPE1 I am using jasperreports 3.5.3 (the newest as far). I am looking for solution, ideas or any clues, which can help me to find solution Pawel Post Edited by pawel_r at 08/24/2009 21:35
×
×
  • Create New...