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

vinays84

Members
  • Posts

    88
  • Joined

  • Last visited

vinays84'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. Post the DDL: the names and data type of the columns in your table...specifically the one which you are trying to access.
  2. Please post the DB table DDL and query you are using. Also specify the DB and verify that the DB actually contains the proper data (run the query outside of iReport) to ensure that it is iReport's JDBC access that is the problem.
  3. if $F{Field} is of type String, you should look at the java.lang.String API. http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html It as ample methods available to handle exactly what you are suggesting.
  4. Create another series and set the value expression equal to the sum of the other two value expressions.
  5. The reason this is occurring is because you are summing up a value that is a sum. As a result, you are summing the sum at each step. For example, if your first variable was v1 and the variable second v2, which summed of v1, you'd have: v1 v2 0 0 2 2 2 4 7 11 ------- 0 11 1 12 -------- 0 12 3 15 Where the "--"'s represent new groups. As you can see v2 finishes off at 15 rather than your desired result of 11. The direct solution is the one you suggested yourself, to create the second variable with the same variable expression as the first, but with a reset type of report. If this doesn't work due to your complex definition of the first variable, please post this complex expression, as we can't troubleshoot it blind.
  6. Yes, create a styles You can set conditions on the style to apply different fonts, colors whatever based on an expression. Then simply set the field's style to the one you created.
  7. What do you mean you calculate totalTotal? It's a field, not a variable. You're best bet is to define another variable (say totalAll) with the same expression as that below. Then calculate your percentages by using new Double( ($V{totalMonthlyFees}.doubleValue()*100 ) / $V{totalAll}.doubleValue())
  8. As you have it now, your calculation for the variable perMonthlyFees, which occurs in the column footer, will occur after all the rows have been processed. Thus, Code:new Double( ($V{totalMonthlyFees}.doubleValue()*100 ) / $F{totalTotal}.doubleValue()) will use the last value of totalTotal (the value in the last row of the column totalTotal). I doubt this is what you want. I really have no idea how totalTotal is calculated or should be calculated, as it is specific to your query.
  9. Sounds like you've got your variables and fields mixed up or incorrectly designed. Are you sure totalTotal isn't the variable? If you want a solution to your problem, you have to post code. Post the variable definition(s) and the report SQL.
  10. What does one value of the DB column look like? That means the value of that column for only one row.
  11. Use a variable, set it to be a counting variable. Also set the reset type to be group and set the group to be the one that you have previously defined.
  12. Does anyone know what the Link Parameters feature for hyperlinks does? I've tried playing around with it and see no results (I export to HTML). What I really want to do is add listeners to my hyperlink element (onmouseover, onmouseout). Has anyone had any success in accomplishing this? Thanks!
  13. if you want to use myField in $P!{Parameter}, Parameter should be a String with a value like "(2,4,7)". If you want to keep Parameter as a Collection, use $X(IN, myField, Parameter) Also, make sure you have the latest version of iReport and JasperReports, as the $X feature isn't available in some of the earlier ones.
×
×
  • Create New...