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

slow

Members
  • Posts

    268
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Everything posted by slow

  1. a little java mistake: if you compare two object (BigDecimal !) then you must use predefine methods or compare them using base int value... so: $V{v21K}!= new BigDecimal (0) ? ($V{11D}.divide($V{v21K})) : new BigDecimal(0) must be written as: $V{v21K}.compareTo(new BigDecimal(0)!=0? ($V{11D}.divide($V{v21K})) : new BigDecimal(0) or: $V{v21K}.intValue()!=0? ($V{11D}.divide($V{v21K})) : new BigDecimal(0) ____________________________________ if it works... give me KARMA points please! : ) ____________________________________ listening MUSE - Plug In Baby: Live At Wembley Stadium 2007
  2. if your report is in a final version, why don't you double the detail band size putting two ticket with a blank space between them? in this way you can personalize the client version with a label "this is client ticket" etc... ____________________________________ if it works... give me KARMA points please! : ) ____________________________________ (listening: Underworld - Juanita/Kiteless [Everything, Everything] ) Post Edited by slow at 05/11/2010 07:18
  3. I think you have little problems with java... try this: field expression in a texfield that show filed "name": $F{group}.equals("NULL")?" "+$F{name}:$F{name} This work if "group" field and "name" field are String field... and if group has a String value "NULL" not java null ____________________________________ if it works... give me KARMA points please! : ) ____________________________________ (listening: Underworld - Juanita/Kiteless [Everything, Everything] )
  4. if you use parameter, then in your statement you can use the special syntax $P!{name} to pass sql code... so your query can be: select * from stored_procedure $P!{parameter} with the help of tests i made, i think you can't use variable in your sql statament... but only parameter with $P or $P! syntax... but... here it's a simple solution: you can create a main report that calculates a variable, passing its value to a subreport in a parameter that you use in your subreport statement example: suppose you have the table MONTHS num|name 1 |January 2 |Febraury 3 |March 4 |April ...|.... and you want to report a month name by passing a condition with the variable $V{condition} = "WHERE num=1" where the month number is result of calculus then... create a report Master... that has a query "select 1 from dual" (dummy query for oracle) set a parameter Integer named MONTH set a variable String named MONTH_CONDITION = " WHERE num="+$P{MONTH}.toString() create a subreport Subreport, with the query "select * from month $P!{CONDITION}" and set a parameter CONDITION, string type. link the two reports and in the subreport parameters definition set CONDITION <== MONTH_CONDITION in this way, your variable, in the master report could be anything... but the subreport don't view its value, masked by it's own parameter... it works perfectly in my test :) send me a feedback if you try it... ____________________________________ if it works... give me KARMA points please! : ) ____________________________________ Post Edited by slow at 05/10/2010 13:19 Post Edited by slow at 05/10/2010 14:49
  5. I'm smiling, I think sometimes you have some sort of allergy to study new topics :) In any case I try to explain "grossly" how to use groups. as the name itself suggest, a group can be used to grouping data in set that make this data similar in some properties... suppose you have the number from 0 to 10 in a table that you select from in your statement num | text | odd | 0 | zero | F | 1 | one | T | 2 | two | F | 3 | three | T | 4 | four | F | 5 | five | T | 6 | six | F | 7 | seven | T | 8 | eight | F | 9 | nine | T | 10 | ten | F | ------------------------------------------------------------------------------------ first: create a grouping that group numbers using the first letter of text value group expression: $F{TEXT}.substring(0,1) group header: you can put a textfiled with text: $F{TEXT}.substring(0,1) ------------------------------------------------------------------------------------ now, other example, you can divide odd numbers: group expression: $F{ODD} group header: you can put a textfiled with text: $F{ODD}.equals("T")?"ODD":"EVEN" ------------------------------------------------------------------------------------ now, other example, you can divide numbers =< 5 group expression: new Boolean( $F{NUM}.intValue()<=5) group header: you can put a textfiled with text: F{NUM}.intValue()<=5?"MINOR":"MAJOR" ===>latin fashion :) ------------------------------------------------------------------------------------ now, other example, you can divide numbers that name contains "o" from other: group expression: new Boolean($F{TEXT}.contains("o")) group header: you can put a textfiled with text: $F{TEXT}.contains("o")?"OK":"NO" etc etc etc... so, in the group expression you must set a rule that for each field generates a java Object (a String it's better...) that can be used to create a group of elements having the same generated value... if you use a primary key of the field you obtain the same number of groups of your datased values!!!! in group header you can put what you want... and something that shows the group value used to group the values that it contains... are you ready to study it?? written listening Underworld - Cowgirl [Everything, Everything] ____________________________________ if it works... give me KARMA points please! : ) ____________________________________ Post Edited by slow at 05/07/2010 10:27
  6. uhm... you can show a texfiled only in the last column using this print when expression new Boolean($V{COLUMN_NUMBER}.intValue()==3) use the max number of columns instead of 3... and placing this textfield in the first column footer. in this way it appears in all pages but only on the 3° column. if you 'd show it only in the last page, you can use the last page footer band or the summary band; in this bands there aren't columns so, you can place your field under the last columns... ____________________________________ if it works... give me KARMA points please! : ) ____________________________________ Post Edited by slow at 05/07/2010 08:37
  7. I think you are too generic in your question... can you give more details? where your report runs... in a web application, in a standalone application etc... how it's runned etc etc... you'd capture the user information in an appropriate way to the context in which you report works... and then pass it to the report as parameter, and using this parameter to filter data or select what you would display or not...
  8. a doubt... if you create your report programmatically with java... why don't you duplicate the file programmatically? or... if you create the report with iReport... why don't you save the file manually eith two different name? I'm confused by your request...
  9. when you wrote "to get a Report 's results twice (more than once)" you mean obtain two or more report generation? can you be more clear?
  10. try to use: a textfiled (type INTEGER) with predefined variable $V{REPORT_COUNT} for counting rows in report, or a textfiled (type INTEGER) with predefined variable $V{PAGE_COUNT} for counting rows per page... ____________________________________ if it works... give me KARMA points please! : ) ____________________________________
  11. you can use this "trick" to display a specific detail (if you have two or more...) band instead of another when some conditions happen using the detail band print when expression. you can do it without two bands, but it's more difficult design the report graphically... you can create an arbitrary number of detail bands... to obtain this you must create groups that use a group expression different from each record... so you can use anexpression that uses a primary key of the record, or, a counter, an hash variable etc... ____________________________________ if it works... give me KARMA points please! : ) ____________________________________ Post Edited by slow at 05/04/2010 10:11
  12. so... why don't you use a report with three columns, filled in horizontal mode... and, for each detail value, print a subreport with two columns that print your values if they came from other statement, or , if it's a fixed lenght structure, using a table filled with data (four values for each detail field??) selected in the main statement... ? ____________________________________ if it works... give me KARMA points please! : ) ____________________________________
  13. it seems to be not a iReport problem but a Oracle installation related issue... have you tried to access to your Oracle account with a client or programmatically with java/other language?
  14. hi... try to read this article about report formattation http://fecplanner.com/jasperreports/docs/tips.tricks.html#friendly you can insert a pagebreak between report and subreport, so it (the subreport) is printed in the second page or second sheet... ____________________________________ if it works... give me KARMA points please! : ) ____________________________________
  15. yes, it's possible but I think you're in mistake in defining your variable... can you be more clear? in your variable expression you must set: "SELECT cat_id FROM category WHERE category_name = 'bob' " but this don't mean that $V{cat_id} is a result value of the query... but it's only equals to the string "SELECT cat_id FROM... " you must create a query , select your cat_id and you have its value in a Field... and the assign it to a variable if it can solve something. ____________________________________ if it works... give me KARMA points please! : ) ____________________________________ Post Edited by slow at 05/03/2010 07:32
  16. in this case I think you should not use the columns but two different subreport with identical structure and label dimension... ____________________________________ if it works... give me KARMA points please! : )
  17. slow

    Bold text

    you have two option... --the first is creating two different labels (one of them is bold) in the same pixel position ad show one of them depending on the value you pass as parameter (using the print when expression) --the second is to learn to use conditional styles... ____________________________________ if it works... give me KARMA points please! : )
  18. have you tried to add the Oracle JDBC jar to the classpath? (Tools-->Option-->Classpath-->Add JAR) ____________________________________ if it works... give me KARMA points please! : )
  19. try to learn iReport (JasperReport) basics ... or to read some old post in the forum in this case you'd use a variable, calculation type SUM, type BigInteger (or similar), in "variable expression" set the filed you want to sum... $F{something} ____________________________________ if it works... give me KARMA points please! : )
  20. try this: Tools-->Option-->Classpath-->Add JAR ____________________________________ if it works... give me KARMA points please! : )
  21. Forgive me but I can't answer all your emails, and it has no sense that you continue to send me so much... if you study the library Barbecue, you realize, as shown here http://barbecue.sourceforge.net/apidocs/index.html you can set to your liking the font to use with void setFont(java.awt.Font font) Sets the font to use when drawing the barcode data string underneath the barcode. of course you will study it yourself :) ehm... no, i'm not Indian. but I like some mantra. (Ohm... Namah Narayana...) :) ____________________________________ if it works... give me KARMA points please! : ) Post Edited by slow at 04/29/2010 12:20
  22. try this: in etc/ireport.conf find the row similar to this: default_options="--branding ireport -J-Xms256m -J-Xmx512m... and append: -J-Duser.language=en give us a feedback if it works... ____________________________________ if it works... give me KARMA points please! : )
  23. thanks... it's a good example... have you find also a solution to create dinamic index (printed TOC , not bookmark)... uhm... with dinamic page number, link etc etc ?
  24. you can use COOLVETICA... :) http://www.brighthub.com/multimedia/publishing/articles/6081.aspx http://new.myfonts.com/fonts/larabie/coolvetica/ can you leave here a reply if you find an answer to your question? thanks...
  25. You can insert in the GroupFooter a print when expression like: new Boolean($V{PAGE_NUMBER}.intValue()%2==1) and insert into this band a page break... so, if the band is printed, then there is a page break... see attached files... (i use italians name for testing :) ) ____________________________________ if it works... give me KARMA points please! : )
×
×
  • Create New...