Arithmatic operations on field values jasper reports

Hi,
I want to calculate some percentages in the report based on some Field values present in the report. To achieve this I need to make some divisions and multiplications, is it possible to divide or multiply two variables while filling the report using jasper.
Please help me...
Thnks
Veera.

jaumev wrote:
I have exactly th e same problem.
Have someone solved it?
Thanks in advancePlease, don't resurrect old threads. Start a new thread if you have a specific question. I'm locking this one.
Kaj

Similar Messages

  • Arithmatic operations on fields in tables

    Hello Members,
    My query might seem pretty basic, but seems uphill to me, as i have no idea how to perform arithmatic operations between fields in tables.
    I have two tables temp1 and temp2. each of these tables have 2 fields : account no. and balance
    the data would resemble the following, in each of the tables:
    6.28899273 0
    6.28899274 0
    6.28899275 0
    6.28899289 625.12
    6.28899292 2666.24
    Can you please give me an idea how to go about doing the following:
    1. Compare the tables temp1 and temp2 for their respective account numbers and balances
    2. Copy the results in a new table temp3, which will have 2 columns :
    account no ( common to temp1 and temp2 )
    deviation: subtracted balance of temp1 and temp2
    regards,
    novice82

    user8635888 wrote:
    Will be great if someone can give me a headstart on the following:
    I have two tables temp1 and temp2 ( tables belonging to 2 different databases ) with two feilds
    account no., ( Common in both tables )
    balance ( float data type ).
    1. I want to compare the balance feilds in temp1 and temp2.
    print out the no. of accounts and percentage of match and mismatch.
    2. output the a/c nos. whose balances dont match into a seperate table..Hello, this might be one approach for you:
    First, identify those accounts that are different, and INSERT them into the table
    INSERT /*+ APPEND */ INTO target_table
    SELECT t1.account_no, t1.balance, t2.balance
      FROM table1 t1
      JOIN table2@db_link t2 ON (t1.account_no = t2.account_no)
    WHERE NVL(t1.balance, -99999999999) != NVL(t2.balance, -99999999999);This assumes that -99999999999 can never be a valid balance.
    Then, you can cycle through this table and print out the mismatches:
    set serveroutput on size 100000 (or set serveroutput on size unlimited)
    BEGIN
      FOR cur_rec IN (SELECT account_no, (t1.balance / CASE t2.balance WHEN 0 THEN NULL END) * 100 percent_mismatch FROM target_table)
        LOOP
          DBMS_OUTPUT.PUT_LINE('Account No: ' || cur_rec.account_no || ', Percent Mismatch: ' || cur_rec.percent_mismatch);
        END LOOP;
    END;
    /If you have a lot of records this may not be a feasible approach, and you'd be better looking at UTL_FILE if you to capture the anomolies in a file.
    And alternative would be to do the whole lot in SQL:
    set pagesize 5000
    set linesize 300
    set colsep ','
    spool /tmp/your_file.csv
    SELECT t1.account_no, t1.balance, t2.balance, (t1.balance / CASE t2.balance WHEN 0 THEN NULL END) * 100 percent_mismatch
      FROM table1 t1
      JOIN table2@db_link t2 ON (t1.account_no = t2.account_no)
    WHERE NVL(t1.balance, -99999999999) != NVL(t2.balance, -99999999999);
    user8635888 wrote:another question, that I have is, how does sql handle the computation, if a value in a particular field is divided by 0 You'll see from the code that if the divisor is zero, I'm substiting NULL, which means that the percent_mismatch will be NULL.

  • Concatenate text to field value in report header

    I'm trying to concatenate text to field value in a textbox in the report header but am getting an error.  Here's how I'm doing it:
    =First(Fields!Pp_Name.Value, "dsProspect") & "Prospect"
    and the error says the report definition is invalid.  An unexpected error occurred while compiling expressions.  Native compiler return value '[BC30179] class 'Textbox.....
    any idea why this wont compile?
    Thank you.

    Hi moondaddy,
    Generally, the error message always occurred when there are two distinct text boxes with the same name that only differ in their name by casing in report. When Reporting Services generates VB code for these textboxes during report publishing, the compilation
    fails because VB class names are considered case-insensitive.
    So this issue is not related to the expression (the format is correct) you post, it related to the Textbox name that the error message said. In order to fix this issue, please rename one of the textboxes.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click here.
    Katherine Xiong
    TechNet Community Support

  • How to compare the two field in jasper report design

    hi to all,
    I am new to jasper report design
    I want to compare two fields (or) variable using if..else condition.
    pls help me out

    Check out these postings:
    http://forum.java.sun.com/thread.jspa?threadID=5286462
    http://forum.java.sun.com/thread.jspa?threadID=5286468

  • No field values in report!

    Hi,
    I have a situation wherein i have a field which has values in cube but not in the report. ( I am getting all zeroes for this field in report )
    This particular field is mapped to a field in R/3 which is populated dynamically       ( uses FM logic  in generic extraction and is not existing as a field in any table in R/3 ).
    This is a time field and in BW it was defined as number type key figure. In cube i am able to see these values of length 4 with commas as well.
    what i should do to get values for this field in report?
    Thanks,
    Ravi

    No Lokesh,
    this partcular field is not involved in any of the CKFS or RKFs .In fact for this report no CKF or RKF is existing
    More over it has values in cube ! that is what bothering me! if the values were not der in cube, then that is well known issue!
    Thanks,
    Ravi

  • Manually entering field values into report

    Hi, I am running a call report for a contact centre and the reports shows information such as numbers of calls received/answered, duration of calls, grade of service, etc. What I am wanting it to also include forcasted calls into the report. I do not have write access to the database (otherwise this would be very straight forward). The report in the end will get exported as a PDF document but I would like to be able to run the report and have some sort of prompt asking for the forcasted calls for each day ( I am showing multiple days on the report). They vary from day to day. Is there any way to do this? I'm reasonably new to crystal as well so simplicity is good. Thanks, Paul.

    Hi Paul,
    Crystal Reports is a tool that will allow you to read data from the database.  If your database contains a field that contains data for 'forecasted calls' you can place that on the report to display.  You will not be able to write data to the database from Crystal Reports.
    If you do not have a field that contains data for forecasted calls,  you might be able to create a formula to generate that.
    In regards to creating a prompt,  you can create a parameter in Crystal Reports from the Field Explorer.  Once you've created the report you can add that to the record selection formula (Report|Selection Formula|Record...)
    {yourforecast.field} = {?your.parameter}
    Regards,
    Wallie

  • Truncating Field Values

    Hi,
    Is it possible to truncate field values on reports? If so, how do you do it?
    For example, the report shows 1000.00 AUD
    I would like to see 1000 in the report.
    Thanks

    Yeah it is for a currency field, the "revenue" field for the Opportunity record. In OnDemand you can't change the field type once created, and this is an important and widely used field within the out-of-the-box reports so i was looking for other ways of solving this problem without creating a new field.
    Cheers

  • Tool Tip Text for field values in ALV report

    Hi,
    How to get the tool tip text for the field values in ALV report.
    Thanks & Regards,
    Pallavi.

    Hi,
    In fieldcatalog specify the TOOLTIP.
    <b>
    LVC_S_FCAT-TOOLTIP
    </b>
    In this speicfyteh tooltip you want.
    Then append this to the fieldcatalog.
    Hope this solves ur problem.

  • Subtotal in alv report based on the particular field value

    Hi,
    As per my requirement, i need to do subtotal of quntity field based on the material number field value in alv report.
    Ex:  if material number falls 1 to 10 then i need to be calculate and display subtotal qty amount with text " total of the mat1" and if material number falls 11 to 20 then again i need to be claculate and display subtotal qty amount with text "total of the mat2". similarily i need to display the details.
    <removed_by_moderator>
    Regards
    Nagendra

    Hi,
    Ex: if material number falls 1 to 10 then i need to be calculate and display subtotal qty amount with text " total of the mat1" and if material number falls 11 to 20 then again i need to be claculate and display subtotal qty amount with text "total of the mat2". similarily i need to display the details.
    What you can do is in your output table, you will have to create an auxilary field, lets call it as material group (groupid). Now you can do a subtotal on the material group. However the logic to determine what materials belong to which group should be coded. I guess you might be having some logic for that.
    So lets say that material 1 to 10 as G1 ( group 1 ) and material 11 to 20 as G2 ( group 2 )
    The output of the internal table would be
    Groupid  matnr ...
    1  1
    1  2
    1  3.....and so on
    2  11
    2  12
    2  13....upto 20.
    Now in the fieldcatalog assign an 'X' to the 'dosum' parameter to the field Groupid
    In the sort info do the following :
    gs_sort-fieldname = 'GROUPID'.
    gs_sort-spos = 1.
    gs_sort-up = 'X'.
    gs_sort-subtot = 'X'. ***CRUCIAL STATEMENT****
    append gs_sort to gt_sort.
    Now pass all this data to the alv grid function. And you are done.
    regards,
    Advait

  • Report query not returning the field value from external table

    hi
    I have an issue regarding reports. I have a query having 4 fields from external table and remaining from db tables. the report query returns all the fields from the db tables and only 2 fields from external table. but the same query if I tried in plsql developer it returns all the fields values.
    Can anyone please help me in this issue.
    Thanks and Regards
    kk

    Duplicate post?
    value not displaying in report whereas it returns in plsql developer
    value not displaying in report whereas it returns in plsql developer
    Please log a SR if you do not get any reply to your thread instead of creating new one.
    Thanks,
    Hussein

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • How to get a field value in the report

    hi all :-
    i need to get the field value in the formate trigger inside a specified field in the report?

    please post your request in the report category forum

  • How can i transfer a field value in the main report to its sub-report?

    <p><font face="Arial" size="2">How can i transfer a field value in the main report to its sub-report?</font></p><p><font face="Arial" size="2">Please eloberate with example if possible!</font></p><p><font face="Arial" size="2">Thanks...</font></p><p> </p>

    <p>You can do a couple of things - one would be to pass the information using the data linking expert.  Right click on the subreport, choose &#39;Change Subreport Links&#39; and select the field(s) you are wanting to pass to the subreport.  CRW will build parameters and a record selection formula for you in the subreport, and if that&#39;s what you want, then great.  But you can also remove the selection formula from the subreport and work with the parameter fields in the subreport however you would like.</p><p>Alternatively, you can look to passing Shared variables back and forth from the main and subreport.  this link talks about the method to do this: http://diamond.businessobjects.com/node/251</p><p> </p>

  • How to set a new value for formula field in crystal reports xi?

    <p>How to set a new value for formula field in crystal reports xi?</p><p>//formula</p><p>{@description}</p><p> </p><p>exemplo in VB6</p><p>crxSubreport.FormulaFields.Item(1).Text =  "&#39;Subreport Formula&#39;"  or</p><p>crxSubreport.FormulaFields.Item("description").Text =  "&#39;Subreport Formula&#39;"</p><p>How to in JRC?</p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p>

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • Getting error in Trail Balance Report's accounting flex field values

    Hi guys,
    whenever run the Trail Balance program I am getting some error in Accountng Flex Field value for particular account or transaction.Actually I am not able to find excat error in report why it came. plz tell me how to identify and how to check from backend table's link. I just share some transaction data plz see it :
    ACCOUNTS     Description     Accounting Flexfield     Beginning Balance      Period Activity      Ending Balance
    155000     STOCK-SERVICE CENTRE     01.004.000.0014.155000.0000000.050.000     -      4,514.98      4,514.98
    155000     STOCK-SERVICE CENTRE     ** CODE=GL#, NUM=50249 : invalid segment     -      4,155.00      4,155.00
    162212     STAFF - IMPREST     01.019.000.0000.162212.S900034.000.000     10,293.00      -      10,293.00
    162212     STAFF - IMPREST ** CODE=GL#, NUM=50249 : invalid segment     (2,530.00)     -      (2,530.00)
    162212     STAFF - IMPREST     01.019.000.0000.162212.S900035.000.000     950.00      -      950.00
    plz look under line value and give me solution............it's urgent
    Thanks
    Edited by: 811373 on Jul 22, 2011 9:42 AM

    Please see if these docs help.
    GLXRBUDA flexfield displays** CODE=GL#, NUM=101 : invalid Segment ** [ID 139400.1]
    AXXGRSLR: Customer Subledger By Account Shows "Invalid Segment" Row [ID 444717.1]
    If you still have the same issue, please log a SR.
    Thanks,
    Hussein

Maybe you are looking for

  • Error message when downloading rented movies

    I am trying to download a rented movie on my daugthers nano and continue to get an error message just about the time the movie finishes downloading. The error message is 42110. Anyone know how to fix the problem

  • How to Restore Backed up Files

    Hi all, I have LR3.3 and accidently deleted over 13000 images, I right clicked on my folder inside LR and pressed delete. So all my images in LR have no gone, but the images remain on my hard drive. So how do I tell LR to restore the images with the

  • DATA BASE TABLE AND INTERNAL TABLE

    Dear Friends, please help me out in getting complete information about database table and internal table. you can email me at < Removed by moderator - please maintain e-mail iDs in Business Card> Message was edited by:         Arun Varadarajan

  • Efficient ways to make stopmotion animation in Flash

    Hello, I'm new to Flash (using Flash CS5.5 on Mac OSX) and am trying to make a stop motion animation using photos that were created in a layered psd file and then turned into individual jpegs. There are many of them (400 and will be more) and I'm try

  • CANT DOWNLOAD ITUNES!!! HELP ME

    When IOS.5 came out I tried to update my itunes and an error message came up and it kept happening. So I was told to uninstall all apple prouducts and now I cant reinstall it. Everytime i try to install it I get the same error message and when I hit