Jump to content
JasperReports Library 7.0 is now available ×

medopal

Members
  • Posts

    11
  • Joined

  • Last visited

medopal's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. That depends on your parameter type. Lets say the type is java.sql.Timestamp in this case you will just need to set the pattern in the textfield, something like "MMM/yyyy" or anything u like. If its a string, then you will need to solve it by substring, like say, the string is "12-March-2008", then u can put $P{date}.substring($P{date}.indexOf("-"),$P{date}.indexOf("-"))
  2. That depends on your parameter type. Lets say the type is java.sql.Timestamp in this case you will just need to set the pattern in the textfield, something like "MMM/yyyy" or anything u like. If its a string, then you will need to solve it by substring, like say, the string is "12-March-2008", then u can put $P{date}.substring($P{date}.indexOf("-"),$P{date}.indexOf("-"))
  3. I didnt get the idea exactly, but i would suggest to use some kind of conditions, as ternary statements so you can add "\n\n" in the text field to make it stretch. NOTE: the nn is the enter character, but the escape character has escaped :D Its not the best solution, or maybe dont solve anything in your case. But here is what im thinking about. Make sure to check "Stretch with Overflow" in the textfield in the crosstab. Then something like this in the expression "($V{PROFILE}.length()>8)?("\n\n"+$V{PROFILE}+"\n\n"):$V{PROFILE}" This one simply makes the cell stretches by 4 lines if the word has more than 8 chars!! You can change it to something like "($V{PROFILE}==1)?("nn"+$V{PROFILE}+"nn"):$V{PROFILE}" Anyways, if you can give more info. maybe we can help more. HTH Post edited by: medopal, at: 2008/07/16 14:21
  4. I have been in this problem, and use a workaround solution. In my case its a dynamic report, i mean the columns can be chosen dynamically, so i made a feature (from the BUG!:P) which is to put the report in A3 paper instead of A4, when the columns exceed 8 or so!!
  5. double post sorry :blush: Post edited by: medopal, at: 2008/07/16 13:56
  6. It is possible to be done If im correctly understanding then each row will represent a record from the data source right? OK, check the attached report, i have made you a small quick report that solves your main issue. The main idea, is to change the color if the data changes. For doing this, i made a variable namely "var_date", its variable expression is the value of the field, in this case "valid_from" which is a timestamp. simply, put a rectangle behind the textfield, and put in this in the Print when expression: "(!$F{VALID_FROM}.equals($V{var_date}))?Boolean.TRUE:Boolean.FALSE" so if the variable equals the field, the rectangle will not appear, and vice versa. Apparently, Jasper first fills the fields from the datasource, then the variables, which leaves you the time between so you can check if they are equal or not. NOTE: if you show the variable "var_date" in a textfield, you will see that the variable is "null" in the first row, which means the variable is filled after the group ends. sorry for my english, good luck [file name=color_feature_sample.jrxml size=6373]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/color_feature_sample.jrxml%5B/file] size=321]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/color_feature_sample.JPG Post edited by: medopal, at: 2008/07/16 13:55
  7. thank u, its working now i thought Page_count should count all the pages, but it seems to work on records. ur suggestion works great, thanks
  8. i had like this error before, i'm using iReport to create the reports, and noticed that iReport and jasper was not compatible, after updating both to the last version, i never saw the problem hope this helps, good luck
  9. hi all, thank u or this nice forum. my question is, how to use page_number and page_count variables to make an expression like this: (Page 1 of 5), where the 1 is the current page and the 5 is total. i know it seems easy, but when the report contains, 5 or 6 sub-reports and a few crosstabs (that can split into pages), the page count gives always the wrong result, i think because its calculated after all the sub-reports are filled!!, but the problem is some of the sub-reports will be filled in the 5th page, and i want the total number of pages to appear on the footer of all the previous pages BTW, i tried to postpone the evaluation time of the page_count text field and still wrong, it keeps giving 1 (and sometimes 0) thx in advance
  10. Sometimes the report takes 10 minutes to be generated, when lot of SQL statements join. I try to optimize the process as much as possible, and each time i click to see the report i should wait for 5 or more minutes. plz if possible add a button to stop the "Generating Report" thread manually. Thanx
×
×
  • Create New...