Generate report with data from database package

Hi
Is it possible to generate a report where the values come from an oracle database package instead of from an sql query declared in the report itself?
If yes, how is it done?
Appreciate any help. Thx.

Hi,
You can use REF CURSORs to generate reports from a database package.
For information about REF CURSORs, please see Chapter 40 'Building a Paper Report with REF CURSORs' of the Oracle Reports Building Reports manual.
This chapter is at:
http://download-uk.oracle.com/docs/html/B13895_01/orbr_refcur.htm#i1011693
Hope this helps.
Regards,
Panna

Similar Messages

  • How to populate Adobe LiveCycle Designer generated  PDF Forms with data from Database in Windows app

    Hi
    I have a PDF template designed in Adobe LiveCycle Designer. This template has form fields which needs to be filled with data programmatically. I am using windows application in C#.Net 2005 in which I want to retrieve data from database and merge this data into PDF form in respective fields.
    How this can be achieved?
    I searched a lot & I found that we can process the XDP file generated from PDF to acheive this. I created the XDP file out of the PDF template created in designer. But I don't know how to merge data from database into that XDP file in respective fields and again convert this XDP file back to PDF programmatically. Can anybody help me ? This is urgent.
    Thanks in advance.
    Sambhaji

    Please ignore the above code.<br />The following one is correct one.<br />using System;<br />using System.Data;<br />using System.Configuration;<br />using System.Web;<br />using System.Web.Security;<br />using System.Web.UI;<br />using System.Web.UI.WebControls;<br />using System.Web.UI.WebControls.WebParts;<br />using System.Web.UI.HtmlControls;<br />using System.Text;<br />public partial class _Default : System.Web.UI.Page <br />{<br />    protected void Page_Load(object sender, EventArgs e)<br />    {<br />        Response.ContentType = "application/vnd.adobe.xdp+xml";<br />        StringBuilder responseString = new StringBuilder();<br />        responseString.Append("<?xml version='1.0' encoding='UTF-8'?>");<br />        responseString.Append("<?xfa generator='AdobeLiveCycleDesigner_V8.0' APIVersion='2.5.6290.0'?>");<br />        responseString.Append("<xdp:xdp xmlns:xdp='http://ns.adobe.com/xdp/'>");<br />        responseString.Append("<xfa:datasets xmlns:xfa='http://www.xfa.org/schema/xfa-data/1.0/'>");<br />        responseString.Append("<xfa:data>");<br /><br />        responseString.Append("<form1>");<br />        responseString.Append("<TextField1>Homer</TextField1>");<br />        responseString.Append("<TextField2>Simpson</TextField2>");<br />        responseString.Append("<field name ='DropDownList1'>");<br />        responseString.Append("<items save='1'>");<br />        responseString.Append("<text>1</text>");<br />        responseString.Append("<text>2</text>");<br />        responseString.Append("<text>3</text>");<br />        responseString.Append("</items>");<br />        responseString.Append("</field>");<br /><br />        responseString.Append("</form1>");<br /><br />        responseString.Append("</xfa:data>");<br />        responseString.Append("</xfa:datasets>");<br />        responseString.Append("<pdf  href='C:\\Test.pdf' xmlns='http://ns.adobe.com/xdp/pdf/' />");<br />        responseString.Append("</xdp:xdp>");<br /><br />        Response.Write(responseString);<br />        Response.Flush();<br />        Response.End();<br />    }<br />}

  • EBS-R12 Generate XML (with data) from Embedded Data Definition

    Hi
    I'm new to running XMLP/BIP in EBS.
    I have found the extensive set of data definitions and templates in EBS and they work great out of the box.
    I, however, need to make template modifications.
    To this end, a correctly structured XML data template - containing all the data fields - is needed for loading into the template-builder in Word.
    If for example I take the embedded R12 data definition - XLAJELINESRPT.xml - for Posted Payable Invoices, and load it into the template builder, it provides the structure of the data template and not the structure of the output XML data.
    I have tried several ways to run the Data definition through XMLP using the concurrent manager attempting to intercept the generated XML (with data) but it either completes the process and uses the linked output template - producing the PDF - or other output - or if I remove the (output template altogether) it fails with an error.
    Maybe I'm missing an obvious step, but there has to be a way of taking the very comprehensive Data Definitions embedded in R12 EBS and using them in custom report templates.
    If I've totally missed the point, please give me the steps to follow.
    Many thaks in anticipation.
    Mike MacMurray

    HI Mike,
    You cannot load your Data Template into the MS Word Template Builder plugin, as it cannot be run to generate XML this way.
    You have two options to get the data from an XML Publisher Report run as a concurrent program in EBS.
    1) Using the XML Publisher Administrator responsibility, set an end date for both the Data Defintion and Template Definitions associated with the XLAJELINESRPT report.
    2) Leave the concurrent program, Data Defintions and Template Definitions exactly as they are and run the report. Once the report has completed, select the Concurrent Request, click "Diagnostics" then click "View XML". This will open the XML in a new browser window. You can then right click, View Source and then save this document locally.
    You can then load this XML into the MS Word Template Builder and start building your template.
    I hope this helps.
    Regards,
    Cj

  • Problem populating html form fields with data from database.

    I'm using a straight forward piece of code to populate a form with data from a database, to create and 'edit record' page. The code is as follows;
    TO RETREVE THE DATA FROM THE DATABASE;
         $query = "SELECT * FROM $table WHERE newsletter_id = '$newsletter_id'" ;
         mysql_select_db($database) ;
         $result = mysql_query($query, $connect);
         $numRows = mysql_num_rows($result);
         $dbnewsletter_title = mysql_result($result,$i,'newsletter_title');
    TO POPULATE THE FORM FEILD;
    <tr>
              <td width="140"><p class="admin">Newsletter title</p></td>
              <td><input name="newsletter_title" type="text" <? print "value=$dbnewsletter_title";}?> /></td>
            </tr>
    However, when I view the page, the string shows in the text feild, but seems to be split at the point of the first space. So basically only the first word of the string shows in the text field. If I try to print '$dbnewsletter_title' outside of the table, the string is shown in full as it should be.
    Does anyone know what is causing this problem?
    Many Thanks

    Put the value in quotes:
    <?php print "value='$dbnewsletter_title'"; ?>

  • Programmatically generate password for pdf with data from database

    Good day everyone,
      I would like to know is it possible to programmatically generate passwords for pdf??
    The main idea is to enable an automated process of pdf acquiring individualised password from a database (Excel, Access, you name it) and finally sending the pdf to individual recipient. Can I use javascript for this? And if yes, how?? If not, pls do advice me on the appropriate steps.
    Background (for clarity's sake): 
      Currently I am working on developing an automated process for the sending customised, password encrypted payslip to about 80 staff. The entire procedure is pretty much summarized as below:
    mail merg (UBS output in) excel to words -> convert words to pdf -> programmatically password encrypt the pdf -> email to individual recipients.
    Well my current status is - I am quite done with the batch mail merge and convertion part. And batch proccessing of password encryption is not a problem, but the idea is to allow acrobat to retrieve password automatically from a database and not key-in each and every password manually. The batch email for now is another problem but for now I have to work stepwise. (Any ideas on how to do it would equally be valued though! =D)
    System and software using:
    Windows  XP and 7 Professional
    Microsoft Office Proffesional 2010
    Adobe Acrobat X Pro
    I would be really grateful for any relevant replies to my question and any additional thoughts or ideas are welcome!!
    I would to thank any potential saviour in advance!
    Thank you for helping!

    Basically I need to automate the password generation from database extract
    e.g. Excel database with StaffID, StaffName, PayMonth, etc. Then when the pdf is created, its password would be <StaffID>_<PayMonth> which is extracted from excel.
    Is it possible for this to happen?? I dont mine using Javascript, I'll just have to learn it.
    Or how about recommending a program which does that??
    Whichever is fine as long there's a solution!
    Thanks!

  • Load interactive pdf with data from database

    I am trying to understand our options for loading database data into an interactive pdf..?   Some of the data is not stored in the database and needs to be manually entered by the user in the interactive pdf.
    Here is the interactive pdf I'm working with:
    http://www.dcma.mil/dcman/NPP/files/dd1149.pdf
    As I understand it, there are 2 options:
    1.  Create an xml file from the database data.   Users can manually import this xml file into this existing interactive pdf and then manually add the additional data, and save the interactive pdf.
    Would users need to use Adobe acrobat Standard or Pro edition to import the xml data?
    2.  Create a XFA PDF form that's made with LiveCycle Designer.   Can this method create an interactive pdf so that users can enter additional data later and save the pdf?  
       What adobe products are required to use this method?
    thanks for any assistance..
    -D

    Yes,using LiveCycle you could accomplish this easily.Once you have your invoice form ready based on predefined XSD, you can easily update the form data by fetching the values from database using JDBC operation.Also you could email this updated form using Email service.
    Thanks,
    Wasil

  • How create report with data from table and some columns results function ?

    Hi,
    How can i create on apex report region with some columns (of the report) as returned from a table and the other columns as results of plsql functions ?
    for example , I want to create a report like that:
    device last_date error_msg stop/start
    kodak1 06/04/08 null >>
    kodak2 08/03/08 good msg --^--
    kodak3 08/04/08 err msg >>
    3 rows returned
    where the 3 first columns are data returned from the table and the forth column is the result of plsql function (returned for example false) and on that i want to display a button of start ( >> in this example ) or stop ( --^-- in this example)

    Thomas,
    There is no problem here -- this is fully suported scenario.
    1. Bind Table dataSource to Customers node.
    2. Bind individual cell editors to any attribute of customer or any nested node like Address, say create column with InputField as editor, then for "value" property select Customer.Address.Street.
    Your nested nodes (like Address) must be non-singleton, set singleton=false on context designer tab.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Constructing Jtree with data from Database

    Hi
    I am new to JTree and I need some help. My problem goes like this. I have a table in the data base which has data like Folder_Nr, Folder_Name, Folder_Prev_Nr, Folder_Typ_Nr, Folder_Access.
    If the Folder_Nr is 1 and folder_prev_nr =0, then it is a root folder and if folder no is 3 and folder_prev_no is 1 then it is a sub folder of the Folder_Nr 1. and so on is the data. I need to present all these folders in a JTree and be able to dynamically add and delete folders.
    It will be of great help if anyone can provide me with some lead or some source code.
    Thanking u in advance
    BalaaP

    Yes,using LiveCycle you could accomplish this easily.Once you have your invoice form ready based on predefined XSD, you can easily update the form data by fetching the values from database using JDBC operation.Also you could email this updated form using Email service.
    Thanks,
    Wasil

  • How to update image with data from database?

    hi,
    is it possible to update an image object which serves as template with some data from a database table like user name etc. by converting it to image bytes and how? The final image would show user name as part of the image

    anybody?

  • Drop Down list in table with data from database table

    Hi,
    I have created an interactive form in WD ABAP.
    In Context tab I have created the nodes as follows:
    ZSOHEADER node with cardinality 1..1
    |-> MATERIAL node with cardinality 0..n. Under MATERIAL node there are 2 attrib. MAKTX and MATNR.
    I am fetching data from MARA table into an internal table IT_MARA.
    The node MATERIAL is bound to internal table IT_MARA.
    I have created a table with property ' Body rows vary depending on data ' .
    I have only one row in table. The first cell of the row is a drop down field.
    I have bind the field to the node MATERIAL->DATA->MAKTX.
    Now the issue is even though I have created only one row in my table, in preview it is creating as many rows in the table as the no.of records in the internal table.
    I want only one row with the drop down list containing all values of the internal table.
    Kindly suggest what to do.
    Regards,
    Vinod

    Hi,
    In the WebDynpro Context, in the main node create another node like A1 with cardinality 0..n and in this node create attributes TEXT and VALUE.
    Now goto method and in that method using code wizard read the node A1.
    And use the below code snippet sample in your program, i.e. code this under respective method of the webdynpro.
    *Declare the TYPES
    TYPES : BEGIN OF TY_TABLE,
    TEXT TYPE SOMETYPE,
    VALUE TYPE SOMETYPE,
    END OF TY_UOM.
    *Define Internal Table and work area.
    DATA : IT_TABLE TYPE STANDARD TABLE OF TY_TABLE INITIAL SIZE 0,
    WA_TABLE TYPE TY_TABLE.
    SELECT TEXT VALUE FROM TABLENAME INTO TABLE IT_TABLE.
    lr_node_info->bind_table( IT_TABLE ).
    And in the Adobe Form Layout
    Go to Menu of the Adobe LiveCycle Designer:
    Tools>Options..>DataBinding
    In that window you just check the Show Dynamic properties Check Box.
    Now for the Drop Down go the binding tab in object palette and click on the list items and there specify the Internal Table and specify the text as the internal table text field and value as internal table value field.
    OR
    From the WebDynpro Native Library Palette use the Value Help Drop Down and in object pallette goto binding tab and provide the form interface binding. Before this in the WebDynpro goto Context and for the particular field under the properties provide the search help as dictionary search help and specify the name of the dictionary search help.
    OR
    We have another method of setting the Text and Value to the DDL directly in the WebDynpro by coding in the methods, I dont have much knowledge on this.
    Regards
    Pradeep Goli

  • Combo filled with data from database

    i want to display the list of schemas dynamically in a combo box and then display the tables in that schema. i tried a servlet; but the schemas are not displayed.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    public class try extends HttpServlet
         public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
         PrintWriter out;
         res.setContentType("text/html");
         out = res.getWriter ();
         try
         out.println("<html>");
         out.println("<head>");
         out.println("<script language='javascript'>");
         out.println("function one()");
         out.println("{");
         out.println(" ResultSet rs=st.executeQuery('select distinct owner from all_tab_columns')");
         out.println("while(rs.next())");
         out.println("{");
         out.println("var newElement=document.createElement('option')");
         out.println("newElement.value=rs.getString(1)");
         out.println("document.form1.table1.options.add(newElement))");
         out.println("}");
         out.println("}");
         out.println("</script>");
         out.println("</head>");
         out.println("<body>");
         out.println("<form name=form1 action=http://mysystem:9000/servlet/query method=post>");
         out.println("Schema name");
         out.println("<input type=textbox name='user'><br>");
         out.println("Password");
         out.println("<input type=password name='pwd'><br>");
         System.out.println("Password");
         out.println("Table Name");
         DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
         Connection m_connection;
    m_connection = DriverManager.getConnection("jdbc:oracle:thin:@mysystem:1521:oracle8","scott","tiger");
         Statement st=m_connection.createStatement();
         System.out.println(st);
         out.println("<select name='table1' onFocus=one();>");
         out.println("<option value=' '>");
         out.println("</option>");
         out.println("</select>");
         out.println("<br>");
         out.println("<input type=submit>");
         out.println("</form>");
         out.println("</body>");
         out.println("</html>");
         }catch(SQLException s){
              out.println("Trial");
         catch(java.lang.Exception x){ }
    }

    If you're wanting to get data back from the database you're actually going to have to execute a query. The Statement:out.println(" ResultSet rs=st.executeQuery('select distinct owner from all_tab_columns')"); will print out the query you wish to run, showing it to the user, but it won't execute it.
    Try instead:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection m_connection;
    m_connection = DriverManager.getConnection("jdbc:oracle:thin:@mysystem:1521:oracle8","scott","tiger");
    Statement st=m_connection.createStatement();
    out.println("<select name='table1' onFocus='one();'>");
    ResultSet rs=st.executeQuery("select distinct owner from all_tab_columns");
    while(rs.next()){
    String val = rs.getString(1);
    out.println("<OPTION VALUE='" + val + "'>" + val + "</OPTION>";
    rs.close();
    st.close();
    out.println("</select>");

  • Filling checkboxes with data from database

    Hello.
    I need help setting a checkbox value to checked if the corresponding field has "Yes" saved in the database.
    I can do this with textboxes, but haven't figured out how to do it with checkboxes or drop down lists.
    If you can help, please do.
    Thanks.

    In all honesty, problems like this is why programmers tend to make more money than web developers. :) You more or less need to figure out what you want to happen, and then write the code to make that happen. Let me give you an example...
    Let's say we're building a web site that requires people to register and then log in. When they register, they get a checkbox where they can opt in for spam. We've decided to store the user's preference in a database, essentially a field called spam which contains either a "yes" or a "no" value. When the time comes to send out those emails, we simply select all records in the database where that spam field is set to "yes".
    So far, so good.
    If the user decides to check that opt-in checkbox, then we want to set the spam field to "yes". If he already exists in the database, we can use an SQL update statement to set the field. If he doesn't exist, we'll have to create a record for him and set all relevant fields with an insert statement. If he unchecks the box (or leaves it unchecked), then we want to do the same thing but make sure the spam field is set to "no".
    When the user clicks on the submit button, the checkbox is submitted (or not) to the server as one of the parameters. We simply parse the parameters, see if the checkbox was checked or not, then write a little bit of JSP (or Java) code that sends the appropriate SQL statement as above, to the database.
    That's the basic concept.
    There are many slight variations. For example, several web sites will fill in that opt-in checkbox by default every time you visit their site, and you have to uncheck it if you don't want spam. The logic remains the same - just write a little bit of code that sees if the form passed you the checkbox filled in, and then either fill in, or erase the corresponding field in the database.
    (I'm not bothering to add code here because there are many ways to do this, and which way is best really depends on what code college_amy has written so far.)

  • Need help with data from databases

    Hi,
    I need to search several columns in a table, for ex. the Id column and the Headline column. Of cource the id must be connected to the right headline when I want to do something to the data.
    Now I get a Resultset and I have tried out different ways to get the data out from the Resultset but the result doesn't seems to be right. Can anyone help me, please.
    -Thanks-

    You can iterate on your ResultSet if it contains several
    rows.
    Let's imagine you have defined a class Element containing
    the values you want to use.
    List l = new ArrayList();
    // Calling rs.next() put the cursor on the next row
    // and return false if there is no more row
    while (rs.next()) {
    Element e = new Element(rs.getString(1), rs.getInt(2));
    l.add(e);

  • How to fetch latest data from database instead of clicking on Generate report in RSRT?

    Hi all,
    We are not able to get latest data of BEx query.Everytime we have to click on Generate Report  button in RSRT for getting latest value.
    Is there any way to get latest value automatically? We are not doing any changes in query.
    When we click on Generate Report it is fetching data from Database instead of cache,so if it is possible to disable cache or any other workaround?
    We have used time(0TIME) characteristic in query as a formula variable. We have applied a condition on that variable to fetch the first record (latest value). When we click on generate report, it fetches correct value with latest time but when we run the query without generate report, it is not fetching latest value. The cube on which this query is developed, is a realtime cube.
    Regards,
    Zalak

    Once its in the request attributes it would be far better to use JSP Expression Language as well as the JSTL that Malcolm suggested So if the servlet code said:
         request.setAttribute("myList", al);Then using EL and the JSTL tags from <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> the JSP would look something like:
    <c:forEach items="${myList}" var="user">
    <TR>
       <TD><c:out value="${user.name}" /></TD>
       <TD><c:out value="${user.fname}" /></TD>
       <TD><c:out value="${user.city}" /></TD>
       <TD><c:out value="${user.cont}" /></TD>
       <TD><c:out value="${user.age}" /></TD>
    </TR>
    </c:forEach>

  • How to Copy complete structure of a table with data from one database table to another databse table

    I need a sql query to copy structure of table with data from production table of ONLINEBTREKDB database to production table of Archive database.
    I tried this query
    select * into Archive.dbo.Production from ONLINEBTREKDB.dbo.Production p
    but problem is I am able to copy the table schema and data but not able to copy constraints(PK)
    Any Help?
    seema

    You've multiple options
    1. Use generate scripts wizard available in SQL management studio. This is particularly helpful when you want to script out lot of objects. You can also choose to script data as well inside this. This can be launched by right clicking the db, choosing tasks
    -> generate scripts and then selecting required options inside the wizard
    2. Use object explorer and right click and script out table. You can also use search functionality to find object you want inside object explorer
    http://visakhm.blogspot.in/2013/02/object-filtering-using-ssms-object.html
    3. Use query based on INFORMATION_SCHEMA views like TABLES,COLUMNS,CONSTRAINT_COLUMN_USAGE etc to generate the script
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • I have to renew my password every time I want to sign in.

    Please can you help - every time I want to log in to the discussion forums, I get a red message telling me my password has been incorrectly entered. I use the same password and I have to go through resetting it every time. Why could this be happening

  • Issue printout from mail on Mac OS X 10.9

    We have a network printer Konica Bizhub C452 and I have an user when he want to print on this printer from mail under Mac OS X 10.9.2  around one time on 5 he has a error message " Mail a quitté de manière imprévue lors de l’utilisation du module pde

  • Nokia N95 8gb cannot hear anything when I call out...

    When making calls to other mobiles I cannot hear the ringing or the other person but they can hear me. This is very frustrating and costs me a lot of money because it takes four calls to get it to work correctly. I have tried switching to loud speake

  • QBE filtering using "OR" conjunction

    I would like to allow filtering on my table but set the criteria so that one or more specific rows always show up in the search regardless of the criteria entered in the table search headers. Any idea how to accomplish this? It seems that the Filter

  • CFolder enhancement for predefined collab folder creation

    Hi, We are using cFolder for the collaboration of Supply Chain Management-SNC objects as ASN, we have a requirement that an automatic collaboration folder should be created for every SCM -SNC object created in system where SCM-SNC and cFolder have in