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

Similar Messages

  • How to compare the two same fields of different tables

    Hi can any one let me know the logic for compare the two fields of different tables.

    hi
    good
    IF it_1[] = it_2[].
       " Tables contents are the same
    ELSE.
       " Tables contents are different
    ENDIF.
    If they have different structure, you probably must loop one of the tables, and inside read the other, then compare field by field.
    Or if you don't need the contents (just comparing) you can do this, for example:
    LOOP AT it_1 INTO wa_1.
       READ TABLE it_2 WITH KEY field2 = wa_1-field2
                                field5 = wa_1-field5
                       TRANSPORTING NO FIELDS.
       IF sy-subrc = 0.
          " Record is on both tables (field2 and field5 are the fields in common for both tables).
       ENDIF.
    ENDLOOP.
    thanks
    mrutyun^

  • How to compare the Two Date field

    Hi
    i am doing a program with has two field in the Database IssueDate and the ReturnDate. But these two Field Data Type are Text. i don't use them as Data/Time. Now i want to compare the ReturnDate With Today's Date. That is whether ReturnDate is Less than Today's Date.
    Please give me a suggestion to proceed with this Particular Program.
    Thank you for your suggestion
    jofin

    Hi thank you for your reply
    1) i am Creating a library system In that when i issue a book i have to add the number days that a candidate Eligible to hold the Book with a Issue Date and store it as a Return date.
    2) i want to know who has to return the Books on Today.
    3) i want to know you has to return the Book Yet.
    For 1 st one i used GregorianCalendar gcal=new GregorianCalendar();
              ridate= gcal.get(Calendar.DATE);
              rimonth=(int)gcal.get(Calendar.MONTH)+1;
              riyear= gcal.get(Calendar.YEAR);
              rissuedate = ridate+"/"+rimonth+"/"+riyear;this and Calulate it the Returndate.
    is it Possible to convert This rissuedate = ridate+"/"+rimonth+"/"+riyear; string into date like this Formate dd/mmd/yy. and store the Date in the Database
    if so please tell me how to write a query to insert a date and while retriving how to retrive the Date.
    i mean when we retrive a String from database we use getString(); method . Like this how to retrive the Date
    Please help me on this Issue
    Thank you very much for your Help
    Cheers
    Jofin

  • How to connect the two field which have a diffrent length

    Hi,
           i have two table one is VBRP-VGBEL CHAR 10
           second is                    MKPF-XBLNR CHAR 16
    both are same data means vgbel eq xblnr.
    how to connect these table because when i connect these table it gives me error
    have a same type and length.
    please give me reply soon . Thanks.
    dinesh

    HI
    I GOT THE SAME PROBLEM AT THAT TIME I DONE LIKE THIS
    I THINK IT MAY HELPFULL FOR YOU
    OBJID = 6 CHAR
    SOBID =  40 CHAR
    I GOT THE SAME ERROR WHAT YOU GET
    I NEED ONLY 6 CHAT SO THAT WHY I HAD WROTE THIS LOGIC
    1ST I HAD DECLARED THE SAME STRUCTURE TWICE
    IN FIRST ONE IT IS NORMAL DECLARATION
    IN SECOND ONE I HAD DECLARED THAT 2 FIELDS AS THE SAME LENGTH
    I HAD PUT THAT IN THA BOLD LETTERS
    AND AFTER THAT I HAD LOOPES THAT WORK AREA AND CONVERTED THAT SZE
    REWARD IF USEFULL
    TYPES : BEGIN OF ST_HRP1001,
             OTYPE TYPE HRP1001-OTYPE,
             <b>OBJID TYPE HRP1001-OBJID</b>,
             RELAT type hrp1001-RELAT,
             BEGDA TYPE HRP1001-BEGDA,
             ENDDA TYPE HRP1001-ENDDA,
             SCLAS TYPE HRP1001-SCLAS,
             <b>SOBID TYPE HRP1001-SOBID,</b>
            END OF ST_HRP1001.
    TYPES : BEGIN OF ST_SOBID,
             OTYPE TYPE HRP1001-OTYPE,
             <b>OBJID TYPE HRP1001-OBJID,</b>
             RELAT type hrp1001-OBJID,
             BEGDA TYPE HRP1001-BEGDA,
             ENDDA TYPE HRP1001-ENDDA,
             SCLAS TYPE HRP1001-SCLAS,
             <b>SOBID TYPE HRP1001-OBJID,</b>   
        END OF ST_SOBID.
    SELECT OTYPE
             OBJID
             RELAT
             BEGDA
             ENDDA
             SCLAS
             SOBID FROM HRP1001 INTO TABLE IT_HRP1001
                        WHERE OTYPE = 'D'
                            AND OBJID IN S_OBJID
                            AND BEGDA GE DATE-LOW
                            AND ENDDA LE DATE-HIGH
                            AND ( SCLAS = 'E' OR SCLAS = 'ET' ).
      IF SY-SUBRC NE 0.
        MESSAGE 'NO RECORD FOUND FOR THE GIVEN SELECTION CRITERIA ' TYPE 'E'.
      ENDIF.
    LOOPING TO CONVERT THAT FIELD LENGHT
    <b> LOOP AT IT_HRP1001 INTO WA_HRP1001.
        WA_SOBID-OTYPE = WA_HRP1001-OTYPE.
        WA_SOBID-OBJID = WA_HRP1001-OBJID.
        WA_SOBID-RELAT = WA_HRP1001-RELAT.
        WA_SOBID-BEGDA = WA_HRP1001-BEGDA.
        WA_SOBID-ENDDA = WA_HRP1001-ENDDA.
        WA_SOBID-SCLAS = WA_HRP1001-SCLAS.
        WA_SOBID-SOBID = WA_HRP1001-SOBID.
        APPEND WA_SOBID TO IT_SOBID.
      ENDLOOP.</b>
      SELECT OTYPE
             OBJID
             AEDTM
             UNAME
             DELET
             CANCR
            NCONT
              FROM HRP1026
              INTO TABLE IT_HRP1026
              FOR ALL ENTRIES IN IT_SOBID
                 WHERE OBJID = IT_SOBID-SOBID
                 AND ( OTYPE = 'E' OR OTYPE = 'ET' )
                     AND DELET = 'X' AND
                     BEGDA GE DATE-LOW  AND
                     ENDDA LE DATE-HIGH.

  • Cocatenate the two fields ERDAT and ERZET in one field

    Hello Friends, Please suggest how to Cocatenate the two fields ERDAT and ERZET in one field . in my ZTABLE.ERDAT IS DATE 8 and ERZET tims 6
    so what should  be the new ZCOMBO field length and type
    Please give the ABAP Code to write that in Exit to Populate this Cocatenation of these two fields.
    Thanks
    Sincerely
    Soniya Kapoor

    Hi Soniya,
    Declare the field as Timestamp and use Convert To timestamp statement for Concatenating Date and Time into a single field
    CONVERT for Timestamps
    Converts a timestamp into the correct date and time for the current time zone.
    Syntax
    CONVERT TIME STAMP <tst> TIME ZONE <tz> INTO DATE <d> TIME <t>.
    CONVERT DATE <d> TIME <t> INTO TIME STAMP <tst> TIME ZONE <tz>.
    As long as <tst> has type P(8) or P(11) with 7 decimal placed, and <tz> has type C(6), the time stamp <tst> will be converted to the correct date <d> and time <t> for the time zone <tz>.
    Regards,
    Abhishek

  • How to compare the contents of two different tables

    hello. can somebody give me an idean on how to compare the contents of two different tables in mysql?
    example, i have a table named Main List and a table named New List.
    The contents of the New List should be compared to the contents of the
    Main List, to check if they are equal. I don't have any idea how to manipulate
    this data. Hoping for your help. Thanks.

    it is better to comapre it using java.. try get the resultset first and store that in collections then comapre the two collections

  • How an i compare the two forms ( script) that are in two systems ?

    Hi,
    How can I compare the two forms(sap script)  which are in different versions  or systems? One form is in D22 and other form is P22 .
    My requirement is to change the form when they are different.
    Thanks,
    Suresh.

    Hi,
    You can download the form info for each script and compare these two files.
    In the SAPscript choose Utilities -> Form info and save this as a file.  As they are structured in the same format you can then look for differences in these files rather than having to look through the form window by window.
    Regards,
    Nick

  • How to compare the programs in two different systems

    Hi,
    I have two systems say A & B and i have the program say 'Z_TESTPROG'.
    How to compare the program in two different systems.
    Regards,
    Venkat

    Hi,
    Check the version in Utilities -> version -> version management in both servers is one option.
    Another one is using SE39 transaction.
    Regards
    Manasa

  • How can i compare the character fields?

    I have a requirement to compare the character fields .
    I have to compare the 2 character fields of a table CDPOS
    As follows .
      If CDPOS-VALUE-OLD  GT  CDPOS-VALUE-NEW
          Populate    REDATED = ‘YES’.
    ELSE
          Populate  REDATED = ‘NO’.
    My doubt here is how can we compare the character fields.?
       When I do Extended Program Check: I am getting error like this ?
    Greater than/less than comparisons with character type operands may not be portable
    Please give me idea .
    Thanks ,
    Suresh Kumar.

    Hi suresh,
    DATA : a TYPE char10  VALUE 'DBCD',
           b TYPE char10  VALUE '4234',
           c TYPE char10  VALUE '3456',
           d TYPE char10  VALUE 'ADA',
           e TYPE char10 VALUE  '234567'.
    IF b GT c.        "this case checks for numeric values
      WRITE :/ 'B is bigger'.
    ELSE.
      WRITE :/ 'C is bigger'.
    ENDIF.
    IF a GT d.      "this case checks for alphbetical order
      WRITE :/ 'A is bigger'.
    ELSE.
      WRITE :/ 'D is bigger'.
    ENDIF.
    IF strlen( a ) GT strlen( d ). "this case checks for no of chars
      WRITE :/ 'A is bigger'.
    ELSE.
      WRITE :/ 'D is bigger'.
    ENDIF.
    IF a GT c.      "this case first alph then numerics
      WRITE :/ 'A is bigger'.
    ELSE.
      WRITE :/ 'D is bigger'.
    ENDIF.

  • How to get the value field of the return parameters for an action step in teststand sequence file programatically using c#

                    Sequence mySequence = myEngine.NewSequence();
                    mySequence.Name = "myAction";
                    //Create new step of type Action and set Name
                    Step mystep = myEngine.NewStep(AdapterKeyNames.DotNetAdapterKeyname, StepTypes.StepType_Action);
                    mystep.Name = "GetStringObject";
                    //Obtain the code module from the step
                    DotNetModule myModule = mystep.Module as DotNetModule;
                    //Set properties of the module
                    myModule.SetAssembly(DotNetModuleAssemblyLocations.DotNetModule_AssemblyLocation_File, @"C:\Documents and Settings\My Documents\Visual Studio 2005\Projects\HelperClass\HelperClass\bin\Debug\HelperClass.dll");
                    myModule.ClassName = "Class1";
                    myModule.MemberType = DotNetModuleMemberTypes.DotNetMember_GetProperty;
                    myModule.MemberName = "StringObject";
                    mySequence.InsertStep(mystep, 0, StepGroups.StepGroup_Setup);
                    mySequence.Locals.NewSubProperty("StringObject", PropertyValueTypes.PropValType_Reference, false, "", 0);
                    DotNetParameterDirections reference = mySequence.Locals as DotNetParameterDirections;
                    mySequence.Locals.GetPropertyObject("StringObject", 0);
                    myModule.ClassReference = "Locals.StringObject";
                    myModule.LoadPrototypeFromMetadataToken(385875969, 0);
    After this I am not able to proceed.herewith attached documents contain screenshot of teststand file marked red is to be solved. How to define the value field of the return parameters?
    Attachments:
    HelperClass.cs ‏1 KB
    ex1.gif ‏2305 KB

    Please see my answer to your question on page two of the following forum thread:
    Programmatically generating DotNet Steps in TestStand
    Manooch H.
    National Instruments

  • How to populate the TEXT field in MIGO

    Hi folks,
    While creating material document in MIGO or MB01, i am inserting some data in TEXT ( Field in line item level ). This text data is disappearing , once mat doc is created.
    how to populate the TEXT field in MIGO?Is there any cusomisation?it's urgent .
    Regards
    pabi

    Hello Pabitra,
    I had a similar issue in my Project.
    Please verify if the SMOD enhancement MBCF0002 (EXIT_SAPMM07M_001) is active in your system.
    If this is the case, verify from two angles:
    a) Whether the Enhancement was accidentally activated - If yes, then De-activate the same
    b) If there is some logic coded in the User Exit, but, the Text is somehow not determined...even the existing content in the text field (input to EXIT_SAPMM07M_001) will get vanished.
    Hope that your problem will be resolved by this.  Pls reward points.
    With Regards
    Vijay Gajavalli

  • How to hide the Parameter field during Run time?

    Hi,
    How to hide the Parameter field during Run time?
    I have a parameter field which behaves differently depending on the User logged in.
    I am using reports 10G
    For ex: I have 3 field created in JSP
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user = 'SUPER show all the parameter
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user is 'GATEKEEPER" Just show
    PROVIDER
    FROM DATE
    END DATE
    Can I do that?
    Please help
    Thanks.
    KK

    hi, i'm not familiar much with JSP. but i think workaround is to create two window one which have 4 fields and the other which have 3. if user is SUPER then call the first screen otherwise if user is GATEKEEPER then call the second screen.

  • How to remove the mandatory field setting in output control

    Hi everybody,
    While printing a Payment Voucher through F-58 and FBZ5(reprint), there are two output devices, the first one is - printer for forms and second is - payment advice printer.
    In our case we have configured the cheque printing and payment voucher printing seperately. The cheque goes to first printer(kept mandatory field) and the payment voucher goes to second printer. One of our plant does not print the cheque from SAP, they only print the payment voucher because the cheque is manually prepared. How do I avoid the cheque printing. Is there any way out to print only the payment voucher through F-58 and FBZ5
    Please guide me how to tackle it or how to remove the mandatory field setting in the output control screen?
    Regards
    Paul

    Hi
    As of my understanding, there is no relation ship between the Sales Organization and this mandatory partner function.
    Here are few suggestions.
    1. Since Partner functions are defualted and made mandatory in the Partner Determination Procedure so you have to remove this Mandatory option for PE from the Partner Determination Procedure that is AG if using standard one.
    2. If you are using a single partner function than , Copy and create a New partner procedure and a new account group . Where in one you can default PE as mandatory and in another one you make a optional where it can be choosen manually while creating the customer.
    Follow the path to check for entries :
    SPRO > sales & distribution > Basic Function > Partner Determination > set up partner determination > select for customer master > select the partner procedure you are using AG as standard > then partner function in procedure > here maintian the check as required like, Mandatory or No check for Non Mandatory .
    Thanks
    RB

  • How to add this two fields AUGBL & ZLSCH in FBL3 in abap 3.1 version

    How to add the clearing document no. & payment method in FBL3 tcode. Can any one explain me step by step process how to add that two fields. This is ABAP 3.1 version. It's urgent requirement.
    Moderator Message: Duplicate thread locked. Please carry on with this thread: How to add this two fields AUGBL & ZLSCH in FBL3 in abap 3.1 version
    Message was edited by: Suhas Saha

    Did you read the note provided in How to add this two fields AUGBL & ZLSCH in FBL3 in abap 3.1 version ?
    Regards,
    Raymond

  • How to add the date field in the dso and info cube

    Hi all.
    I am new to bi 7. in the earlier version v hav to button to add the date field. but in the bi 7 der is no option so can any body tell me how to add the date field in the data targets
    Thanks & Regard
    KK

    my prob is solved
    KK

