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

dpinfo

Members
  • Posts

    31
  • 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 dpinfo

  1. Hi,
    I have a report with a group and would like the number of pages compared to the group.
    This is not a problem if I not have the title page, the numbers are correct
    first group
    1/2
    2/2
    the second group
    1/1
    the third group
    1/1
    and so on

    If I print title on new page then the result is the following
    first group
    2/3
    3/3
    the second group
    1/1
    the third group
    1/1
    and so on

    The error is only the first group.
    Can anyone help me?
    I use, for jre compatibilty, jasperreport 3.0.

    thanks


    Marco

     

  2. /tools/fckeditor/editor/images/smiley/msn/thumbs_up.gif Thank you very much

    /tools/fckeditor/editor/images/smiley/msn/teeth_smile.gif /tools/fckeditor/editor/images/smiley/msn/teeth_smile.gif

  3. ktrinad
    Wrote:

    By: Fco Antonio - jofranco
    sum of variables
    2003-07-11 14:28

    Hi:

    As I make the sum of two variables?






    By: Giulio Toffoli - gt78
    RE: sum of variables
    2003-07-11 15:22

    new Double( $V{var1}.doubleValue() + $V{var2}.doubleValue() )

    I have assumed that your vars was Double...

    Giulio
    Code:
    I have to make the sum of a parameter that is integer with a defalut variabile (Pages).I have defined the parameter as integer and according on the example upstair I did :new Integer($P{PAGIN}.intValue()+$V{PAGE_NUMBER}.intValue())he said me "Can not cast from int to Integer" the default value of $P{PAGIN} The default value is 100. I tried both with 100 and "100" and I have the same result.Please help me.Bye
  4. Hi all,

    I need to create a report with a group and for each group occurence a crosstable as detail.

    I tried to do it, but I get only 1 crosstable in all report, and not many crosstables, 1 crosstable for each group.

    Is it possible?

     

    thanks

    Dpinfo

  5. I have tried your way but I can't reach the result.

    So I have tried the road of the post

    http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=9&id=14215#14215

    but I haven't reach the point too.

    So, now I post a little access db with the report on it. I have tried also in oracle db , but it doesn't work.

    Please help me

    Dpinfo

    [file name=IMMAGINE_PROVA-3057fb63c650f91e83a032193f3ad324.gz size=142310]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/IMMAGINE_PROVA-3057fb63c650f91e83a032193f3ad324.gz[/file]

  6. Your query is :

     

    select sum(HN),sum(HS) from table where number="XX"

     

    you need to create a new query like this

     

    select TYPE_HOURS,TIME from

    (select 'OFFICIAL HOUR' AS TYPE_HOURS,SUM(HN) TIME

    FROM TABLE

    GROUP BY 'OFFICIAL HOUR'

    UNION

    SELECT 'REAL HOUR' AS TYPE_HOURS,SUM(HS) TIME

    FROM TABLE

    GROUP BY 'REAL HOUR')

     

    The query will show :

     

    Official Hours and the total time

    Real Hours and he the total time

     

    Then you can make a pie chart which will show for the type of hours the value of each one.

     

     

    I hope that this help.

     

    Bye

  7. First verify that $P{PARAMETER} is java.lang.string as your field.

    If $P{PARAMETER} is java.lang.string the annotation

    $P!{PARAMETER should be the same of $P{PARAMETER} .

     

    But sometimes $P{PARAM} don't work properly, so I prefer to use

     

    '$P!{PARAM}'

     

    You can also do in this way :

     

    define the default of $p{PARAMETER} as "'TEXFIELD'"

     

    and then in the query write

     

    where

    field = $P!{PARAMETER} in the query will appear:

     

    field = 'TEXTFIELD'

     

    Hope that this help.

     

    Bye

    dpinfo

  8. Thank you a lot for your help.

    At the end I decide to print every time $V{TOTAL_SUM_REG}, because to print whit a print when expression I need a Boolean, and the boolean like integer but not like double (can not cast from Double to Boolean).

    So when I print every time the ledger if the global amount is a debit the sign will be normal and if is a credit with a "-".

    Bye

    Dpinfo

  9. Sorry in the post the correct expression validate from IReport are:

     

    1) PRINT WHEN EXPRESSION OF $V{TOTAL_SUM_REG}:

    (($V{TOTAL_SUM_REG}.currencyValue()>0) ? $V{TOTAL_SUM_REG}; ($V{TOTAL_SUM_REG}*-1))

     

    2) PRINT WHEN EXPRESSION OF $V{SIGN_SUM_REG}:

    (($V{TOTAL_SUM_REG}.currencyValue()>0) ? "DEBIT";"CREDIT")

     

    Thank you a lot for help

     

    Bye

    Dpinfo

  10. Before post I've ridden all the post about this problem but I wasn't able to find a solution.

    I need to print a ledger of accounts.

    For each registration I have :

     

    $F{AMOUNT} java.mathBigDecimal

    $F{SIGN} java.langString

    sum(Amount*decode(Sign,'DEBIT',1,-1)) $F{SUM_REG} java.mathBigDecimal

     

    In the summary I have defined two variables:

    1) $V{TOTAL_SUM_REG} java.mathBigDecimal calculated as sum of $F{SUM_REG} for all the report;

    2) $V{SIGN_SUM_REG} java.langString with a costant value "DEBIT".

     

    In print when expression of $V{TOTAL_SUM_REG} in the summary of the report I write:

     

    (($V{TOTAL_SUM_REG}.currencyValue()>0;$V{TOTAL_SUM_REG};($V{TOTAL_SUM_REG}*-1))

     

    The expression is validate from the expression validator of Ireport 2.0.0

     

    In print when expression of $V{SIGN_SUM_REG} I write :

    (($V{TOTAL_SUM_REG}.currencyValue()>0;"DEBIT";"CREDIT")

    The expression is validate from the expression validator of Ireport 2.0.0

     

    When I save the report and compile it I have these errors:

    1) the method currencyValue() is undefined for the type BigDecimal (referred to print when expression of $V{TOTAL_SUM_REG});

    2) the operator * is undefined for the argument type(s) BigDecimal, int(referred to print when expression of $V{TOTAL_SUM_REG})

    3)Cannot cast from Strin to Boolean (referred to print when expression of $V{SIGN_SUM_REG})

     

    Please help me !!!

    Bye Dpinfo

  11. I had the same problem and I solve it looking in the sub report if there was some line that I don't like. I save and recompile the subreport and the parent report and the line disappear.

    Bye

    Dpinfo

  12. With the query designer our users have these problems:

    1)when I make a righ click on a field of the select in order to "Add to Group by" the program add instead of table.field the alias. So I have the oracle error Ora00904: invalid column name;

    2)when we use a JDBC:ODBC connection in the query designer I see all the tables but when I drag and drop the one I want, I report don't bring it in the right part of the editor. This cause that the users can't use the query wizard in order to create the sql of the report.

    3)when I choose a table and I add a field in the group by, if I eliminate the table from the wizard, the field in the group by still remain.

     

    Thank you for the collaboration

     

    Bye

  13. From my point of view, in the main query you need to make a merge of the queries. From my point of view it seems possible.

    If you don't like this solution you could create a subreport. With this solution you put the second query in the data/query of the second report, with a parameter . In the subreport properties in the master report in subreport(others) you need to define to which field of the master report the parameter is linked.

    Bye

    dpinfo

  14. You could solve the problem with 2 solutions:

    1) you could make a query in which you put all the information you need:

     

    select c1,c2,c4 from t1,t2

    where

    .......

     

    Then you have the field C4 at your disposal and you could put the field in the title.

     

    2) make a subreport.

     

    Let us know if this help.

     

    Bye

    Dpinfo

  15. Scott, you're fantastic !!!

     

    It works with the sintax :

     

    select field$P!{NUM}AS alias from table

     

    If you choose that the parameter NUM is for prompting you can change the default value of the parameter and so the field will change.

    For example if the default value of NUM is "2" and in the prompt of NUM you put "3" your query will be :

     

    select field3 as alias from table

     

    P.S. It's very important that the field has a fixed name because you can't change dinamically the value of the field in the band. So you have to put an alias in order to fix the name of the field. If you don't put an alias the report will not work.

     

    Thank you a lot for help.

     

    Bye

    Dpinfo

×
×
  • Create New...