Jump to content
Changes to the Jaspersoft community edition download ×

midrag

Members
  • Posts

    28
  • 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 midrag

  1. maybe my approach is wrong. i have three columns: Column 1 | Column 2 | Column 3 a a c a b a c a a b b b c b a d g z .. .. .. now i want a stacked bar Chart which displays me 3 bars, each cut in 3 Areas. Each Area represents the Number of occuring Values (for example how often does "a", "b" and "c" occur, ignoring "d","g","z"). How can i configure the Chart Dataset to obtain the needed values? I didnt find anything in the manuals :-( I would be very gratefull if someone can point me to the right direction.
  2. Did nobody successfully chart from variables? i have the following case: 9 Variables that hold an Integer value. Each variable is calculated during the filling Process, so that they have their final Value at the End of the Report. It should be possible to insert a Chart (for example a stacked bar Chart) in the Summary Band (because at that Time each Variable has his final Value), but i dont know how to tell the Category Dataset to use the different Variables. Any help is appreciated!!
  3. Hi, i am trying to do the following: i have three Variables which increment when a assigned Field matches a given expression, so that at the End of the Report i can display a Textfield which gives me a Sum about how often a Field had a proper Value. Now i am trying to Chart (stacked bar) from these three values. I tried the following: i added a category series for the category Dataset. my Series Expression is a constant String -> no Problem my Category Expression is a String[] with Names for the Values of my three Variables. -> Problem: cant cast to comparable my Value Expression is Integer[] with with my three Variables. -> Problem: cant cast to Number. How can i iterate through the different Values for the Category and the Value Expression? Can anyone point me to the right direction? thx in advance!, midrag
  4. a sample with nested Beans and Subreports can be found here: here.
  5. thx Theodor!, it did work. the image comes as byte[] and is shown correctly with the following code: Code:<imageExpression class="java.io.InputStream"><![CDATA[new java.io.ByteArrayInputStream ((byte[])$F{logo})]]></imageExpression> regards, midrag
  6. Updated File with .jar for running directly from iReport. Instruction: new Datasource Name: BeanSampleDatasource Type of connection: JavaBeans set datasource Factory class: reporting.BeanSample "Array of javaBeans" static method: initBeans best regards, midrag
  7. I created a sample concerning this problem. included is: the masterreport (jrxml) the subreport (jrxml + jasper) java code for generating a proper datasource PDF (exported Report)
  8. hi dreamer, I used it directly in my application, so i didnt check if it worked with iReport. I updated the uploaded sample to work with ireport (use include jar in classpath). I posted instruction with the updated sample. Let me know if you get it to run. regards, midrag Post edited by: midrag, at: 2006/11/15 15:34
  9. I submitted a sample as well (here). I included Java Code for creating a proper DataSource (JRBeanArrayDataSource).
  10. should i enter a new Feature Request for this Problem?
  11. hi javydreamercsw, a simple example is described here (simply charting with the RECORD_COUNT Variable obtained from a Subreport). The Bean (actually an array of Beans) i mentioned above contains another array of Beans. My approach was to create a subreport with the array of Beans from the Datasource of my Masterreport as new Datasource for my Subreport. Hope this helps you. regards, midrag
  12. double click on image -> image -> image expression enter: JRImageLoader.loadImage((byte[])$F{CompLogo}) importing JRImageLoader: edit -> report Import directives -> add -> net.sf.jasperreports.engine.util.JRImageLoader
  13. Hi, back to the topic: i use a bean as datasource (= for example a project) which has other beans as attributes (for example a statement from a usergroup). Now i have to filter the statements (for example 3 States: good, normal, bad) and chart for each project the amount of the states of each usergroup. As mentioned here i can actually Chart from Variables passed from a Subreport to my Masterreport. The Problem is the evaluation time -> The Values i get are not matching the Values i expected (actually they are just shifted by one "Report Row"). If i want them to be displayed correctly in the detail band i must set the evaluation time to "band" in the Property of the Textfield the Variable is displayed with. unfortunatly i can't set the evaluation time within the Value-Expression of the Chart-data. I know that this Bug is closed (see: http://jasperforge.org/sf/go/artf1533?nav=1 ). I have other use cases which are basicly relying on charting from returned values from subreports, so that it wouldn't be a solution to create a new (hardcoded) datasource. Can you give me some information on how i might fix this? thanks for your help in advance! best regards, midrag
  14. @mortoza: try replacing Code:<imageExpression class="java.awt.Image"><![CDATA[ $F{CompLogo}]]></imageExpression> with Code:[code]<imageExpression class="java.awt.Image"><![CDATA[JRImageLoader.loadImage((byte[])$F{CompLogo})]]></imageExpression> and dont forget to import the JRImageLoader Code:[code]<import value="net.sf.jasperreports.engine.util.JRImageLoader" /> you can modify the jrxml from iReport by clicking Edit -> XML Source
  15. hello rsilver@bfm.bm, thanks for your answer! i get the following error: Code:1. The method getEMail() is undefined for the type Object value = (java.lang.String)((((java.lang.Object)field_user.getValue()).getEMail())); <------> i declared the Field user as object Code:[code]<field name="changeUser" class="java.lang.Object"/> i have the same Problem access the "length()" function of an array in a Textfield. Any Ideas? thx in advance!, midrag
  16. thx for your answer. Its a pity that there will be no fix :-( best regards, midrag
  17. Hi Lucianc, thx for your reply. Setting evaluation to Band helped to show the variable correctly. But what if i want to chart with the variable? I have a Pie Chart in my Summary and want to Chart with the RECORD_COUNT Variable from my Subreport. Is there any way telling the Chart to evaluat the Variable at the right time? thx for your help!, midrag Post edited by: midrag, at: 2006/11/08 07:50
  18. Hi, i am trying to pass the REPORT_COUNt variable from my subreport to my masterreport. Code:<returnValue subreportVariable="REPORT_COUNT" toVariable="Subreport_RecordCount"/> My Subreport_RecordCount Variable is set to calculation=system Code:[code]<variable name="Subreport_RecordCount" class="java.lang.Integer" resetType="Report" calculation="System"> i use the variable in the detail field of the masterreport. my problem is, that the Subreport_RecordCount variable shows the Record count of the last Row, not of the (desired) acutal row (first row is shown as null). Any ideas? best regards, midrag
  19. Hi, i am using a JRBeanArrayDataSource Datasource to fill my report. There are nested Beans in the datasource. I can access the all getters except one! my declared Field: Code:<field name="user.eMail" class="java.lang.String"/> the Getter is named: Data.getUser.getEMail(). Accessing the getter in Java is no Problem. Accessing other getters from User withhin the Report is also no problem. Any hint of how to track down the Error? Is it a naming problem because of the "M" in eMail (unfortunatly i cant change the spelling? thx in advance!, midrag
  20. mortoza wrote: Hi Midrag I tried using iReport, its copiles well but when I run, get the following errors- ÂFilling report... ÂLocale: English (United States) ÂTime zone: default ErrorÂfillingÂprint... java.lang.ClassCastException:Â[bÂcannotÂbeÂcastÂtoÂjava.awt.Image ÂÂÂÂatÂTest_1162930011531_354843.evaluate(Test_1162930011531_354843:163) Can you help where is the problem? Mortoza Plz post your jrxml (specially the part where using the image)
  21. solved my problems. Code:Integer.valueOf($F{Number_as_String_Field}) now i am able to chart from BeanDataSources :-). Still i am confused why the engine cant handle: Code:[code]Integer.parseInt($F{Number_as_String_Field}) best regards, midrag Post edited by: midrag, at: 2006/11/06 08:58
  22. Hi, try declaring the field as object. Code:<field name="logo" class="java.lang.Object"/> and cast it to byte[] Code:[code]<imageExpression class="java.awt.Image"><![CDATA[JRImageLoader.loadImage((byte[])$F{logo})]]></imageExpression> dont forget to import JRImageLoader Code:[code]<import value="net.sf.jasperreports.engine.util.JRImageLoader" /> regards, midrag
  23. Hi Teodor, thanks for your answer! I wrote the images to a file and all have a transparent background. My images dont come directly from a DB. They come from a Java Bean getter. I used the same getter to save it to a file. Do you have another solution or hint for my problem? best regards, midrag Post edited by: midrag, at: 2006/11/02 13:45
×
×
  • Create New...