Maybe you are looking for

  • Sharp 32" LCD HDTV or should we go with Samsung LCD HDTV?

    Hi- I'd like some opinions please. We are in the market for a 32" flat screen tv - our first- and we cannot decide between the Samsung 32" 1080p Flat Panel LCD HDTV or the Sharp-AQUOS 32" 1080p Flat Panel LCD HDTV? Consumer Reports has not yet rated

  • Mac didn't come with iLife!

    I just bought my MacBook Pro on Sunday from Virgin Megastores and it didn't come with iLife and I did my research and it says that it should have come with it! What should I do? Should I take it back and tell them that it didn't come with it? Because

  • Using MXO2 for monitoring fcp

    I'm looking to monitor HD out of a MacPro with one video card, and wondering if the MXO2 mini will allow me to have 2 computer monitors hooked up to my video card, and export HDMI to a LCD/TV (3 screens). From what I'm seeing, it looks like I'm going

  • Database Date in Reports

    Hello, I'm using Reports 6i. I want to have database date printed on the top right corner of the reports in the 'DD/MM/YYYY' format without using 'SELECT sysdate FROM dual' expression. Is there any alternate? The date that is inserted by selecting Da

  • Hearing no sound from internal speakers

    Just recently installed updates and lost my sound. When i go to system preferences to sound and output tab all the options are grayed out and i cant turn mute button off. Any ideas?