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. to convert a String to Double use: Double d = Double.valueOf(yourFormattedString) the report that uses your carry-over variable contains only two pages? ______________________________ if it works... KARMA point please! : )
  2. uhm... you can use a font with fixed size to show fixed width label... or a better way is to split the string (Name and City are in the same db column???) in two separate text field, one for each column, so you can use different alignment for them. you can split the "long" string in the query you make to retrieve your data, or in the text fied (using String.substring(...)) ______________________________ if it works... KARMA point please! : )
  3. Hi... When I wrote to edit the file, I referred to edit the file programmatically with java... so, adding a column, modify a colour, or modify a label position means edit a JRXML file with java... in the same way you create/modify a XML file with java... and then this file can be compiled and runned. manipulate a XML programmatically can be done separately from the report concept... but you MUST adhere strictly to the rules underlying the structure of the JRXML file. so, modify the query, means to edit a xml leaf that contains this query-string and its relative information (field etc. etc.) if you do, I think that there aren't limits to the ability to create dynamic report structure.
  4. use the intValue() when you want the int from an Integer... so: define $V{tot_hours} as Integer and set the expression as: new Integer((($V{sum_hours}.intValue() * 60) + $V{sum_minutes}.intValue() ) / 60) if you want use with integer values... if you prefer double or float value use Float or Double types... read this for basic usage of the primitive wrapper java class: http://en.wikipedia.org/wiki/Primitive_wrapper_class ______________________________ if it works... KARMA point please! : ) Post Edited by slow at 04/07/2010 07:16
  5. if $F{rts_status} is an Integer then use: $F{rts_status}.intValue()==5 ?"Closed":"Open" Have you ever tasted the Italian coffe? :) ______________________________ if it works... KARMA point please! : )
  6. you can use the JavaBeans Set Datasource... and read something about on this link to the IReport guide... or buy the book. http://books.google.it/books?id=GeLCEnT1VpMC&lpg=PA134&ots=abY3AKq5BY&pg=PA134#v=onepage&q=&f=false
  7. uhm... a fast but "ugly' solution might be to edit each "print when" expression of your field (all graphic elements in your report) entering a condition like this: new Boolean($V{PAGE_NUMBER}.intValue()<$P{MAX_PAGE_NUM}.intValue()) where $P{MAX_PAGE_NUM} is a parameter you pass to the report that limit the page number to make it works remenber to set for all element in your report "remove line when blank"=true it seems to works in a simple test... ______________________________ if it works... KARMA point please! : ) Post Edited by slow at 04/06/2010 13:45 Post Edited by slow at 04/06/2010 14:05
  8. uhm... I think a way is to create a report with a generic query that select all columns from a table... select column1 as col1, solumn2 as col2... , columnN as colN from aTable where ... when you add a new column, you must edit or create dinamically and programmatically the jrxml file of the report, compile it and then run it. in a more generic way, you can also try to create the entire jrxml file dinamically, also with sql query before to compile and run it. I think you should study the jrxml structure, then you are able to create dinamic report...
  9. try to read this and also the relative responses: http://www.brianburridge.com/2006/06/04/how-to-call-stored-procedures-from-jasper-reports/comment-page-1/ ______________________________ if it works... KARMA point please! : )
  10. :) i think you have little problems with java language :) try this... in the variable expression set: $F{rts_status}.equals( 5) ?"Closed":"Open" ______________________________ if it works... KARMA point please! : )
  11. why don't you use a variable for each column you want to sum? you can define: a variable $V{sum_hours} that is the sum of all hours that you have in your report... a variable $V{sum_minutes} that is the sum of all minutes that you have in your report... and then use this variables: $V{tot_hours} = (($V{sum_hours} * 60) + $V{sum_minutes} ) / 60) ________________________________ if it works... KARMA point please! : )
  12. try this: suppose your cells contains BigDecimal values with $F{VAL} name create a variable count_zero with this configuration: class:BigDecimal calculation type: sum reset type:Report increment type:none variable expression: new BigDecimal($F{VAL}.intValue()==0?1:0) then use the new variable... _______________________________ if it works... KARMA point please! : )
  13. if you now the number-per-page record, you can pass a parameter to report that in the query limit the number of row that the query lauch returns... i.e: suppose you want max 30 page... suppose there are 50 record per page max... you have a limit of 30*50=1500 rows... so, pass the parameter MAX_ROW_NUM as 1500... and the query appears like this... select * from tables.... where rownum<=$P{MAX_ROW_NUM} and generate the report... ___________________________ (if it works... KARMA point please!)
  14. Hi Christina, have you information about parametric styles? with "parametric" I mean styles that accept parameter for background colors, font dimension etc... i.e.: <conditionalStyle> <conditionExpression><![CDATA[new Boolean ($F{COL4}.matches("ddd"))]]></conditionExpression> <style name="AlternativeStyle" isDefault="false" backcolor="$P{aColor}" fontSize="$P{aValue}" /> </conditionalStyle> so, aColor, aValue can be read from a DB or passed to the report dinamically... thanks...
  15. in you have a finite set of option to create different styles try this: create a new stile: -set a name (ex: AlternativeStyle) -set the style option for the default look... -then add a new rule: new Boolean ($F{IT}.matches("1")) (or an integer expressione if you use integer...) -click on this rule and then set the new look... -create a new rule: new Boolean ($F{IT}.matches("2")) (or an integer expressione if you use integer...) - click on this rule and set another look... ... then apply this style ho a cell... in the jasper xml there is something like this: <style name="AlternativeStyle" isDefault="false" > <conditionalStyle> <conditionExpression><![CDATA[new Boolean ($F{IT}.matches("2"))]]></conditionExpression> <style name="AlternativeStyle" isDefault="false" backcolor="#33FF33" /> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[new Boolean ($F{IT}.matches("2"))]]></conditionExpression> <style name="AlternativeStyle" isDefault="false" backcolor="#FF0000" /> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[new Boolean ($F{IT}.matches("3"))]]></conditionExpression> <style name="AlternativeStyle" isDefault="false" backcolor="#0000CC" /> </conditionalStyle> </style> and the textfiled you applied the style to: <textField .....> <reportElement style="AlternativeStyle" ..../> ______________________________ ( if it works... KARMA points please! :) )
  16. try to use ( ore read something about... ) the columns.
  17. read this... http://www.brianburridge.com/2006/06/04/how-to-call-stored-procedures-from-jasper-reports/comment-page-1/ i think it's a simple solution to your issue... (i need karma to see my karma... :) )
  18. i think you need an application or a web application to share ther same report template to different users...
  19. try ifnull(expr1, expr2) in my test, using 'nvl' with Oracle and the null default parameter value, it works!
  20. if you expect a NULL value in the query, try to remove the " " default value, set as default value "null" (without quotes!!) as String parameter, and set in the query the function: .... = nvl($P{parameter},something) i tryed it and it works fine. if you create the report programmatically (wit java...) you can avoid to create the "where" parts of query where the NULL patameter appears. Post Edited by slow at 03/17/2010 08:47
  21. i think it's better to work with the computing power of DB (when it's possible) rather than use report logic... so you can use the DB rownum of each record to catch when you have the last record... try this (oracle version) select aTable.*, case when rownum=(select max(rownum) from myTable [where conditions] ) then 1 else 0 end as is_last_record from myTable aTable [where conditions] order by something in this way you have a column that has 1 only on the last record. NOTE that the [where conditions] MUST be the same in the query to make it running properly. using this column you can catch the 1 (or another if you prefer) value in the report and then, using the report logic, you can print or not something. so, your "print when" condition is new Boolean($F{IS_LAST_RECORD}.intValue()==1) (if it works... karma points please :) ) Post Edited by slow at 03/17/2010 14:36
  22. are you sure that when you set a parameter 'blank' the value that arrives to query is NULL? try to know with more details what happen in this case. I think that arrives an empty string "" or the string "null", so the query return no result... "" or "null" is different from NULL...
  23. when you write " If the record has a NULL value the record is not returned." do you refer to the database record? can you be more clear when you write about parameter (values 1/ 0 ?) and the record data (values something/null ?) ? it seems to be only a malformed query issue...
  24. I prefer to use two different jrxml file, optimized one for PDF exporting and one for XLS... so I can control more graphic details. in this case, you can create a report that has a single header by extending the page layout dimension, but i think it isn't the suggestion you expect
  25. are you sure that the two clauses ------> and Operating_System.OSType = ISNULL($P{Os_List},Operating_System.OSType) and Land.ClientConfigurationName = ISNULL($P{Location}, Land.ClientConfigurationName) <--------- are in the "AND" configuration and not in OR? if the clauses work fine separately and there's no result with both them seems to be clauses that exlude each other... do you create the report programmatically or by the only IReport program?
×
×
  • Create New...