Insert record and report

Hi,
im my app i have a table NOTIFICATION with some normal fields and a CLOB field. When i press Insert button i want to be able to insert the record (that's easy) and in the CLOB field i want to store the report file generated if i printed the NOTIFICATION. I do not want to preview the report. I only want to insert the record (including the automatic generated report in the CLOB field). Is this possible?
Best regards,
Bruno Martins

Bruno,
I would generate the Reports to a file on the database server and try a PLSQL program in the database to upload the file.
Frank

Similar Messages

  • Insert records from report program into R3 table

    Hi
    I wanted to insert records from report program into R3 table.
    here is my code
    data : itab type standard table of zemp initial size 10 with header line.
    itab-EMPNO = '012'.
    itab-ENAME = 'XXXX'.
    itab-JOB = 'XXXX'.
    APPEND itab.
    insert ztable from table itab.
    but i am getting the following error
    the type of the data base table and work area/internal table "ITAB" are no unicode-converible.
    how can I insert records from report program into R3 table
    should I have to write move corresponding
    pls guide
    thanks
    manian

    Hi,
    itab-EMPNO = '012'.
    itab-ENAME = 'XXXX'.
    itab-JOB = 'XXXX'.
    APPEND itab.
    insert ztable from table itab.
    Do one thing
    Data : itab type table of ztable with header line.
    itab-EMPNO = '012'.
    itab-ENAME = 'XXXX'.
    itab-JOB = 'XXXX'.
    APPEND itab.
    insert ztable from table itab.
    error will resolve, then try to make structure similar to ZTABLE

  • Insert record and email

    Hello
    How do I insert a record with the image filename into a database, then send the data just entered as an email?
    I was able to do this before but now this new CS3 seems so complicated!
    I am unable to just use an insert record behavior then add form fields and change the insert or update recored behavior like before.
    Please can I be shown some actual working tutorials on this?
    This search function on this forum does not work as I tried to search for this exact statement "insert record and email" and no records appear.
    Cheers

    Ok, here is the entire page:
    <br />
    <br /><?php require_once('Connections/cnreviva.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("");<br /><br />// Make unified connection variable<br />$conn_cnreviva = new KT_connection($cnreviva, $database_cnreviva);<br /><br />$editFormAction = $_SERVER['PHP_SELF'];<br />if (isset($_SERVER['QUERY_STRING'])) {<br />  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);<br />}<br /><br />// *** Mail form as Text format ***<br />if (isset($_POST["FX_sendForm"]) && $_POST["FX_sendForm"] == "frmupload") {<br />  $format = strtolower("Text");<br />  if ($format != "html") $format = "plain";<br />  $filefield = "uploadfile";<br />  $top = "\r\n";<br />  $body = "\r\n";<br />  $excludeArray = array("button","button_x","button_y","uploadfile","FX_sendForm","MM_insert","MM_update"); <br />  $i = 0;<br />  while ($i<sizeof($_POST)) {<br />    if (!in_array(key($_POST),$excludeArray)) {<br />      if (is_array(pos($_POST))) {<br />        $postVar = implode(", ", pos($_POST));<br />      } else {<br />        $postVar = pos($_POST);<br />      } <br />      $body .= strtoupper(key($_POST)) . ": " . stripslashes($postVar) . "\r\n";<br />    }<br />    $i++;<br />    Next($_POST);<br />  }  <br />  $bottom = "\r\n";<br />  $from = $_POST["email"];<br />  // set parameters<br />  $recipient = "[email protected]";<br />  $subject = "Test";<br />  $message = $top . $body . $bottom;<br />  // set extra parameters<br />  $headers = "From:" . $from . "\r\n";<br />  $headers .= "Cc:\r\n";<br />  $headers .= "Bcc:\r\n";<br />  require_once("FXInc/FX_mailForm_php.inc");<br />  // send all<br />  mail($recipient, $subject, $message, $headers);<br />  $body = urlencode(str_replace("\r\n", "<br>", $body));<br />  $redirect = "thankyou.php";<br />  if ($redirect) header("Location: " . $redirect);<br />}<br /><br />// Make an insert transaction instance<br />$ins_tblfeedback = new tNG_insert($conn_cnreviva);<br />$tNGs->addTransaction($ins_tblfeedback);<br />// Register triggers<br />$ins_tblfeedback->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");<br />$ins_tblfeedback->registerTrigger("END", "Trigger_Default_Redirect", 99, "thankyou.php");<br />// Add columns<br />$ins_tblfeedback->setTable("tblfeedback");<br />$ins_tblfeedback->addColumn("name", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("email", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("city", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("country", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("shoe_size", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("feedback", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("activate", "STRING_TYPE", "POST", "", "N");<br />$ins_tblfeedback->addColumn("photo", "FILE_TYPE", "FILES", "uploadfile", "");<br />$ins_tblfeedback->setPrimaryKey("id", "NUMERIC_TYPE");<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rstblfeedback = $tNGs->getRecordset("tblfeedback");<br />$row_rstblfeedback = mysql_fetch_assoc($rstblfeedback);<br />$totalRows_rstblfeedback = mysql_num_rows($rstblfeedback);<br />?>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <script src="includes/common/js/base.js" type="text/javascript"></script>
    <br />
    <script src="includes/common/js/utility.js" type="text/javascript"></script>
    <br />
    <script src="includes/skins/style.js" type="text/javascript"></script>
    <br />
    <br />
    <br />
    <br />
    <form action="%3C?php%20echo%20$editFormAction;%20?%3E" method="post" name="frmupload" id="frmupload">
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <table width="300" border="0" cellspacing="0" cellpadding="5">
    <tr>
    <td>Name
    <br />
    <br />
    <input type="text" name="name" id="name" length="20" value="" /></td>
    </tr>
    <tr>
    <td>Email
    <br />
    <br />
    <input type="text" name="email" id="email" length="20" value="" /></td>
    </tr>
    <tr>
    <td>City
    <br />
    <br />
    <input type="text" name="city" id="city" length="20" value="" /></td>
    </tr>
    <tr>
    <td>Country
    <br />
    <br />
    <input type="text" name="country" id="country" length="20" value="" /></td>
    </tr>
    <tr>
    <td>Image
    <br />
    <br />
    <input name="uploadfile" type="file" id="uploadfile" /></td>
    </tr>
    <tr>
    <td>&#160;</td>
    </tr>
    <tr>
    <td>
    <?php<br /> echo $tNGs->getErrorMsg();<br />?>
    <input type="submit" name="button" id="button" value="Submit" />
    </td>
    </tr>
    </table>
    <br />
    <input type="hidden" name="FX_sendForm" value="frmupload" />
    <br /></form>
    <br />
    <p>&#160;</p>
    <br />
    <br />

  • Insert record AND post form

    Hi,
    I'm sure this is a common problem, I could not find anything
    relating to it in search here so...
    I have a form, which I insert data into database, fine.
    I then want to post the same form to paypal payment page.
    I've got paypal set-up fine with hidden fields in the form
    etc. However, how can I make the insert into database and then post
    the form to paypal ? should I use onClick event to trigger insert
    and action to post to paypal ?
    using asp vb
    Any advise appreciated.

    It'd be a 2 page process. On page 1, you submit the form and
    insert record
    into database. Then redirect to page 2. On page 2, you'd
    submit the form on
    load and post it to paypal.
    Jules
    http://www.charon.co.uk/charoncart
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004

  • Insert Record and Redirect Data

    I have a website where we are adding articles to categories.
    I need to be able to have a user add an article and then have the
    option to add that same article into another category.
    I'm using the INSERT RECORD behavior now but I'm looking for
    an extension that will INSERT RECORD plus redirect the record/data
    to another page so the user can add it to another category.

    I found this in the upload scripts read me file:
    The clsUpload object contains public functions and methods
    which enable you to upload and save files to a web server using
    pure VBScript.
    Read only
    Data Type: Dictionary Collection
    Syntax: object.Form
    Returns a Forms collection consisting of all the Form objects
    parsed from the HTTP header.
    This collection contains all the HTML form elements which are
    not "Files"
    This collection should be used instead of the typical
    "request.form" method to access data from the other form elements
    (if you decide to combine "file" upload elements with other form
    element types, like checkboxes, text boxes, drop-down lists,
    textareas). Why? Because the form data is posted using
    "multipart/form-data" encoding (and needs to be retrieved like
    binary data instead of text data) and therefore the typical
    "request.form" method isn't effective.
    I changed request.form to clsUpload.form but it still did not
    work.

  • Insert record and return the primary key

    Okay, I need to insert a record into a MSSQL database and return the primary key of that record. Im using the following code which is obviously wrong as I'm getting either 'NULL' or 'com.microsoft.jdbc.base.BaseResultSet@1d520c4' returned depending on the ways I've tried. The primary key is an int value called clientID which is incremented by one each time a new record is added.
    // set the prepared statement
                String sql="INSERT INTO Client(username, country, clientIP, browser, os) VALUES(?,?,?,?,?)";
                PreparedStatement pstmt = conn.prepareStatement(sql);
                pstmt.setString(1, inUserName);
                pstmt.setString(2, inCountry);
                pstmt.setString(3, inClientIP);
                pstmt.setString(4, inBrowser);
                pstmt.setString(5, inOS);
                // Insert the row
                pstmt.executeUpdate();
                Statement stmt = conn.createStatement();
                ResultSet rs = stmt.executeQuery("SELECT SCOPE_IDENTITY()");
                System.out.println("Result "+rs);The primary key value is needed so that it can be used as a foregin key in another table. Am I going about this the correct way? Any help, pointers or code fixing would be appreciated.....

    Yes. I tried this way but I only ever get the answer
    of 0 when i print our the result! Not really sure
    whats happening.That's because you don't print a ResultSet like that. In order to get the key out, you have to do this:
    int key = 0;
    while (rs.next())
        key = rs.getInt(1);What were you thinking with your code?
    You might want to do this in a transaction. If the INSERT fails, you'll want to roll back.
    The "select @@identity" is correct for M$ Access, SQL Server, and Sybase. I believe it's also correct for MySQL, but I'm not 100% certain of that.
    %

  • One submit button - Insert Record and Update Record

    I have a form in Dreamweaver CS3, using ASP VBScript and an
    Access database. When submitted, the form inserts a record into the
    table CountDate01. The record comes from a hidden field that gets
    its value from a field within that same table. There is no other
    data entered by the user in any other form fields. The info the
    form submits comes from: rsDate1Avail.Fields.Item("Date01").Value
    I would like if the same Submit button could also update a
    record in a second table (registrants) at the same time. I would
    like to submit the same info that comes from the hidden field to
    the second table. So it would be two actions occurring that both
    insert and update in 2 different tables from one submit button. Is
    this possible?
    Here is the code for the existing form action:
    <%
    If (CStr(Request("MM_insert")) = "submitDate1") Then
    If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_MumConn_STRING
    MM_editCmd.CommandText = "INSERT INTO CountDate01 (Date01)
    VALUES (?)"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 135, 1, -1,
    MM_IIF(Request.Form("hiddenField"), Request.Form("hiddenField"),
    null)) ' adDBTimeStamp
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "form_FT_4.asp"
    If (Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0)
    Then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    Else
    MM_editRedirectUrl = MM_editRedirectUrl & "&" &
    Request.QueryString
    End If
    End If
    Response.Redirect(MM_editRedirectUrl)
    End If
    End If
    %>

    >I have a form in Dreamweaver CS3, using ASP VBScript and
    an Access
    >database.
    > When submitted, the form inserts a record into the table
    CountDate01. The
    > record comes from a hidden field that gets its value
    from a field within
    > that
    > same table. There is no other data entered by the user
    in any other form
    > fields. The info the form submits comes from:
    > rsDate1Avail.Fields.Item("Date01").Value
    >
    > I would like if the same Submit button could also update
    a record in a
    > second
    > table (registrants) at the same time. I would like to
    submit the same info
    > that
    > comes from the hidden field to the second table. So it
    would be two
    > actions
    > occurring that both insert and update in 2 different
    tables from one
    > submit
    > button. Is this possible?
    Yes. Use a command on the redirect page to update the data.
    No, wait, the
    ASP COMMAND IMPLEMENTATION IS BROKEN IN CS3, and remains
    broken in CS4. So
    sorry, you'll have to hand-code it.
    Sorry, I'm just a little bit bitter about the callous
    attitude Adobe has
    shown in fixing the KNOWN BUGS IN THEIR SOFTWARE.

  • How to use the insert record and check username function?

    Hi guys.
    I have an error that has me stumped.
    I have a form that inserts text from a text field into a
    mysql database and I have added a check user name function to check
    if this number already exists.
    Here's the page
    http://www.thechallenge.net.au/redemption2.php
    The error I get when using the page on the web is this
    Duplicate entry '' for key 1
    Can anyone help with this?

    ottoman007 wrote:
    I have tried the COUNTIF I input my formula =COUNTIF(6C:6M,">t") to the right of the row that I want to count and I get a red triangle and it says it isn't a valid reference. ... I am boggled how to do this.
    Badunit wrote:
    One parameter is the range (your row or column of checkboxes) and the other is the condition you want to count, which is TRUE.
                         =COUNTIF(6C:6M,TRUE)
    Regards,
    Barry

  • CRMM_BUT_MKTPERM insert record and RECORD_GUID

    Hi,
    I need to insert marketing permissions into CRM using the Fm CRMM_BUT_MKTPERM. While testing its fine for updating/deleting existing data within table crmm_but_mktperm. However to insert you need to provide a unique record_guid (table key). Its not clear how you achieve this and naturally each one needs to be unique. Given that i know the contact in CRM how can i generate/reserve this number for each row that i need to create. I need to create (probably in batches) but say 20000 at a time. Any help much appreciated

    Hi,
    I need to insert marketing permissions into CRM using the Fm CRMM_BUT_MKTPERM. While testing its fine for updating/deleting existing data within table crmm_but_mktperm. However to insert you need to provide a unique record_guid (table key). Its not clear how you achieve this and naturally each one needs to be unique. Given that i know the contact in CRM how can i generate/reserve this number for each row that i need to create. I need to create (probably in batches) but say 20000 at a time. Any help much appreciated

  • How to insert autoincrement record and query it with multiple keys

    Hi all,
    I am not familiar with BerkeyleyDB, I am now doing a project that needs to insert records and then query it out with multiple keys at later time. Since there is no field that can be distinct primary key, I want to user DbSequence as auto increment primary key to db, and set other index keys as secondary db, then using join cursor to do query with multiple keys.
    I don't know how to use DbSequence, can anyone direct me to a example of using DbSequence as auto increment primary key?
    Regards
    -Bruce

    I figured out the method to insert record with auto increment primary key. I listed the code block below:
    char m_SeqNamePositions[32] = "MyPositions";
    DbSequence *m_pSeqPositions;
    m_pDBPositions = new Db(NULL, 0);
              m_pDBPositions->open(NULL, pszFileName, szFileName, DB_BTREE, DB_CREATE, 0);          // 无数据文件
              m_pSeqPositions = new DbSequence(m_pDBPositions, 0);
              Dbt key((void *)m_SeqNamePositions, (u_int32_t)strlen(m_SeqNamePositions));
              m_pSeqPositions->open(NULL, &key, DB_CREATE);
    db_seq_t SeqNum;
         m_pSeqPositions->get(0, 1, &SeqNum, 0);
         Dbt key((void *)&SeqNum, (u_int32_t)sizeof(SeqNum));
         Dbt data(pRecord, sizeof(*pRecord));
         return m_pDBPositions->put(NULL, &key, &data, DB_NOOVERWRITE);
    m_pSeqPositions->close(0);
              m_pDBPositions->close(0);
    delete m_pSeqPositions;
    delete m_pDBPositions;
              m_pDBPositions = NULL;

  • XSQL error when trying to insert record

    hi,
    I encounter a problem using INSERT statement in xsql:query action. If I try to use INSERT statement in my xsql page like this:
    <xsql:ze_action bean="TaskentryIn">
    <xsql:query>
    INSERT
    Grundtab( Datum,Startzeit,Endzeit)
    VALUES
    ('{@date}',{'@begin}','{@ende}')
    </xsql:query>
    </xsql:ze_action>
    I always get this xsql-error:
    Statement.executeQuery - No result sets were produced by 'INSERT...'
    So far so good, I think this shouldn't be an error rather a warning.
    But this is not my primary problem.
    Anyway the record is inserted in the DB. But since I call the above <xsql:query>, from within my own action handler, I call a sendRedirect() to my next page after the <xsql:query> tag was processed.
    After sendRedirect(), when I am on my next page, I check the DB for the inserted records, and it shows up that the insert was made two times, so I have two identically records in my DB.
    If I am not sendRedirect() to the next xsql page, then the insert is only made once. So I assume that there is a problem if an xsql-error occurs and afterwards a sendRedirect().
    I am using the same way to make my SELECT statements and I dont have any trouble with them. Only when I use INSERT.
    Any adive or help is appreciated.
    Peter

    <xsql:query> is only for queries.
    Use <xsql:dml> for a DML statement.

  • Delete inserted record

    I bulid trigger in tabel and check condition, if for example check_statment = X i need to delete inserted record (that mead not insert record) and when check_statment = Y then insert record in table, i try to write delete statment and rollback but there is error appear that the current record are reserved.
    How i can solve it.

    1. Triggers cannot Issues ROLLBACK, SAVEPOINT, COMMIT statements.
    2. I guess you are trying to avoid duplicate records, Create a unique index on the key(col1,col2) which you want to prevent duplicates on.
    3. Or you can Add a column Flag Chr(1) to your table. While inserting you allow the records to get inserted, but based on your condition change the Flag to 'D' - deleted , 'A' -active. Build a View which the user uses for application filtering out the 'D'eleted records.
    Does this look like what you are trying to do !
    Ss

  • Linking multiple tables and Trying to insert records into Detail

    Hello,
    I have been struggling with this one for years...
    Work Order, Employee Labor, and Materials.  I then create a group headers using the Location field from the Work Order table.  I then create another Group, suppress the group name, and insert several fields from the Work Order table (work order number, wo description, status and completion date into Group 2 section.  Multiple rows of info are displayed.  I then enter some Employee Labor fields from the Labor table into the Details section (employee name, labor hours, pay rate, etc.).  I get several lines of employee labor transaction information grouped below each row of work order info from the Group 2 section.  So far, so good.
    Now I attempt to bring a field into the Details section from the 3rd table (Materials).  The moment I introduce the record, the rows of employee labor are duplicated over and over.  In fact, there are multiple duplicate labor transaction rows (over and over).
    What am I doing wrong???  I've tried every combination of Linking Order that I can think of...  I need help.
    Please reply.
    ps.  Let me know if I need to attach a screen shot.
    Thank you
    Robert

    hi Robert,
    this is a common issue when you add several details tables to a report. once you add the fields, then the sql generated will include those parent tables and you get a multiplier of records.
    my recommendation to you would be to use a subreport for the materials table instead.
    go to the Insert menu, choose Subreport and create a new subreport using the Wizard then add your current connection but this time only add the materials table. in the Linking tab, choose your Work order and then add the subreport to the Work order group header. now in the subreport add some fields from your materials table onto the subreport canvas.
    what this is essentially doing is a subquery to the database and returning all associated materials records based on a filter for the work order.
    the main report should not include any materials records and you can also remove this table from the database expert for the main report.
    i hope this helps,
    jamie

  • Record insertion problem and another question...

    I know I'm now php mysql expert so I am trying to use the
    insertion wizard and I can make the form and have it supposed to
    link to another page after its done inserting but when I run the
    page and fill in the details it inserts the record but does not
    goto the directed page and also shows the error:
    Warning: Cannot modify header information - headers already
    sent in C:\wamp\www\toursite\admin\users\add.php on line 56
    and on line 56 is:
    header(sprintf("Location: %s", $insertGoTo));
    Can anyone help me here?
    My second problem is not really a dreamweaver problem but it
    may be linked to it. Im using a server package called WAMP and
    pages that I can run will sometimes cause and error box to popup
    saying that Apache has caused error, the box that gives you the
    option of sending the report or not. Anyone know what the problem
    is here?
    If I have not given enough information to help please ask for
    more.
    Thanks
    Dan

    mondan wrote:
    > Warning: Cannot modify header information - headers
    already sent in
    > C:\wamp\www\toursite\admin\users\add.php on line 56
    > and on line 56 is:
    > header(sprintf("Location: %s", $insertGoTo));
    > Can anyone help me here?
    The headers already sent error is a common problem that
    baffles
    beginners. It's caused by some output being sent to the
    browser before a
    call to certain functions, such as header() or
    session_start(). You need
    to eliminate that output, and the problem will go away.
    Common causes of output are:
    * Blank space before the opening PHP tag
    * Blank space before the opening PHP tage or after the
    closing PHP tag
    of any include files
    * Use of echo or print anywhere before the call to the
    problem function
    * Error messages generated by PHP
    > Im using a server package called WAMP and pages that I
    can run will
    > sometimes cause and error box to popup saying that
    Apache has caused error, the
    > box that gives you the option of sending the report or
    not.
    None of the server packages are endorsed by PHP. Some are
    good, others
    not so good. It sounds as though you have a bad installation.
    Seek
    advice from the WAMP team or support forum if they have one.
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • Insert ,Change and Delete  records  in OO ALV

    Hi All,
    This is regarding the functionlaties  Insert ,Change and Delete records  in OO ALV ,
    I have gone through the threads posted here and checked the standard  program BCALV_EDIT_04,
    but still I am not able to capture the Deleted and Inserted records,
    as  I am new to OO ALV,can some one help me out pls.
    Thanks and regrds,
    Sree.

    Hi Sree,
    A lot of material is available on SDN.
    Please see this link. This link contains good example of insertr, delete records in OOPS ALV.
    [OOPS ALV.|Re: Insert ,Delete & Add a row in ALV;
    May it helps you.
    Regards.
    DS.

Maybe you are looking for