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

siick

Members
  • Posts

    7
  • 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 siick

  1. On jasperreport server 6.2.0 i have a "net.sf.jasperreports.engine.JRException: Error loading object from file" when i add a html component like this one but i have no error in jaspersoft studio <componentElement> <reportElement x="20" y="40" width="580" height="140" uuid="b346885c-8588-427f-b9f3-e262c34ce1ed"/> <hc:html xmlns:hc="http://jasperreports.sourceforge.net/htmlcomponent" xsi:schemaLocation="http://jasperreports.sourceforge.net/htmlcomponent http://jasperreports.sourceforge.net/xsd/htmlcomponent.xsd" scaleType="RetainShape" horizontalAlign="Left" verticalAlign="Middle"> <hc:htmlContentExpression><![CDATA[$F{INFORMATION_PROJET}]]></hc:htmlContentExpression> </hc:html> </componentElement>
  2. That's the way to do it, but what do you mean by "copied parameters from the master report" ? Normally if you have a parameter in you sub report, when you run it separately from the main report, you are asked to input the value of that parameter by yourself. So when you place you sbreport on the main report, just click once on your subreport and in the properties, click on "Edit Parameters" and then add your parameter from the list and give the data to that paremeter by choosing the right field or variable. http://pix.toile-libre.org/upload/original/1507881740.png
  3. OK, i can't check directly on production server... But i've tried a test. I have made a small simple report with some of DateTime functions which are inside jasperreports-functions libs... And it's pretty weird... NOW(), DAY(), SECOND(), DATEVALUE() are OK and functionnal, but DAYS(), YEARS(), MONTHS() give me the error mentionned here... And these methods are using another method from joda-time lib, so it seems joda-time is the missing libray on theserver
  4. I think it's related to these libs. I'll try to check if they are already in the build path or not and i come back to give an answer.
  5. Hello everybody! I hace few reports which are using the function DAYS(DATE1, DATE2) to calculate number of days between two dates. My expression is (DAYS(new SimpleDateFormat("dd/MM/yyyy").parse($F{DATE_DEBUT_ABSENCE}),new SimpleDateFormat("dd/MM/yyyy").parse($V{date_fin_sejour}))+1). It's working well and without error on Jaspersoft studio 6.4.0 but when i try to generate a report with jasperreports 6.2.0 i have an error. net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: (DAYS(new SimpleDateFormat("dd/MM/yyyy").parse($F{DATE_DEBUT_ABSENCE}),new SimpleDateFormat("dd/MM/yyyy").parse($V{date_fin_sejour}))+1) How an expression can work on Jaspersoft Studio and not on jasperreports? Thanks in advance for your future answer.
  6. Ok, i have found another way with a sub report in each cell with 3 parameters in my datase t: max_age, min_age and sex. I had that filter expression AND(INTEGER_VALUE($F{AGE_1})>=$P{age_min},INTEGER_VALUE($F{AGE_1})<=$P{age_max},$F{SEXE_1}.equals($P{sexe}))[/code]and i change the parameter for each cell to have the right data. Anyway, i'm not sure it's a good way to have my result... So if someone can tell me more, i will be glad
  7. Hello everybody! I'm very new to Jaspersoft Studio and i'm facing a problem to sum values in my table. I will try to be as clear as possible. I have an XML dataset construct like this (i've just put datas that are relevant for my question, it's not the complete XML) <RAPPORT> <HEADER>[.....] </HEADER> <DONNEES> <RESIDENT> <ID>1</ID> <AGE>67</AGE> <SEXE>M</SEXE> </RESIDENT> <RESIDENT> <ID>1</ID> <AGE>77</AGE> <SEXE>F</SEXE> </RESIDENT> <RESIDENT> <ID>1</ID> <AGE>68</AGE> <SEXE>M</SEXE> </RESIDENT> <RESIDENT> <ID>1</ID> <AGE>78</AGE> <SEXE>F</SEXE> </RESIDENT>[........] </DONNEES></RAPPORT>[/code]So i make a table of distribution by age group like this Malefemale60 - 74 years 75 - 84 years 85 - 96 years 96 years and more I have no problem to construct the table and (i think) no problem for the expression to create my variables. I use these variables to fill the table : IF(INTEGER_VALUE($F{AGE_1} )>=85 && INTEGER_VALUE($F{AGE_1} )<=95 && $F{SEXE_1}.equals("M"),1,0)[/code]If my age is between these values and depending the sex, i want 1 or 0. That's my expression and it's working well if i don't want to sum the result. I've 6 people (<RESIDENT>) in my XML and when i preview my table (which is in the detail area to see every change for every people when i preview). I put ascreenshot to let you see that is working this way. http://pix.toile-libre.org/upload/original/1503664987.png We see here that the first page of the report is OK. We found a man (the "M" in orange) which is 72 years old (in red) so it put a 1 on the good cell. And all the 5 others persons in the 5 other pages of the report are OK. I always have a 1 in the good cell. But now i want to sum all these 1 and 0 to have just one table with the sum. And that is where i have problem. I try to modify the way it's calculate so in my variable properties, i have change "nothing" to "sum" like you can see in the screen below. http://pix.toile-libre.org/upload/original/1503665425.png But now i don't understand but i don't have the sum i need. Worst, it shows me the same even if i have only ONE person in my XML) http://pix.toile-libre.org/upload/original/1503665764.png So we have one man of 65 years old. The value is in the good cell but why i have a 2???? It's the only person in my XML so how can i have 2 ??? Normally i should have 1 and if i have 1 other man of 60-74 years old it should be 2, and 3 if have another one , etc...... Maybe i've missed a thing to calculate this.... Hope someone can help me :) Thanks in advance for your future answers.
×
×
  • Create New...