Oracle Forms returns the first record in the database when performing query

Once in a while when we query for a record on a form, say by first name Tom, then it returns the first record in the database. Other times it return the Tom's record. It only happens once in a while and if you close the form and reopen it and requery for Tom, then it brings Tom's record.
Does anyone know the issue what could be happening. It just happens every now and then that it's hard to reproduce.
ORacle Forms 10GR2
ORacle Application Server 10.1.3
thanks

then it returns the first record in the databaseI'm not sure if i understand you correctly. Do you mean forms ignores the searc-condition you entered? I would check SYSTEM.LAST_QUERY at the moment this happens to check if the condition gets somehow lost.

Similar Messages

  • Update a record is updating the first record in the DB...HELP!

    I am going over and over this again and cant find the problem.
    i have a form that sends email to emails that are on a php mysql db however when i update certain records it always is updating the first record in the DB...i have looked over this so many times and cant see what is going wrong
    the userid is not auto_increment but is based on the username (these are all unique)
    i have uncluded the code to see if i am missing something
    <?php require_once('../Connections/hostprop.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE plus_signup SET email=%s, emailerSubject=%s, emailerContent=%s WHERE userid=%s",
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['emailerSubject'], "text"),
                           GetSQLValueString($_POST['emailerContent'], "text"),
                           GetSQLValueString($_POST['userid'], "text"));
      mysql_select_db($database_hostprop, $hostprop);
      $Result1 = mysql_query($updateSQL, $hostprop) or die(mysql_error());
          // Email Guarantor
              $to = $_POST['email'];
              $subject = "Email From Host Student Property";
              $message = "
              <html>
                        <head>
                                  <title>Dear ".GetSQLValueString($_POST['userid'], "text")."</title>
                        </head>
                        <body>
                                  <img src=\"http://www.hoststudent.co.uk/beta/images/hostlogo.gif\" alt=\"www.HostStudent.co.uk\" />
                                  <h2>An Email From Host Students</h2>
                                  <br /><br />
                                  <table>
                                            <tr>
                                                      <td>Email Subject:</td>
                                            </tr>
                                            <tr>
                                                      <td>".GetSQLValueString($_POST['emailerSubject'], "text")."</td>
                                            </tr>
                                            <tr>
                                                      <td>Email Content</td>
                                            </tr>
                                            <tr>
                                                      <td>".GetSQLValueString($_POST['emailerContent'], "text")."</td>
                                            </tr>
                                  </table>
                        </body>
              </html>
              // Always set content-type when sending HTML email
              $headers = "MIME-Version: 1.0" . "\r\n";
              $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
              $headers .= 'From: HostStudent.co.uk <[email protected]>' . "\r\n";
              $send = mail($to,$subject,$message,$headers);
      $updateGoTo = "TenantEmailSent.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    mysql_select_db($database_hostprop, $hostprop);
    $query_Recordset1 = "SELECT userid, email, emailerSubject, emailerContent FROM plus_signup";
    $Recordset1 = mysql_query($query_Recordset1, $hostprop) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>
    <?
              session_start();
              if(!$_SESSION['loggedIn']) // If the user IS NOT logged in, forward them back to the login page
                        header("location:Login.html");
    ?>
       <script type="text/javascript">
    function loadFields(Value) {
             var Guarantor = Value.split("|");
              var userid1 = Guarantor[0] ;
                          var GuName = Guarantor[1];
              var GuPhoneEmail = Guarantor[2] ;
              document.getElementById('userid1').value=userid1;
                          document.getElementById('GuName').value=GuName;
              document.getElementById('GuPhoneEmail').value=GuPhoneEmail;
    </script>
    <form action="<?php echo $editFormAction; ?>" method="post" name="form2" id="form2">
                  <table align="center">
          <tr valign="baseline">
            <td nowrap="nowrap" align="right"> </td>
            <td><select name="userid" id="userid" onchange="loadFields(this.value)">
              <option value="Select Guarantor">Select Guarantor</option>
              <?php
    do {
    ?>
    <option value="<?php echo $row_Recordset1['userid'] . '|' . $row_Recordset1['GuName'] . '|' . $row_Recordset1['GuPhoneEmail'];?>"><?php echo $row_Recordset1['userid'] . " , " . $row_Recordset1['GuName'] . " , " . $row_Recordset1['GuPhoneEmail']; ?></option>
              <?php
    } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
      $rows = mysql_num_rows($Recordset1);
      if($rows > 0) {
          mysql_data_seek($Recordset1, 0);
                $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    ?>
            </select></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Tenant Name</td>
            <td><input type="text" name="userid1" id="userid1" readonly="readonly" value="<?php echo htmlentities($row_Recordset1['userid'], ENT_COMPAT, 'utf-8'); ?>" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">GuName:</td>
            <td><input type="text" name="GuName" id="GuName" readonly="readonly" value="<?php echo htmlentities($row_Recordset1['GuName'], ENT_COMPAT, 'utf-8'); ?>" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">GuPhoneEmail:</td>
            <td><input type="text" name="GuPhoneEmail" id="GuPhoneEmail" readonly="readonly" value="<?php echo htmlentities($row_Recordset1['GuPhoneEmail'], ENT_COMPAT, 'utf-8'); ?>" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">GuEmailerSubject:</td>
            <td><input type="text" name="GuEmailerSubject" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">GuEmailerContent:</td>
            <td><textarea name="GuEmailerContent" cols="45" rows="5"> </textarea></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right"> </td>
            <td><input type="submit" value="Send email" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right"></td>
            <td> </td>
          </tr>
                  </table>
        <input type="hidden" name="MM_update" value="form2" />
        <input type="hidden" name="userid" value="<?php echo $row_Recordset1['userid']; ?>" />
    </form>

    i have found the problem, there were two forms with the same name..
    thanks

  • The detailRegion is always forced to populate the first record from the Master region

    Hi fellow Spry enthusiasts,
    My question is in regards the undesirable data population of
    the regiondetail on initial load. I have 2 sections, one which is
    my master region (which goes out and retrieves a bunch of records),
    and a related detailregion which reacts based on the master.
    However, every time I initiate a query of the master region to
    retrieve records, the detail region also responds and automatically
    grabs the FIRST record of the master region (which is undesirable
    in my case because I do not want the detail region to react UNTIL I
    select a record in the master region). Let me know if this makes
    sense.
    Psuedo Code:
    var moveRequestor = new
    Spry.Data.XMLDataSet("cfc/QueryThatReturnsABunchOfEmployeeRecords")>
    <span spry:region="moveRequestor">
    {EM_ID}
    {NAME}
    <span spry:detailregion="moveRequestor">
    {EM_ID}
    {NAME}
    {PHONE}

    This question was posted a while ago, and was one of the
    search results that came up when I was looking for my own answer. I
    had a nearly identical question and answered it here:
    Disabling
    default linked region and detailregiondisply until click
    Hopefully it will help others too!

  • Master-Detail only shows the first record of the Master's data

    I have an ADF Master Table, Detail table. I use ExcuteWithParams on the Master Table. When executed from a button (Button has partial submit = true for button, Master Table has PartialTrigger on button, and Detail table has PartialTrigger on Master table and button), it works fine. However, I want to pass the parameters in pageFlowScope variables, and have the ExecuteWithParams invoked upon page load. When I try to do this, the Detail table only shows the first record of the Master's data, no mater what row is clicked on the Master table.
    Master table now has no PartialTrigger, and Detail table has PartialTrigger on Master table. In my pageDef, I used an invoke action as follows:
    <invokeAction Binds="ExecuteWithParams" id="invokeExecuteWithParams"
    Refresh="always"/>
    What am I missing? I am using verion 11.1.1.3. Any help would be much appreciated.
    Thanks,
    Jessica

    Yes, it works when I drag the data control as a master detail without filtering any data. I want the user to be able to set search criteria to filter the data in the master table (For example, only pull back data with a transaction date between :startdate and :enddate). I can get it to work if I execute from an executewithparams button on the page, but not if I want to invoke the executewithparams upon page load with the parameter set by pageflowscope variables.
    Thank you for responding.
    Jessica

  • How to return to the first record of a multiple row cursor (Forms 6i)

    Hi all,
    I had a bit of a search through here, but couldn't quite find the answer I'm after.
    I have a multiple row cursor, which I feed into a multi-row block in Forms 6i. I have the following code:
    OPEN CURSOR;
    LOOP
       FETCH CURSOR INTO :FIELD1, :FIELD2, :FIELD3, :FIELD4;
       ... do other code not related with cursor
       EXIT WHEN CURSOR%NOTFOUND;
       NEXT_RECORD;
    END LOOP;Now, I use the Forms built-in NEXT_RECORD to move down through the records on the form and fill in each row from the db. However, once the block loads (this works correctly), the current item (ie where the typing cursor is left) is on the last record.
    Obviously, I need the current item (after loading) to be on the first record. I tried using the Forms built-in FIRST_RECORD after the END LOOP command, but that gives me an ORA-06511 error (An attempt was made to open a cursor that was already open).
    Does anyone know how I might be able to return to the first record of the block correctly?
    Thanks in Advance,
    Chris.

    Ok, I feel like a bit of a dolt.
    I found that all cursors had to be closed before navigating back to the first record.
    Case closed! :)

  • How do I blank my BI Pub report parameter from returning the first record when output to HTML?

    Hi all.
    I have a report that has several parameters A, B, C D.
    I include these at the head of the rtf report.
    I run the report WITHOUT entering anything for parameters A & B.
    When the report generates (returning all the expected correct records), it enters into parameter fields A & B at the top of the report the first records’ A & B fields when they should be blank.
    IS there something I need to do in the rtf form field Help text along with the field name?
    ThanksForLoooking..
    Malc

    within the rtf of the report, within the form-field-help-text, this should work..
    <?xdofx:decode(<parameter name>,'','',<parameter name>)?>
    if the parameter is left blank, then don't put anything in the rtf field, otherwise put in anything that is selected in the parameter.
    or this..
    <?xdofx:if <parameter name>='' then 'All Params Included' else <parameter name> end if?>
    ..yet, when the parameter is left blank, the parameter field in the report generated is populated with whatever is in the first line of the parameter in the report.
    I also can't find anything in the old rdf that is causing this either.  Help!

  • DB Adapter: Polling For New Records returns the First record multiple Times

    I Polling for New or Chnaged Records against DB2 on iSeries. The DB Adapter returns the first record from the Table multiple Times. If the Table has 5 records it displays the first record 5 times. I am using BPEL 10.1.3.1 Can anyone help me with this.

    Hi there,
    please check out the DBAdapter trouble-shooting guide:
    http://download-east.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/app_trblshoot.htm#CIHFEHFA
    I am copying an entry from there into here:
    A.1.21 Some Queried Rows Appear Twice or Not at All in the Query Result
    Problem
    When you execute a query, you may get the correct number of rows, but some rows appear multiple times and others do not appear at all.
    This behavior is typically because the primary key is configured incorrectly. If the database adapter reads two different rows that it thinks are the same (for example, the same primary key), then it writes both rows into the same instance and the first row's values are overwritten by the second row's values.
    Solution
    Open Application Sources > TopLink > TopLink Mappings. In the Structure window, double-click PHONES. On the first page, you should see Primary Keys. Make sure that the correct columns are selected to make a unique constraint.
    Save and then edit the database partner link.
    Click Next to the end, and then click Finish and Close.
    Open your toplink_mappings.xml file. For the PHONES descriptor, you should see something like this:
    <primary-key-fields>
    <field>PHONES.ID1</field>
    <field>PHONES.ID2</field>
    </primary-key-fields>
    Thanks
    Steve

  • Unable to search for first record using the Preview tree

    Post Author: TheBig1980s
    CA Forum: General
    Hello:
    Users are unable to search for the first record in the Preview tab's tree.  The reason for this is because the first record is within the first page header of the report.  My guess is that, by design, Crystal takes the end user to whatever the first instance of the record iseven if that first record is in a page header.  That's not "good".  I want the user to be taken to the first record within the details of the reportnot within the page header.
    I have suppressed the page header to not print on the first record by using OnFirstRecord.  But, I still get the same issue where end users cannot select the first record in the tree without being taken to the page header.  Very strange.
    Can anybody think of any other ideas?
    Thanks!
    TheBig1980s

    Thank you Dave Merchant and try67 for your responses. As per my previous post, I contacted the company re the catalogue and they have responded favourably. I'll include their response because it gives the reason for the search failure as document compression which you might find interesting. I'll await their new catalogue and see if they have fixed the problem.
    Company response:
    Thank you very much for your input.  And yes, you are correct, the compression we used for the current catalogue's PDF format does strip out text included in the catalogue.  We used the compression settings we did with the intention of minimising download time, however I take your point about including text for search purposes (which I also utilise when I'm scanning through PDFs).
    We will actually be posting out our new catalogue next week and we'll release the new PDF version on the website at the same time.  I've asked our graphic designer to ensure that the PDF we use for the new catalogue includes searchable text.

  • How to populate only the first record by default when the page opens?

    Dear Members,
    I am using OAF R12 and my requirement is as follows:-
    When the user opens the custom OAF R12 page, I just want to query the first record from the underlying VO.
    For example, If the table has 10 rows, I just want to query the first row as soon as the page opens.
    I have written the below code:-
    Process Request Method of the CO:-_
    am.invokeMethod("initHeaders");
    Code in AM_
    public void initHeaders()
    HeadersVOImpl hVO = getHeadersVO1();
    hVO.initQueryHeaders();
    Code in VO_
    public void initQueryHeaders()
    executeQuery();
    As it is very clear that with the above code all the records will be queried. I have to add something before the executeQuery() method in the VO to just query the first record.
    Can any one please help me by guiding me what I should add before the executeQuery() method in the VO?
    Many thanks in advance.
    Regards,
    R4S.

    Hello Gyan,
    Many thanks for your reply.
    The below line in your code is throwing incompatible type error:
    OARow row = vo.first();
    Can you please help me.
    Regards,
    R4S

  • Opening a form and displaying the first record

    Any ideas on what the easiest solution would be to show the first record on a form when the form is opened? I've tried some of the ideas discussed in the FAQ section, but without success!!
    Thanks........GD

    Greg,
    Sorry, but there is no other solutions other than those described in the FAQ. I know that it is not very "user-friendly", but should work.
    Also if you search the forum's archive there were some concrete examples posted.
    Thanks,
    Dmitry

  • Php page won't display the first record

    I have the following code, but it always skip the first row of the records pull from an Oracle table:
    include "utility_functions.php";
    // Form the query and execute it
    $sql = "select * from dept where cid=".$_GET['q'];
    $result_array = execute_sql_in_oracle ($sql);
    $result = $result_array["flag"];
    $cursor = $result_array["cursor"];
    if ($result == false){
      display_oracle_error_message($cursor);
      die("Client Query Failed.");
    // Display the query results
    echo "<ul class=\"nav\">";
    $values = oci_fetch_array ($cursor);
    //echo $values[0];
    // Fetch the result from the cursor one by one
    while ($values = oci_fetch_array($cursor)){
      $did = $values[0];
      $dname = $values[1];
      echo("<li><a href=\"showdetail.php?did=$did\">$dname</a></li> ");
    oci_free_statement($cursor);
    echo "</ul>";
    for example, I have the following in dept table:
    did    dname
    1     Business
    2     Education
    3     Math
    4     English
    It will only list: education, math, and english.  Any clues?

    What does execute_sql_in_oracle() do?
    Try following example code, such as from:
            http://www.php.net/manual/en/oci8.examples.php
            http://www.php.net/manual/en/function.oci-fetch-array.php
            http://www.php.net/manual/en/function.oci-bind-by-name.php
    It's extremely insecure (and slow) to do a query made up with string concatenation like:
      $sql = "select * from dept where cid=".$_GET['q'];
    You probably need to first sanitize $_GET to remove anything malicious.  Then you must use a bind variable on the sanitized result.

  • How can I do a multiple record data merge, but specify that a specific text frame with variable data only merges on the first record?

    I'm doing a multiple record data merge, I have 2 frames both with variable data placed inside.
    I would like to specify that one of the text frames only merges once(first record) and the other frame multiple times for each record in the data file.
    Is it possible?
    I thought that perhaps if I place the text frame that must merge once on the master page, it would work.  But you are not allowed to place variable text on the master and on the document page.
    I'm going to try it through scripting next, but thought that perhaps there is an easier way that I'm not aware of.
    Thanks,
    Suzanne

    Suzanne,
    If you were trying to post a screen shot, you would need to return to the forum and post it using the "camera" icon at the top of the post editing windows.
    I use a plug-in from Em Software called InData. One of the benefits for what I do is there are no individual frames on a page to deal with post-merge. Individual frames are great for simple merges (address labels, post cards, etc.). But I typically do more other types of merges.
    That said, there is a drawback--one needs to come to an understanding of writing expressions that actually parse the incoming data. So in the spice price list example, that looks like:
    It's reasonably easy once one does it a few times. And it can be far more complicated. The above is from Em Software's samples that has been tweaked. The best thing I can recommend would be to download the trial and see for yourself. They are good at responding to specific questions if you get stumped.
    I imagine this all could be scripted somehow in ID. But I have no idea how and the plug-in just lets me keep working.
    Mike

  • Recording Audio Cuts off the first part of the region?

    Hi. When i record audio the regions show up after recording and i have to pull the beginning of the region back a bit so that i can see the full length of the audio recording. Its non destructive but very annyoing. How can i stop it doing this everytime? Thanks

    Thanks Mike for replying
    But the thing is; I want to perform a computation process on the list manager values to trim off the first part of the string. I have the dynamic lov for list manager. But when I insert/update list manager item values I don't want the first part of string in the database.
    Please help with the function. i was trying the below function but it doesn't work; errors out saying
    ORA-06550: line 16, column 14: PLS-00597: expression 'V_ARRAY_1' in the INTO list is of wrong type ORA-06550: line 17, column 9: PL/SQL: ORA-00904: : invalid identifier ORA-06550: line 15, column 7: PL/SQL: SQL Statement ignored
    {code}
    DECLARE
       v_array          apex_application_global.vc_arr2;
       v_array_1         apex_application_global.vc_arr2;
       v_string         VARCHAR2 (32767);
       BEGIN
       -- Convert delimited string to array
       v_array :=
          APEX_UTIL.
           string_to_table (:P3_LM_USES);
       FOR i IN 1 .. v_array.COUNT
       LOOP
          SELECT LTRIM (SUBSTR (v_array (i), INSTR (v_array (i), '..') + 2))
            INTO v_array_1
            FROM DUAL;
    v_string := HTMLDB_UTIL.table_to_string(v_array_1,':');
    apex_application.g_print_success_message := apex_application.g_print_success_message || v_string;
             END LOOP;
    RETURN (v_string);
    END;
    {code}
    Thanks,
    Orton

  • Report without the first record using JasperReports

    Hi everyone,
    I�m using JasperReports127 but the first record is not being showed...
    I really don�t know why... Does someone had the same problem?!
    I follow this tutorial:
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/reports.html
    Gustavo Callou

    I forgot to say that what ir really interesting is that in the iReport Aplication the report works fine... but in the jsc not...
    my setor.jrxml is bellow:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Created with iReport - A designer for JasperReports -->
    <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
    <jasperReport
              name="classic"
              columnCount="1"
              printOrder="Vertical"
              orientation="Portrait"
              pageWidth="595"
              pageHeight="842"
              columnWidth="535"
              columnSpacing="0"
              leftMargin="30"
              rightMargin="30"
              topMargin="20"
              bottomMargin="20"
              whenNoDataType="NoPages"
              isTitleNewPage="false"
              isSummaryNewPage="false">
         <property name="ireport.scriptlethandling" value="0" />
         <property name="ireport.encoding" value="UTF-8" />
         <import value="java.util.*" />
         <import value="net.sf.jasperreports.engine.*" />
         <import value="net.sf.jasperreports.engine.data.*" />
         <queryString><![CDATA[select *
    from tb_setor
    where tb_setor.incodigosetor > '0'
    order by tb_setor.vanome
    ]]></queryString>
         <field name="INCODIGOSETOR" class="java.math.BigDecimal"/>
         <field name="VANOME" class="java.lang.String"/>
         <field name="VARAMAL" class="java.lang.String"/>
              <background>
                   <band height="0" isSplitAllowed="true" >
                   </band>
              </background>
              <title>
                   <band height="50" isSplitAllowed="true" >
                        <staticText>
                             <reportElement
                                  x="61"
                                  y="5"
                                  width="412"
                                  height="40"
                                  key="staticText"/>
                             <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                             <textElement textAlignment="Center">
                                  <font size="28" isBold="true"/>
                             </textElement>
                        <text><![CDATA[Setores]]></text>
                        </staticText>
                        <line direction="TopDown">
                             <reportElement
                                  x="0"
                                  y="48"
                                  width="534"
                                  height="0"
                                  forecolor="#000000"
                                  key="line"
                                  positionType="FixRelativeToBottom"/>
                             <graphicElement stretchType="NoStretch" pen="2Point"/>
                        </line>
                        <line direction="TopDown">
                             <reportElement
                                  x="0"
                                  y="3"
                                  width="534"
                                  height="0"
                                  forecolor="#000000"
                                  key="line"/>
                             <graphicElement stretchType="NoStretch" pen="2Point"/>
                        </line>
                   </band>
              </title>
              <pageHeader>
                   <band height="9" isSplitAllowed="true" >
                   </band>
              </pageHeader>
              <columnHeader>
                   <band height="20" isSplitAllowed="true" >
                        <rectangle radius="0" >
                             <reportElement
                                  mode="Opaque"
                                  x="1"
                                  y="1"
                                  width="534"
                                  height="17"
                                  forecolor="#000000"
                                  backcolor="#999999"
                                  key="element-22"/>
                             <graphicElement stretchType="NoStretch" pen="Thin"/>
                        </rectangle>
                        <staticText>
                             <reportElement
                                  x="0"
                                  y="1"
                                  width="267"
                                  height="16"
                                  forecolor="#FFFFFF"
                                  key="element-90"/>
                             <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
                             <textElement>
                                  <font fontName="" size="12"/>
                             </textElement>
                        <text><![CDATA[Setor]]></text>
                        </staticText>
                        <staticText>
                             <reportElement
                                  x="267"
                                  y="1"
                                  width="267"
                                  height="16"
                                  forecolor="#FFFFFF"
                                  key="element-90"/>
                             <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
                             <textElement>
                                  <font fontName="" size="12"/>
                             </textElement>
                        <text><![CDATA[Ramal]]></text>
                        </staticText>
                   </band>
              </columnHeader>
              <detail>
                   <band height="19" isSplitAllowed="true" >
                        <line direction="TopDown">
                             <reportElement
                                  x="0"
                                  y="17"
                                  width="535"
                                  height="0"
                                  forecolor="#808080"
                                  key="line"
                                  positionType="FixRelativeToBottom"/>
                             <graphicElement stretchType="NoStretch" pen="Thin"/>
                        </line>
                        <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
                             <reportElement
                                  x="0"
                                  y="1"
                                  width="267"
                                  height="15"
                                  key="textField"/>
                             <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
                             <textElement>
                                  <font fontName="Times-Roman" size="12"/>
                             </textElement>
                        <textFieldExpression class="java.lang.String"><![CDATA[$F{VANOME}]]></textFieldExpression>
                        </textField>
                        <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
                             <reportElement
                                  x="267"
                                  y="1"
                                  width="267"
                                  height="15"
                                  key="textField"/>
                             <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
                             <textElement>
                                  <font fontName="Times-Roman" size="12"/>
                             </textElement>
                        <textFieldExpression class="java.lang.String"><![CDATA[$F{VARAMAL}]]></textFieldExpression>
                        </textField>
                   </band>
              </detail>
              <columnFooter>
                   <band height="0" isSplitAllowed="true" >
                   </band>
              </columnFooter>
              <pageFooter>
                   <band height="27" isSplitAllowed="true" >
                        <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
                             <reportElement
                                  x="325"
                                  y="4"
                                  width="170"
                                  height="19"
                                  key="textField"/>
                             <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                             <textElement textAlignment="Right">
                                  <font fontName="Helvetica" size="10"/>
                             </textElement>
                        <textFieldExpression class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
                        </textField>
                        <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >
                             <reportElement
                                  x="499"
                                  y="4"
                                  width="36"
                                  height="19"
                                  forecolor="#000000"
                                  backcolor="#FFFFFF"
                                  key="textField"/>
                             <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                             <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single">
                                  <font fontName="Helvetica" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
                             </textElement>
                        <textFieldExpression class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
                        </textField>
                        <line direction="TopDown">
                             <reportElement
                                  x="0"
                                  y="1"
                                  width="535"
                                  height="0"
                                  forecolor="#000000"
                                  key="line"/>
                             <graphicElement stretchType="NoStretch" pen="2Point"/>
                        </line>
                        <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
                             <reportElement
                                  x="1"
                                  y="6"
                                  width="209"
                                  height="19"
                                  key="textField"/>
                             <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                             <textElement>
                                  <font fontName="Times-Roman" size="10"/>
                             </textElement>
                        <textFieldExpression class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
                        </textField>
                   </band>
              </pageFooter>
              <summary>
                   <band height="0" isSplitAllowed="true" >
                   </band>
              </summary>
    </jasperReport>

  • How to take a value of the first record/occurrence and the last record?

    Hi experts
    Can anyone help me to tell me:
    How to make IP can take a value of the first record/occurrence and the last record in CSV file?
    I need to take the first and last to put StarTime of first record y StopTime of last record in the target file
    This is my Original CSV File
    20110820,220DNE0220,140.13 ,0.000 ,E01,0
    20110820,240FGC4280,103.80 ,0.000 ,E01,0
    20110821,220DNE0220,142.58 ,0.000 ,E01,0
    20110821,240FGC4280,88.70 ,0.000 ,E01,0
    20110822,220DNE0220,151.92 ,0.000 ,E01,0
    20110822,240FGC4280,91.47 ,0.000 ,E01,0
    Where:
    The firts field is date.
    I require it so my Target File
    20110820,20110822,140.13 ,0.000 ,E01,0
    20110820,20110822,103.80 ,0.000 ,E01,0
    20110820,20110822,142.58 ,0.000 ,E01,0
    20110820,20110822,88.70 ,0.000 ,E01,0
    20110820,20110822,151.92 ,0.000 ,E01,0
    20110820,20110822,91.47 ,0.000 ,E01,0
    Thaks..

    Hi lizcam,
    A. Use FCC at sender side, it will convert CSV to XML like this
    Input XML
    <documentName>
    <recordset>
    <record>
      <Time>20110820</Time>
      <ID>220DNE0220</ID>
      <Quan>140.13</Quan>
      <Volume>0.000</Volume>
      <Auc>E01</Auc>
      <No>0</No>
    </record>
    </recordset>
    </documentName>
    Create a target DT like this
    Output XML
    <recordset>
    <record>
      <StartTime>20110820</StartTime>
      <EndTime>20110822</EndTime>
      <Quan>140.13</Quan>
      <Volume>0.000</Volume>
      <Auc>E01</Auc>
      <No>0</No>
    </record>
    </recordset>
    In MM,
    1.Time -> CopyValue[0] -> StartTime
    2.Time -> below UDF -> EndTime
    3.Quan -> Quan
    4.Volume -> Volume
    5.Auc -> Auc
    6.No -> No
    UDF u2013 Execution type u2013 All values of Queue
    public void getLastTimeValue(String[] inputEndTime, ResultList result, Container container) throws StreamTransformationException{
    result.addValue(inputEndTime[inputEndTime.length-1]);
    B. At receiver use again FCC to convert XML to CSV.
    FYI. If you want to optimize more, you can use
    1.globalContainer concept OR
    2.u201CAttributes and Methodsu201D, declare are String. Store the EndTime using one UDF and write another UDF to retrieve it.
    Regards,
    Raghu_Vamsee

Maybe you are looking for

  • How to create a file in application data local folder which is not hidden in windows store app?

    I want to create a log file in ApplicationData local folder.      m_StorageFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(m_Name.Replace(" ", "_") + ".log",                           CreationCollisionOption.OpenIfExists); First time

  • DVD/CD Drive Not Working

    Just got a new iMac i7 and the dvd drive doesn't read any disks when they are inserted into the drive. They just spin for a while then the drive spits it out...it never mounts or opens itunes or iphoto. Anyone have a similar experience and if so, any

  • How do i change to 32bit colour depth in mountain lion?

    I was trying to access my favourite poker site when this message was displayed "  This game requires the color depth to be set to 32 bits (millions of colors) in your display" , before i upgraded to mountain lion i never had problems with this, any s

  • 64 Bit Windows USB drivers for Palm Desktop

    Good morning. Thank you for your help. Unfortunately, it does not work. The hotsync occurs, the data transfer well, but by activating the Palm desktop, nothing appears, everything is empty. No adressen ancun appointment. If you have the solution, has

  • J1iex & j1is

    Dear sir , what is the differnce between j1iex & j1is.(is this a MM part in practical life). thanks