Pass a ViewObject as a data parameter into Oracle Reports

Can I pass a ViewObject as a data parameter in an Oracle Reports jsp Report?

you can use impliment this script to your query get data from file
function AfterPForm return boolean is
infile text_io.file_type;
linebuf varchar2(3000) := '';
filename varchar2(100);
v_employee_id varchar2(2000);
begin
filename := :P_file_name; /* you can pass the file name like this c:\temp\test.txt */
infile := text_io.fopen(filename,'r');
loop
text_io.get_line(infile,linebuf);
v_employee_id := v_employee_id| |linebuf| |' ';
end loop;
if text_io.is_open(infile) then
text_io.fclose(infile);
end if;
exception when no_data_found then
text_io.fclose(infile);
v_employee_id := replace(rtrim(v_employee_id),' ',',');
:p_employee_param := 'and employee_id in ('| |v_employee_id| |')';
/* you can use either 'where employee_id in ('| |v_employee_id| |')' or
'and employee_id in ('| |v_employee_id| |')' */
return (TRUE);
end;
I think it will help you to solve your problem. Do not forget to put &v_employee_param
Good Luck
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by gvardhan:
The file will have one EmployeeID per line as follows
100
200
...<HR></BLOCKQUOTE>
null

Similar Messages

  • How to pass in a parameter into a report viewer on a jsp - and hidden

    Hi, I've built a php application and am using the java environment to enable the crystal report/viewer.  The developer was looking how to pass in a parameter into a report viewer on a jsp. Ultimately the end product we need is to get an HTML report viewer loading a report file with hidden parameters so to not expose other customer data (it's a shared database for multiple customers) preferably loaded from php using maybe the php java bridge. Would anyone happen to have any sample code or any guidance?
    <%@ page contentType="text/html; charset=UTF-8"
       pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer"%>
    <%
    // just a test to grab rpt name from GET
    String rptFile = "report_files/" + request.getParameter("rpt");
    %>
    <crviewer:viewer reportSourceType="reportingComponent" viewerName=""
    isOwnPage="true">
       <crviewer:report reportName="<%= rptFile %>" />
    </crviewer:viewer>
    Many thanks in advance!
    Mark

    I am not aware of any html tags you can pass to the viewer for parameter values.  Normally, you would load the report in code and then use the SDK with the report object to pass parameter values.

  • Pass multiple values as single input parameter into pipelined function

    Hi all,
    My need is to pass multiple values as single input parameter into pipelined function.
    For example - "2" and "3" are values of input parameter "t":
    with data as (
    select 1 as t from dual union all
    select 2 as t from dual union all
    select 3 as t from dual union all
    select 4 as t from dual union all
    select 5 as t from dual
    select * from data where t in (2,3)Is it possible at all?

    Not exactly sure, but usually 'multiple values'+'pipelined function' = some IN-LIST related approach?
    See:
    SQL> create table data as
      2  select 1 as t from dual union all
      3  select 2 as t from dual union all
      4  select 3 as t from dual union all
      5  select 4 as t from dual union all
      6  select 5 as t from dual;
    Table created.
    SQL> --
    SQL> CREATE OR REPLACE FUNCTION in_list (p_in_list  IN  VARCHAR2)
      2  RETURN sys.odcivarchar2list PIPELINED
      3  AS
      4    l_text  VARCHAR2(32767) := p_in_list || ',';
      5    l_idx   NUMBER;
      6  BEGIN
      7    LOOP
      8      l_idx := INSTR(l_text, ',');
      9      EXIT WHEN NVL(l_idx, 0) = 0;
    10      PIPE ROW (TRIM(SUBSTR(l_text, 1, l_idx - 1)));
    11      l_text := SUBSTR(l_text, l_idx + 1);
    12    END LOOP;
    13 
    14    RETURN;
    15  END;
    16  /
    Function created.
    SQL> --
    SQL> select *
      2  from   data
      3  where  t in ( select *
      4                from   table(in_list('1,2'))
      5              );
             T
             1
             2
    2 rows selected.http://www.oracle-base.com/articles/misc/dynamic-in-lists.php
    or
    http://tkyte.blogspot.nl/2006/06/varying-in-lists.html

  • How to pass bind variable into oracle reports 6i - Parameter form

    Hello All,
    I want to pass bind variable into Oracle Reports 6I - Parameters.
    I have tried out that but got the below error :-
    rep-0781 : Bind variables are not allowed in the select statement
    Kindly help me is there any option which allow me to pass bind variables into Oracle reports 6I.
    Thanks
    HARSH SHAH

    Hi,
    may be its not possible to use :P_PARAM1 in user parameter of oracle 6i reports
    but u can full fill user requirement using oracle forms
    create a form as like as report parameter window
    then create parameter list and run report
    PROCEDURE Run_Emp_Report IS
      pl_id ParamList;
    BEGIN
      pl_id := Get_Parameter_List('tmpdata');
      IF NOT Id_Null(pl_id) THEN
        Destroy_Parameter_List( pl_id );
      END IF;
      pl_id := Create_Parameter_List('tmpdata');
      Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
      Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END;
    thanks
    mostafiz mitul
    Dhaka Bangladesh

  • Pass the file id or a parameter from a report (10g) to the distribution.xml

    Is there any way to pass the file id or a parameter from a report (10g) to the distribution.xml file?

    Hi,
    Please review article ID 273960.1 on metalink.
    The article actually describes an issue one may run into while enabling a reports distribution xml file to accept dynamic values, but you can extract the answer you're looking for by studying the above mentioned note.
    Best Regards and Good Luck,
    Mircea.

  • Need Help Urgently - Want to Load Time Data Automatically into Oracle HRMS

    Hi All,
    I am on my 1st Oracle HRMS project and I need urgent help on HOW TO load Time (IN/OUT) Data from a MS Access database which is populated by a Biometric Hand Geometry System.
    And we need to do it in real time as the data inserted in the MS Access Database we need to pull that into Oracle HRMS for Payroll purposes.
    If somebody can help me in this I'll greatly appreciate that.
    Thanks, AGAIN IT IS VERY URGENT
    Zee

    Zee,
    Let's go back to your core requirement "load Time (IN/OUT) Data from a MS Access database which is populated by a Biometric Hand Geometry System".
    Questions:
    1. Is this time data to be used to pay a person through Oracle Payroll?
    2. What legislation (country) is this for?
    3. Are you using Oracle Time and Labor (OTL) as the front-end or do you intend to enter the data directly into Oracle Payroll?
    See the following OTL documents:
    MetaLink Note 369022.1 - How Can Hours Worked Be Imported into OTL From Third Party System?
    MetaLink Note 223987.1 - Oracle OTL HXC TimeStore Deposit API
    MetaLink Note 283593.1 - Formatting an Exported Timecard Template using Microsoft Excel
    Regards,
    Greg

  • Need guidline to attach Date picker in Oracle report

    I need to take the input from the date picker in oracle report (in runtime parameter form). Pls. help me if any one can

    Do not use the built in parameter form, but create your own. If you are calling Reports from Forms, create a Form where you can enter the parameters. For the date parameter, you can create the Forms field with a date picker.

  • Facility into Oracle report 9i for Calendar

    Is there any facility into Oracle report builder 9i for Calendar object?

    Hi,
    there is no any opition in oracle report 9i for Calendar if u wanna add Calandar object in ur report 9i then make report parameter form in form9i then add calandar object in forem 9i then call ur report from that parameter form bcoze in form 9i u have opition to add calendar object
    Rizwan

  • Data Link In Oracle Report

    Hi,
    What is the significance of group level data links in oracle reports?How is it different from data links that select column from each groups?
    Thanks

    Hi user;
    Please check below and see its helpful:
    [Link 1|http://download-west.oracle.com/docs/html/B10602_01/toc.htm]
    [Link 2|http://www.oracle.com/technology/software/index.html]
    [Link 3|http://download.oracle.com/docs/html/A73172_01/output/bawor_re.htm]
    [Link 4|http://www.softwaregeek.com/reports-oracle-10g/p1.html]
    Regard
    Helios

  • How to pass Parameter to Oracle Report from portal

    Dear All
    I create a report use Oracle Report, and the file name is "Account.rdf"
    This report have a start date parameter and a end date parameter. I put this
    report to the report server, and then add a new entry to the cgicmd.dat file,
    so i enter the URL into IE and pass the start date and end date parameters to
    the report.
    And now, i want to put this report into portal, but how can i config the
    start date parameter and the end date parameter?? i want provide a interface
    to the end-user, so user can select which date he want to display. It is
    possible?? How can i config?? Would you give me some idea.
    Thanks for your help.
    Tony

    You will have to Register your .rdf in Oracle Portal. The following document gives details.
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=170178.1

  • How to insert date value into oracle?

    hi,
    iam reading date from xml using vb.net and inserting it into oracle table.
    the date value in xml file is in the format of "01012003".
    i want to insert into oracle table.but iam getting an error "ORA-1843: not a valid month".
    how to solve this problem.
    Any suggestions or examples...

    That's not a date. It's just a string. Convert it to a date using,
    DateTime d = DateTime.ParseExact("01022003", "MMddyyyy", null);
    or
    Dim d As DateTime = DateTime.ParseExact("01022003", "MMddyyyy", Nothing)
    and then bind it to a parameter. ODP.NET will take it from there.
    You should never be hard-coding the date literal into your SQL query.
    David

  • XML data insert into Oracle

    Hi all,
    I have some xml data which i would like to insert into oracle tables.
    Where to start up with this?

    Hi,
    Here's another good place to start: [XML DB FAQ|http://forums.oracle.com/forums/thread.jspa?threadID=410714&tstart=0]
    You seem to be especially interested in second post in there.
    Regards
    Peter

  • Insert statement with Date, time into Oracle

    Hi,
    I've got the following statement that I'm trying to insert into Oracle. Actually had to change up the format to dd-mm-yy to get it to insert the date correctly, not sure why, but I've got it "supposedly" formatted to also insert the hours, min., seconds into the db record, but it's not catching it.
    My code:
    INSERT INTO VOTETBL
    (CHANGE_CTRL_ID,BUSVP,BRANCH,VOTE,VOTE_TIMESTAMP)
    VALUES (?, ?,?,?,to_date(sysdate, 'dd-mm-yy hh24:mi:ss'));Shouldn't the sysdate capture all those elements sufficiently? The day, month, year get inserted correctly with this, but not so for the time portion.
    Any suggestions is welcomed.
    Thx.

    ok, thanks.
    I tried making a result set with the following:
    Statement stmt = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    ResultSet rst = stmt.executeQuery("select to_char(sysdate) from dual");
    Date dualtimestamp = (rst.getDate("sysdate"));But it makes the servlet blow up! Not sure why either, because if I enter that exact statement in Oracle, it pulls back the date and time just like I aim to. But not embedded in the result set statement within the servlet.
    It breaks up somehow and doesn't get that result!

  • Mainframe data loaded into Oracle tables - Test for low values using PL/SQL

    Mainframe legacy data has been copied straight from the legacy tables into mirrored tables in Oracle. Some columns from the mainframe data had 'low values' in them. These columns were defined on the Oracle tables as varchar2 types. In looking at the data, some of these columns appear to have data that looks like little square boxes, not sure but maybe that is the way Oracle interprets the 'low values' in the original data into varchar. When I run a select to find all rows where this column is not null, it selects these columns. In the results of the select statement, the columns appear to be blank, however, in looking at the data in the column using SQL Developer, I can see the odd 'square boxes'. My guess is that the select statement is detecting that something exists in this column. Long story short, some how I am going to have to test this legacy data on the Oracle table using Pl/Sql to test for 'low values'. Does anyone have any suggestions on how I could do this????? Help! The mainframe data we are loading into these tables is loaded with columns with low values.
    I am using Oracle 11i.
    Thanks
    Edited by: ncsthbell on Nov 2, 2009 8:38 AM

    ncsthbell wrote:
    Mainframe legacy data has been copied straight from the legacy tables into mirrored tables in Oracle. Not a wise thing to do. Mainframe operating systems typically use EBCDIC and Unix and Windows servers use ASCII. The endian is also different (big endian vs little endian).
    Does anyone have any suggestions on how I could do this????? As suggested, use the SQL function called DUMP() to see the actual contents (in hex) of these columns.

  • Insert date time into oracle database from jsp

    pls tell me ,from jsp how can I insert datetime values into oracle database .I am using oracle 9i .here is codethat i have tried
    html--code
    <select name="date">
    <option selected>dd</option>
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    </select>
    <select name="month">
    <option selected>dd</option>
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    </select>
    <select name="year">
    <option selected>dd</option>
    <option>2004</option>
    <option>2005</option>
    <option>2006</option>
    <option>2007</option>
    </select>
    here the jsp code
    <% date= request.getParameter("date"); %>
    <% month= request.getParameter("month"); %>
    <% year= request.getParameter("year"); %>
    try
    { Class.forName("oracle.jdbc.driver.OracleDriver"); }
    catch (ClassNotFoundException exception)
    try
         Connection connection = null;
         out.println("connectiong the database");
    connection = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:orcsid","scott","tiger");
    out.println("connection getted");
         int rows = 0;
         String query_2 = "insert into mrdetails values(?)";
         String dob = date+month+year;
         prepstat = connection.prepareStatement(query_2);
         prepstat.setTimestamp(4,dob);
         rows = prepstat.executeUpdate();
         out.println("data updated");
    catch (Exception exception3)
    out.println("Exception raised"+exception3.toString());
    }

    To insert date values into a database, you should use java.sql.Date. If it also has a time component, then java.sql.TimeStamp.
    Your use of prepared statements is good.
    You just need to convert the parameters into a date.
    One way to do this is using java.text.SimpleDateFormat.
    int rows = 0;
    String query_2 = "insert into mrdetails values(?)";
    String dob = date+"/" + month+ "/" + year;
    SimpleDateFormat sdf = new SImpleDateFormat("dd/MM/yyyy");
    java.util.Date javaDate = sdf.parse(dob);
    java.sql.Date sqlDate = new java.sql.Date(javaDate .getTime);
    prepstat = connection.prepareStatement(query_2);
    prepstat.setTimestamp(4,sqlDate);
    rows = prepstat.executeUpdate();
    out.println("data updated");Cheers,
    evnafets

Maybe you are looking for

  • Can't grab Object under another Object

    Hi, I hope somebody can help me with this: In one of my slides I have two highlight boxes which occur at different times during the slide. One is larger than the other, and the smaller one fits entirely within the border of the larger one. The proble

  • Is ADOBE CS5 Supported by THE LION..

    i just got CS5 had to wait to intall snow lepoard..?

  • Color profile confusion

    I'm using Windows 7 home premium, Lightroom 5.2 RC, Photoshop CS6. After working on an image in Lightroom, I went to Photoshop to do some finishing. In the process I wanted to convert the profile from prophoto to sRGB. I expected to see the choice of

  • Why isnt my sound working on my mac book pro?

    All it says is Mac OS X Version 10.6.8. 2.66 GHz Intel Core i7. Start up disk: Macintosh HD. I've been on system pref and the output at the bottom i cant even move it only select if i want it on the menu bar.. its annoying me so much. and i beleive i

  • Disabling Mac OS X Mavericks "App Nap"

    Does anyone have any ideas how to defeat the new Mavericks App Nap feature?  http://www.apple.com/osx/advanced-technologies/  I have an application that can't go to sleep on the job. It is easy enough to disable it on my own machine using the "Preven