Jump to content

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

  1. When I set "Reset Type" to "Report" for all three variables, my third variable (var 3 = var1 + var2) is drawn just as little box ?!
  2. Can I PLEASE get any help on this ?! I tried everything but when I try to sum two variables returned from subreport in the third, that variable is ALWAYS null!!
  3. Hi, I have two variables (Double) in my main main report which are containters for other two variables in my subreport. When those two variables in my main report are filled from subreport, with "Sum" as calculation type, I have the third variable which simple sum these two variables in my main report, but the problem is that this third variable is always null. I tried with "System" as calculaction type for this third variable, and "Report" as Calculation time, but it doesn't work, it seems like that iReprot doesn't know when the first two variables are filled from subreport. What can I do ? -- Thank you in advance, Miki
  4. For this Order price scopes, I think that I can define then as "CASE WHEN" in SQL query ? But then I want to show all defined scopes, and where there is no values, I want to show 0. How can I define such a query ? Thx!!
  5. Yes, I need to group columns and to get sum for value column.
  6. CAN I GET ANY HELP ON THIS FORUM?!?!?! I've asked few questions but there is no answer :-(. I have one more question, if I have following SQL query: select column1, sum(column2) as col2, avg(column3) as col3, I need one more column col4 = col2 * col3, should I define this in my select query or like variable in iReport ? THANK YOU!!!!
  7. Well, I have subreport with groups, in that subreport I have e.g. var1 which sum something for every group and I want to show sum of all var1 of all groups in my main report, how can I do this ? I can define variable in my main report that will be connected to this var1 in subreport, but this var1is reset by group in suberport ? -- Thx, Miki
  8. O.K. Thank you. I'm just not sure for one more thing, how should I define this Order price scope (0-1000, 1000-1400, 1400-2000, etc. to 10000) ? -- Thx in advance, Miki
  9. Hi, I'm just not sure if this forum works at all, because I cannot get almost any answers to my questions :-(. I hope that this will be better, because I'm stuck with some things I asked on this forum, even though I read the book and tutorials :-(. I have simple table Orders, and I need to define report like this, e.g. for month october and complete year: Year: 1.1.2008 - 30.10.2008 Month: 1.10.-30.10.2008 Order price | Value | Percent | | Value | Percent | --------------------------------------------------------------------- --------------------------------------------------- 0-1000 | someValue$ | % (of all values) | | someValue$ | % (of all values) | --------------------------------------------------------------------- --------------------------------------------------- 1000-2000 | someValue$ | % (of all values) | | someValue$ | % (of all values) | --------------------------------------------------------------------- --------------------------------------------------- etc., to 9000-10000. The same Price scope is for year (left table) and month (right table). Do you have ANY HINT how can I define report like this, because I don't have :-( ? -- Thx in advance!!
  10. What is more wierd, when I define TextField, and define the same thing in its expression, $V{var1}.subtract($V{var2}) it show good! What is the problem here ? And I'm also wondering what is the best practice in iReport for these situations, e.g. subtracting two variables, or similar, should I define new variable and show it on report or define such expression in textfield ? -- Thank you, Miki
  11. Or maybe, it is better to create that summary in main report with sql query and grouping without returning values from subreport ?
  12. Hi, I have two BigDecimal variables defined in iReport, var1 and var2. var1 is calculated by multiplying two fields e.g. $F{field1}.mutliply($F{field2}) and second variable var2 is is generated with expression like this: ($F{field1}.equals(1) ? $F{field1} : new BigDecimal("0.0")). Both of these two variables are displayed good in my report, but when I define third BigDecimal variable, which just subtract these two, like this (var3): $V{var1}.subtract($V{var2}), and when I try to show this I get null?! Example output: 10 (var1), 2 (var2), null (var3) Btw, this is done in a group. Do anyone has any idea why is this happening? -- Thx, Miki
  13. Hi, I have main report which group by month some Orders, and in its Details section I have SubReport which then have another group. I want to show summary for every main group (month) in my main report and to show at the end of the report overall summary for complete report (all months). What do you recommend ? -- Thx, Miki
  14. No response to such a simple question :-(. Can PLEASE someone explain how to use array of Long's as Parameter in iReport ? I know that I can say select... in (var) in SQL, but how to pass such Parameter from program and how to define this variable in iReport ? And how can I use this array in field expression condition to check if such array contain some values ? I read the book The Definitive Guide to iReport and some tutorials, but there is nothing about this! -- Thx in advance, Miki
  15. Hi, I wrote above, my requirement is simple, I want this: select column1, column2, sum(column3), sum(column3 when column2 > 1000) from table where ... group by column1, column2 I want to sum column3, and the same column3 in cases when (row) e.g., column2 > 1000. -- Thx.
  16. I did something with this query below, it return good data, but I'm not sure if such query is good enough (I removed group-aggregate related things): SELECT order.id, orderelement .id, orderelement.price, P.moreThan1000Price, SUM's(...) FROM order INNER JOIN orderelement ON order.id = orderelement.order_id LEFT JOIN ( select orderelement.id, orderelement.price as moreThan1000Price FROM order INNER JOIN orderelement ON order.id = orderelement.order_id WHERE SomeCondition and orderelement.price > 1000 ) AS P ON P.id = orderelement.id WHERE TheSameConditionAsAbove GROUP, etc. ? Thank you in advance!
  17. I'm not sure for this join, because when I apply it I get three times more rows than I should. I want to make simple query, like this: select column1, column2, sum(column3), sum(column3 when column2 > 1000) from table where ... group by column1, column2 ? Thank you in advance.
  18. Thank you on answer. I'm not sure if issue is with ordering, but with showing multiple rows with all the same values. I don't know what to do, to group fields in SQL like this: select column1, column2, sum(column3)from someTablegroup by column1, column2order by column1, column2[/code]and in that case I cannot do some arithmetic during select, or I should group these fields in iReport, or both ? What is the difference ? Thanks!
  19. I have one more question (if anyone in this forum wants to help). I need to show group values in one row in my report, but in two columns I need to show different values, e.g. in column1 Orders grouped by some field whose value > 1000 and in column2 Orders whose value < 1000 ?
  20. Can someone from JasperReports explain this little bit better ? There is no info about passing array as parameter in your Guide. I want to pass array of Strings, to select some data from database with in (as above), but I also want to define a condition on field or variable based on the input array parameter elements. How can I do this ? e.g., I want to say, if array contain 1, 2 I want to write 0 in my textfield. -- Thx, Miki
  21. Actually I'm not sure should I group data in input SQL query when using iReport groups at all ? I ask this because I want to group data by some columns and to show some summary values, so I don't want to repeat the same rows (as described in post above) ? -- Thank you in advance, Miki
  22. Yes, but when I do this, it generates show all rows in a detail band, not grouped ? E.g., if I have column1 = 1 and column2 = 1, and I group by both fields it show: ---------------------------------------------------------- column1 | column2 | someSum ----------------------------------------------------------- 1 1 .... 1 1 .... ----------------------------------------------------------- I want that I have just one row here, because I group by both fields and they have the same value in both rows ? Thx.
  23. Do anyone have any idea how I can solve this in a great tool such is iReport?
  24. Hi, I want to define a group on multiple fields, but how can I define such a group expression ? I can define group for one field, but how to define for multiple fields, like this: select column1, column2, sum(column3) from someTable group by column1, column2 ? I need to define it in group, because I need to have variable that will sum some values on a group basis. -- Thx, Miki
  25. Hi, I have generated my report, which includes one table Order in relation (---[*]-----[1]--->) with another Invoice. But I want to choose when my Invocie values should be shown in the report, based on some condition, i.e., if all Orders in a group have this Inovice, then show it, but if only 2 of 3 Orders that points to the Invocie are shown in a group then show 0 for Invoice fields ? Thx in advance. -- Miki
×
×
  • Create New...