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

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

Posts 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. 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

  5. @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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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)

  11. 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

  12. 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

  13. Hello,

     

    i am passing JRMapArrayDataSource to the fillmanager. In the datasource i´ve got two values as String (one is casted from Integer to String to pass it as a map).

     

    I can display both values in a simple Report without charting.

     

    Now i want to do a pie chart with these two values. The report compiles fine, but the fillmanager throws an JRException saying that he has problems evaluating the expression for the Value-Field of the PieChart.

     

     

    I declared the Field as java.lang.Object and cast it to Integer in the value-Expression field:

    Code:
    <valueExpression><!(java.lang.Integer) [CDATA[$F{Interger_as_String_Field}]]></valueExpression>

     

    but it still throws a JRException saying that he has problems evaluating the expression for the Value-Field of the PieChart.

    So how can i chart from a JRMapArrayDataSource with the values passed as Strings?

     

    I have the feeling that i am overlooking something essential. Can someone point me to the right direction?

     

    best regards,

     

    midrag

  14. Hi,

     

    my image comes from an POJO as byte[]. I declared the field as object and casted it to byte[].

    Code:
    JRImageLoader.loadImage((byte[])$F{logo})

    My image displays with a black background. Changing mode to transparent didn't help. Is there a workaround for this problem?

     

    regards,

     

    midrag

×
×
  • Create New...