form of execution of report with parameters in oracle 10 g

DB and dev rel2 10g, xp
Hi all
I can run Report Builder of forms with this code:
DECLARE
 
v_repid REPORT_OBJECT;
v_rep VARCHAR2(100);
v_rep_status VARCHAR2(100);
v_param VARCHAR2(200) := NULL;
v_valor VARCHAR2(200);
v_url VARCHAR2(2000);
v_repserver varchar2(20) := 'myserver';
 
v_report varchar2(100) := 'D:\REPORT_NAME.REP';
v_PARAMETRO varchar2(100) := '';
 
BEGIN
 
v_repid := FIND_REPORT_OBJECT('MYREPORT'); -- report is an element from object navigator report
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_FILENAME, v_report);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_DESTYPE, cache);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_DESFORMAT, 'pdf' );
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_DESNAME, v_report);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_SERVER, v_repserver);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_OTHER, 'paramform=no '||v_PARAMETRO);
v_rep := RUN_REPORT_OBJECT(v_repid);
v_rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE v_rep_status IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
v_rep_status := REPORT_OBJECT_STATUS(v_rep);
END LOOP;
IF v_rep_status = 'FINISHED' THEN
message(v_rep);
message(v_rep);
WEB.SHOW_DOCUMENT(v_url||'/reports/rwservlet/getjobid'||
SUBSTR(v_rep, INSTR(v_rep,'_', -1)+1)||'?'||'server='||v_repserver, '_blank');
END IF;
 
END;
but I want to run a report with the parameter, that's my problem.

which I think is to create a list of parameters 'tmp' and add a 'p_ename' parameter that contains the value of a text element ": t_ename" who I want to do my report, then add the parameter list parameter to the
run_report_object (myreport, "parameter list");
then
Adds a user setting with the name "p_ename" to my report in Report Builder and test it, but I did it and nothing happens, it runs the report with the data set, not only with the data from the text value of the element?

How to solve this problem?
Thank you

