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

codyjasperForge

Members
  • Posts

    282
  • 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 codyjasperForge

  1. Why don't you use $V{NumExpensesRecords} for your group expression, then activate the 'Print when group changes' option under Subreport->Properties->Common(tab). That way each time a new record is retrieved, the group will change, causing the subreport to print. With that property active, $V{NumExpensesRecords} is always 0, also in the text field This may be because you are not incrementing your variable. Set the calculation type to 'Count' or something else just for testing. See if it changes the value of the variable. Let me know what you think.
  2. One option could be to handle null values in your report query, so you don't have to deal with them in your variables. If you are using a SQL query, then try using a DECODE, CASE, or NVL function. There are others also. This seems to me as the best solution because anytime you test for 'null' values, the result is 'null'. For example, $F{field}.equals(null) -> always yields null (if it is true) Same goes for $F{field} == null ? "value1" : "value2" Only if $F{field} has a value will these actually give desired values. (At least from all of my experience w/iReport I have found this to be true.) P.S. Google: "Oracle 10 SQL Reference" (.pdf) It has a lot of useful info. Hope it helps.
  3. The thing is, that the variable is empty after the first group has finished processing. The second group receives the values from the subreports of the first group etc.. What is the evaluation time of the textfield that contains $V{NumTripRecords}? To keep from getting null values, change it to either "group" (choose group), -OR- set it to "band" (this way it will get initialized before the rest of the report). Let me know if that helps.
  4. I'm not sure why you are losing your 'Element Grouping' structure. This could very well be a bug. (i don't know) If any element streches over to the next page, i noted that the other elements in the row stretch only till the end of the first page. is there anyway i can make them stretch to the next page too? Change the stretch type to 'Relative to Band Height'...? It might work. I would also test using the 'Print when Detail Overflows' option enabled/disabled. If all else fails, try moving your elements to other bands and see if you get the same behavior. That's about the best I can come up with. Hope it helps.
  5. However, I really do wish to reset it with this particular group. You should be able to reset on a group. What matters most is the group expression though. Have you tried altering the group expression so that it might not change so often? From the sounds of it, this is source of the re-initialization. I would suggest maybe changing the group expression to a value that will not change as often. You could even create a variable and use it's reset type inside the group expression. This is very intriguing. Hope it helps some.
  6. Jasper has built in variables that achieve the same thing that you are attempting to do. For more info, see this: http://www.jasperassistant.com/docs/guide/index.html I would duplicate these variables (REPORT_COUNT, PAGE_COUNT, etc) and return them from each of my subreports to the main report for further manipulation. One of these variables contains the Row countof the report...not sure which it is. Anyway, it's an idea, but I'm not sure if it is what you need. Hope it helps.
  7. How is it that you know that the 'List' is being initialized? By default a List is initialized to all null -OR- 0 values. (Depending on what type of list you are creating) 'ints' get initialized to 0 (zero) 'Strings' get initialized to null -OR- " " (same thing) what are you using for the variable expression?
  8. Have you tried changing 100 to 100.0? Also, change the 1 - Math.abs(...) to 1.0 - Math.abs. You can still lose precision at these points. Otherwise, I'm not too sure why this is happening...
  9. In my report i have some 20 or so elements arranged in four rows. i have grouped all the elements in each row together so that there are totally four element groups. When you say "i have grouped all the elements in each row together...", How exactly are you 'grouping' the elements? Are you creating 'Groups' for each element, or are you simply placing the elements adjacent to each other to form a 'row'? Could you send your source? (.jrxml) It would be more helpful in solving the issue...
  10. What is you summation and average calculation being implemented on? When lastPageFooter has some data, page numbers and date don't show in pageFooter. Define "some data". (specifically) What are the evaluation times of the page numbers, and date fields? This answers will help find a solution.
  11. How is your method of 'highlighting' taking place? What are you using to 'highlight' the row? Have you tried using 'Rectangle' element & 'Print when Expression' ? Just some thoughts...
  12. Is this new feature in the iReport2.0.0? No. It dates back pretty far (in versions)... Any documentation on the Internet for reference? See. Jasper Reports Homepage -> Wiki -> Samples -> Subreport Sample You are correct, it does only show built in variables. So all you need to do is type the EXACT name of the variable as defined in your subreport. ("returnedData") Calculation Type can be anything (For testing purposes, set it to "nothing") then change it later. Set the "evaluation time" of the textfield that contains this variable to either "group", or "band". (band for testing purposes) This should be it... Reply if not.
  13. Google this for a great editor: "TextPad" Another good one is "EditPad Lite" FYI...
  14. Found the solution. I thought that I had tried this once, but who knows... :pinch: Anyway, I didn't set the reset Type of the variable which is to be displayed... Simple solution for a simple problem.
  15. Hey all, I have search thru too many entries for this post, but no one was actually looking for what I need. I have a subreport inside of my main report. I am returning a value from the subreport to the main report. I want to then pass that value to another subreport, located further inside the main report. I am only getting 'null' values though. I know that data exists because I tested the query outside of iReport. Can this be done? (Sub1 returns to Main, Main then passess to Sub2) I have tried every possible combination of evaluation times, to no avail. If anyone has anything at all to say about the subject, feel free. Thanks in advance.
  16. If increasing the # of columns doesn't work, insert a subreport into your group Header/Footer. The subreport wizard has pre-defined layouts that can help you with the display format of your data... I am unsure if this is what you need, but it is worth a try... Hope it helps..
  17. http://jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/Samples (SUBREPORTS / DATASOURCES) http://www.jasperassistant.com/docs/guide/index.html (SUBREPORTS / DATASOURCES) Read up on these. Hope it helps.
  18. Now that you have clarified the relationships between your columns, I believe that it may be possible to use only 1 query to obtain your results. You need to create groups. Basically, to sum it up in short, groups enable you to base data on specific column results. For a real explanation you should check out the JasperReports Project Home -> Wiki -> samples page. Anyway, if you create a group called OFFICE NUMBER, you can tell your elements to behave differently based on the OFFICE NUMBER group expression. (presumably $F{officeNumber}) The combination of variables created that are based on your groups should allow you to get what you need. I would explain further but theres a lot to explain, so I suggest that you study up on the samples page, and search this forum for entries related to 'groups' OR 'group expressions'. If after a while you still don't quite understand, email me @ ga23422@hotmail.c0m. I will try to make things more clear with you then. http://www.jasperassistant.com/docs/guide/index.html Hope this helps...
  19. Is there some setting that I need to set on my subreport files? Yes, go to Edit -> Report Properties -> More(tab) -> 'When No Data' Change it to something other than 'Blank Page' Hope this helps
  20. I'm not sure if I understand how your values are related, but from what you have posted, I think that you can achieve this by using sub reports. Just return the values from each of your subreports, then do whatever calculations needed inside the main report. sub report1 return value: value1 sub report2 return value: value2 Create a variable to calculate the total of value1(returned) + value2(returned), and display it in the main report. As for the dates, add a 'Null' handler inside each query. (CASE, NVL, DECODE, etc) Is this close to what you need?
  21. So create a group. Just set the height of the Group Header & Group Footer to 0. You need the group so that you can reset the variable. The group expression should be the field that you want to evaluate the previous value on. So, when that value changes, (from previous to a new value) the group resets the variable... Does this make sense?
  22. You could create a variable that contains the value of $F{f1} -previous. Have the RESET TYPE set to Group -> Group that has group expression of $F{f1} Change the evaluation time of the textfield that contains the variable, and then use the print when expression on the textfield. Variable Name: previousValue Class: (Same as $F{f1}) Reset Type: Group -> (Group Expression is $F{f1}) Calc Type: None Initial expression: $F{f1} Variable expression: $F{f1} This or something similar to it should work... Hope it helps...
  23. You should store the directory path in a parameter (to be passed into the report) then in your servlet, set the value of the parameter (depending on the machine)... Does this help?
×
×
  • Create New...