SET_REPORT_OBJECT_PROPERTY (v_report_id, REPORT_OTHER, 'p_deptno =' |:dept.deptno |' paramform = no "");

Change the line preceding with a bellows

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_deptno='||QT||:dept.deptno||QT); --- remember to add QT at your declaration
QT char(1):=''''; -- only at declaration section if you want to add single quote(')

and place it just place of

SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_OTHER, 'paramform=no '||v_PARAMETRO);

your first code posted

I hope this works... :)

Hamid

Tags: Oracle Development

Similar Questions

  • Run the report with parameters when, select the Radio button

    HelloW Guys

    I run my report with the report parameter form now, I want to when I select a radio button and then check if my only the list value = 1 then run A report if my only the list value = 2 then launch report B

    Report A and B contain the same parameter

    What can I do?

    I am writing this trigger button
    DECLARE+.
    al_button NUMBER; +
    pl_id PARAMLIST; +
    pl_id2 PARAMLIST; +
    START to+.
    IF: type = 'A' THEN+.
    IF: RepType = "1" THEN+.
    * pl_id: = Get_parameter_list ('repPara'); -create a parameter list * +.

    IF not Id_null (pl_id) THEN+.
    Destroy_parameter_list (pl_id); +
    END IF; +

    pl_id: = Create_parameter_list ('repPara'); +

    Add_parameter(pl_id,'PARAMFORM',text_parameter,'NO'); +

    * Add_parameter(pl_id,'style_from',text_parameter,:style_from); -passing style ano parameter * +.

    * Add_parameter(pl_id,'style_to',text_parameter,:style_to); -passing style not as parameter * +.

    * Add_parameter(pl_id,'date_from',text_parameter,:date_from); -passing date as parameter * +.

    * Add_parameter(pl_id,'date_to',text_parameter,:date_to); -by the way that date as parameter * +.

    * Add_parameter(pl_id,'category',text_parameter,:category); -passing as the parameter category * +.



    Run_product (rapports,'E:\inventory\Dispatch\d_style_wise_dispatch_Stitching_report.rdf ',+)
    asynchronous, runtime, the file system, pl_id, NULL); +
    ELSIF: Reptype = "2" THEN+.
    pl_id2: = Create_parameter_list ('repPara2'); +

    Add_parameter(pl_id2,'PARAMFORM',text_parameter,'NO'); +

    * Add_parameter(pl_id2,'style_from',text_parameter,:style_from); -passing style not as parameter * +.

    * Add_parameter(pl_id2,'style_to',text_parameter,:style_to); -passing style not as parameter * +.

    * Add_parameter(pl_id2,'date_from',text_parameter,:date_from); -passing date as parameter * +.

    * Add_parameter(pl_id2,'date_to',text_parameter,:date_to); -by the way that date as parameter * +.

    * Add_parameter(pl_id2,'category',text_parameter,:category); -passing as the parameter category * +.


    Run_product (rapports,'E:\inventory\Dispatch\d_style_wise_dispatch_Delivery_report.rdf ',+)
    asynchronous, runtime, the file system, pl_id, NULL); +
    END IF; +
    END IF; +
    END; +

    Need help


    Concerning


    Wasim Ismail

    Dear Shahzab,

    As the parameters except a report type are the same, you can accomplish this task by comparing the type of report just before Run_product.

    You need to re - write the code as below:

    DECLARE
    al_button NUMBER;
    pl_id PARAMLIST;

    BEGIN
    IF: type = 'A' THEN
    IF: RepType = "1" THEN
    * pl_id: = Get_parameter_list ('repPara'); -create a parameter list *.

    IF this is Id_null (pl_id) THEN
    Destroy_parameter_list (pl_id);
    END IF;

    pl_id: = Create_parameter_list ('repPara');

    Add_parameter (pl_id, 'PARAMFORM', text_parameter, 'NO');
    Add_parameter(pl_id,'style_from',text_parameter,:style_from);
    Add_parameter(pl_id,'style_to',text_parameter,:style_to);
    Add_parameter(pl_id,'date_from',text_parameter,:date_from);
    Add_parameter(pl_id,'date_to',text_parameter,:date_to);
    Add_parameter(pl_id,'category',text_parameter,:Category);

    IF: type = 'A' THEN
    IF: RepType = "1" THEN
    Run_product (rapports,'E:\inventory\Dispatch\d_style_wise_dispatch_Stitching_report.rdf ',)
    asynchronous, NULL to run, the file system, pl_id,);
    ELSIF: Reptype = '2'
    Run_product (rapports,'E:\inventory\Dispatch\d_style_wise_dispatch_Delivery_report.rdf ',)
    asynchronous, NULL to run, the file system, pl_id,);
    END IF;
    END IF;
    END;

    Concerning
    Fassi Fihri

  • Report with the query with union and parameters

    Hello

    We have an obligation to create a report with the request, which is the union and parameters.

    I intend to create a database for the report based on a query. But the problem here is that the way to pass parameters in the query.

    Request is something like that

    Select x.a, x.b, x.c
    x
    where x.year =: para1
    and x.status = 'A '.
    Union of all the
    Select x.a, x.b, x.c
    x
    where x.year =: para1 - 1
    and (x.status = 'c' and x.date =: para2 or x.status = 'I' and x.date < =: para2)

    Here x.year in the first select statement must be equal to: para1 and second select statement, it should be: para - 1.

    How this requirement can be achieved?

    Client don't want to separate worksheet, a parameter and another for the actual data that I tried with sys_context and it worked. But the client wants the result in a single sheet only... So I need to change their approach.

    Help, please.

    Thank you

    Hello
    Another option is to convert the request so that you will have the items from the selection
    for example on the query you provided that you can use:

    Select 'Curr' rec_type, x.a, x.b, x.c, x.year, x.date, x.status
    x
    where x.status = "A".
    Union of all the
    Select 'Prev' rec_type, x.a, x.b, x.c, x.year, x.date, x.status
    x
    where x.status in ('c', 'I')

    then, in the workbook, you will be able to create conditions such as:
    rec_type = 'Curr' and year =: para1

    rec_type = 'Prev' and year =: para1-1
    rec_type = 'Prev' and (status = 'c' and date =: para2 or status = 'I' and date)<=>

    Tamir

  • Use the dynamic report with BI Publisher parameters

    Are there tips for reports in BI Publisher? For example, I would use the same report for one person or many people. This would mean that where clause should be added when it is for the individual and is not necessary for the entire population. I don't see a way to dynamically build the report using "Report queries" in the shared components.
    It is easy to build a sql query based on various selection criteria in the Source to a pagethat of the region then gets displayedd on the page but I don't see a lot of flexibility in creating a report with BI Publisher at the Apex.

    How about from the collections?

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • Report with date setting does not button on a form

    Hi all

    I m getting a problem which, although I'm trying to run a report from a form button I get the following error.

    Form-41214: cannot run report warning and get browser error.

    REP-52251: cannot get a job ID 301 output you asked Sam Feb 06 11:12:36 2010 BDT. < P > REP-51026: no exit for post 301

    But if I don't put any date in the date field value, then the report run without any value.

    Please help me if anyone has passed through the problem and resolved.

    Arif

    Hello

    try something like that.

    SET_REPORT_OBJECT_PROPERTY(rep, REPORT_OTHER , 'P_parameter="' || TO_CHAR(:BLOCK.START_DATE, 'dd/mm/yyyy') || '" P_parameter="'|| TO_CHAR(:BLOCK.END_DATE, 'dd/mm/yyyy') || '"');
    

    Sarah

  • How creat a summary report with txt.

    Hi all

    I want to create a summary of the report with .txt, and I disabled the feature of report generation in teststand.

    I created a complex sequence, includes some sub-sequences, example: the UUT is tested on three different temperatures and four different voltages conditon. So I creat three subsequences (different temperatures) there are four steps (different voltages), then mainsequence invoke three subsequences to excute test.

    I only want to get the fail-no summary, include: name of the step-fail, status

    How do I? Thank you very much

    You can use Parameters.Step.Name to get the name of the step failed. You can also use something like Parameters.Step.StepType.Name is 'NI_MultipleNumericLimitTest' to the different types of filter steps.

    To the extent where the string any failure...

    You can check RunState.CallStackDepth to see callers how you deep. Based on this information, you can use RunState.Caller.Caller. (in sequence but of many appellants deep, you are). RunState.Step.Name or. Sequence.Name

    So if the CallStackDepth is 1, you can only use a caller. If it was 2, need to recursively would you use 1 caller and then 2 appellants and so on.

  • Calling stored procedures with parameters with the database connectivity Toolkit

    Hi all

    I'm new to the forum and struggling to find a solution to a particular problem I have in this respect, using the LabVIEW Database Connectivity Toolkit on a project, I am currently working on my work.  I have a database in which I tables and stored procedures with parameters.  Some of these stored procedures have input, output and return parameters.

    I tried to follow this example, but to no avail: http://digital.ni.com/public.nsf/allkb/07FD130746083E0686257300006326C4?OpenDocument

    Such a stored procedure I am working on the implementation is named "dbo.getAllowablePNs", running "SELECT * from DeviceType" (DeviceType is the table).  In this case, it requires no input parameter, it has an output parameter that generates the table [cluster] and has a return parameter that returns an integer value (status code for execution) to show if an error occurred.  The DeviceType table has 3 columns; ID (PK, int not null), PN (nvarchar ((15), null) and NumMACAddresses (int, null).)  I have surpassed many examples and I talk to the support OR try to implement this and similar procedures stored in LabVIEW but have not been successful.  I am able to connect to the database with the VI of open connection without error, but spin in some confusion as a result of this step.  I then try to use the VI of parameter query create to call the stored procedure and set the parameters.  I guess I would then use the Set parameter value for each parameter that is connected to the entry of parameters on the previous query with parameters VI VI?  I am also having some confusion during and after these steps as well.  I would greatly appreciate advice or suggestions that anyone could have in this situation because I am not a SQL expert.  Also, I would be happy to provide more information that might be useful.

    Kind regards

    Jon

    Here's what I use to do this.  I think I had to change him create parameterized query VI for him to work.  There is a post on the forum about this somewhere.

  • Simple report with parameter requirement does not

    I have a simple report, select rows from a table when the date is earlier than a date variable. I have a page with a switch of date and a button element. The button links to the report page and assigns to P3_AS_OF_DATE P2_SELECT_DATE. Page 3 includes & P3_AS_OF_DATE. in the title of the region, as an element of display, and in which paragraph of the report. However, when I click on the Run_Report button on page 2, the date selected on page 2 does not appear on page 3. I can't understand what Miss me.

    I've reproduced my code at https://apex.oracle.com/pls/apex/f?p=4550 & ws = Larimer using assistance/Viewer to connect. The application is called report with Date setting.

    Thank you!

    (There is more to the condition that, so obvious alternatives as an interactive report are not a solution).

    mdwyer wrote:

    I have a simple report, select rows from a table when the date is earlier than a date variable. I have a page with a switch of date and a button element. The button links to the report page and assigns to P3_AS_OF_DATE P2_SELECT_DATE. Page 3 includes & P3_AS_OF_DATE. in the title of the region, as an element of display, and in which paragraph of the report. However, when I click on the Run_Report button on page 2, the date selected on page 2 does not appear on page 3. I can't understand what Miss me.

    I've reproduced my code to https://apex.oracle.com/pls/apex/f?p=4550&ws=Larimer with assistance/Viewer to connect. The application is called report with Date setting.

    The button performs a redirect. This means that the page is not filed and the value of P2_SELECT_DATE is therefore not saved in session state. When the form values should be stored in the database or used in the treatment later, you must enter them in session state using a button that submits the page. Next navigation should be performed using a direction rather than a redirect. The example has been changed to make it.

  • How can I recover file in table form in a modal window with the id of the request.

    Dear all,

    I use Apex 4.2 worm.

    I've created classic report with 5 columns and add additional column with the name "ADD COMPONENT" link in classic report.

    I call in a table in a modal window, click on link add COMPONENT classic report. .

    Modal window is popup when I click on the link add COMPONENTS , but it does not have any record of respective "Reservation_id and Res_line_id" I have place in link add COMPONENT report Classic.

    How can I view respective folder of reservation_id and res_line_id in table form in the modal window.

    I create in my account. You can view using

    Workspace: APEX_ISSUE

    User:               [email protected]

    Password: kaushik1@34


    Application 71690 - questions

    Page not 13

    Tab: In the form of modal window.

    Thank you

    Hi Maxence,

    CORINE wrote:

    It is wounderfull but I use the Apex 4.2 worm. There is no dialogue option and page mode.

    So how can I do that in Apex 4.2 worm.

    Check this old similar thread that runs in 4.2 APEX where I explained step by step: How to extract the values inside the jquery element dialogue modal rigion

    Also check the options of the iframe for your application sholud be set to 'Allow' or ' Allow from same origin.

    Edit Application Properties-> security-> the browser-> Embed security Connectionwithsuchprocedures-> is set to 'Allow' or 'Allow same origin'

    Hope this helps you,

    Kind regards

    Jitendra

  • Integrate Oracle report with Oracle Application Express [secure]

    Hi Experts,

    I need to call the Oracle of Oracle Application Express report.

    Here is the version of the product

    Report & Oracle FMW 11g R2 (11.1.2) form

    Oracle Application Express 4.2.5.00.08

    Oracle Database 11 g Release 11.2.0.4.0 - 64 bit Production

    My question is, how I could integrate Oracle report with Oracle Application Express to secure the vocation of Oracle report.

    Please, help me.

    936969 wrote:

    Please give me a solution which can call Oracle report in secure mode, any user can not run the same copy of report the url. report by those who have access/role in the application to run.

    Take a look, the Operations of Service Web Oracle reports , it can help you.

    http://docs.Oracle.com/CD/E24269_01/doc.11120/e24479/pbr_webservice003.htm#CIABJEAB

    Especially see runJob

    http://docs.Oracle.com/CD/E24269_01/doc.11120/e24479/pbr_webservice003.htm#BABEJCFH

  • Bug? : cannot execute predefined "last awr" report with the latest version of the SQL Developer

    Using sql developer before 4.x... report works fine

    Using SQL developer 4.0.0.13... report fails with ORA-01422

    using the actual query to generate awr against the same range of component snap works perfectly

    I opened a SR on the question

    Thank you

    It's always a good idea to open a SR when you are able.  I assume that you have already received a response from support.  For others I wondered about this, the question is likely related to running the report against a CCR environment, as indicated in the following bug:

    Bug 18132564 - LAST AWR REPORT FAILS WITH ORA-01422 IN CCR ENVIRONMENTS

    The call of the AWR report requires parameters for a DB and an ID of Instance, so that the report should run, as in earlier versions, for only the current instance, or be modified to run all instances in the cluster.

    Kind regards

    Gary

    SQL development team

    P.S.: And, in fact, a discussion prior forum - ai2 4.0-AWR and ASH giving ora-01427

    lead following bugs are connected and supposed to be fixed for SQL Developer 4.0...


    Bug 17481944 - PERFORMANCE PANELS NEED AWR/ASH/ADDM FOR RAC ENVIRONMENTS SUPPORT


    ... with the developer commenting

    I've added a number instance selection control to the various reports: ASH,.
    AWR, difference and SQL. The control is supposed to be visible when the
    connection is a RAC system, tests should a RAC.

    So if you are not on a RAC system, or are on CARS but do not see the selection number instance control, please let us know.

    Post edited by: Gary Graham

  • Run SQL through batch file, with parameters

    Hi all

    I run SQL through Batch files before, but I am a little confused with the execution of the sql with parameters. For example, if I have a named sql file:
    insert.sql
    
    Insert into TableA
     select * from TableB
     where service_dt >= '&&x_start_dt' and service_dt <= '&&x_end_dt';
    I can run this problem normally, but including the substitution variables, as in the batch (.bat) file called Execute_insert.cmd is a bit annoying... I played a little with it and cannot operate.

    Any help would be appreciated.

    Thank you
    Ed

    Change your insert.sql to something more like:

    Insert into TableA
     select * from TableB
     where service_dt >= TO_DATE('&1', 'format mask') and
           service_dt <= TO_DATE('&2', 'format mask');
    

    Then, would you call it:

    sqlplus user/password @insert.sql 01-oct-2012 31-oct-2012
    

    John

  • What is recommended? Forms 10 g or 11g with R12?

    Hello

    We are planning an upgrade of 11.5.10 R12 and want to know what is the version recommended Forms Builder to that migrate us?

    Should migrate us to Forms 10 g or 11g?

    Can someone please share their views as to which version is better?

    Thank you
    Priya

    We are planning an upgrade of 11.5.10 R12 and want to know what is the version recommended Forms Builder to that migrate us?

    Should migrate us to Forms 10 g or 11g?

    Can someone please share their views as to which version is better?

    You must use 10g to 11g is not yet certified with R12 - using the 10.1.2 OracleAS forms and builders reports with Oracle Applications Release 12 [444248.1 ID]

    Thank you
    Hussein

  • Data model - dynamic query with parameters

    Hi friends, is it possible to dynamically call a query using the parameters of the data models?

    I try to have a BEEP report with data model something like that

    Data model
    Param1

    Q1 = Select * from table 1
    Q2 = Select * from table 2

    If Param1 = X then
    FinalQuery = Q1
    On the other
    FinalQuery = Q2
    End

    Any help is greately appreciated.

    Thank you
    SAI.

    Take a look at the following:

    http://www.Oracle.com/global/de/community/BIP/tipps/dynamische_queries/index_en.html

    http://blogs.Oracle.com/XmlPublisher/files/BIPublisher_dynamic_column%20Blog.PDF

    Thank you!

  • ORA-01481 when we click on the report with link column.

    Request Express 3.1.0.00.32

    I have a sql on a form page report with a column that clickable allowing the end user to quickly change the values.
    I seem to have is because there is a mask of format on the column ($1234,56) I get the error
    ORA-01481: invalid number format model
    Unable to fetch row.
    Googling the error came up with "check your manual.

    Under format of date column / number, I'm using the following:
    FML999G999G999G999G990D00
    The column in the database is number (15.2)

    The only value I'm passing is the pk_id which is present in the case of the URL:
    http://...f?p=293:2:3616213833707847::NO::P2_PK_BUDGET_ID:1
    Anyone had this problem and if so found a work around?
    Thank you.

    Leland,

    The error was caused by apply you the mask of YYYY format a number field. I changed a switch of dates for a list of selection and gave you an LOV query that would give you the current year, the last 3 years and the next two years. You can adjust that, according to the needs. I also put the definition LOV to accept other values incase you had a value in the db that was not in the LOV I've defined.

Maybe you are looking for