Change Reports query from Form

Hi,
Can I use PL/SQL in a Form to modify or add to the Report's query in runtime?
i.e
If a Text Item in a form was left blank in then I would like to modify the WHERE clause
in the Report to remove one of the parameter defined.
in Report's query
WHERE a.myfield >= :p_1 and a.myfield <= :p_2
become
WHERE a.myfield >= :p_1
if the Text Item in form (for p_2) was left blank.
Any help would be greatful.
Many Thanks,
Buntoro

Hi,
you can use lexical parameter to do this thing
It's better if you change your query to
select * from emp where &where_clause
here,
where_clause is a parameter with some default value. U must give some default value to it.
ans then pass this parameter from form..
hope it will help you...
...

Similar Messages

  • 4.5 to 6i migration or report calling from forms in XE???

    Hi Friends,
    I really appreciate your helping tendency. Let me explain the whole scenario.
    My application basically consists of
    Forms [32 Bit] Version 5.0.6.8.0 (Production)
    Report Builder 3.0.5.8.0
    Oracle Enterprise Edition Release 9.2.0.1.0 - Production
    Now we migrated our database into Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production. After the migration all the existing forms and report individually were running without any problem. But there was a huge problem. Whenever I tried to call any report from any form the report engine appeared and then stopped responding. So report calling from forms was not possible after the database migration. I was suggested by someone from OTN forum to migrate my forms and reports into 6i. I have started doing the migration using ifcmp60. WIth forms 6i, reports can be called from forms. But I am facing problem in every other steps. There are many things are not working after the migration though the migration log shows no error. For example, COMMIT_FORM, EXECUTE_QUERY (for detail table), LOV, TOOL.GETVAR lots of things are not working.
    My application has 200 forms and 250 reports.
    Please help and advise on:
    How to call reports from form when the database is XE Or
    How to overcome the stated migration problem
    Rgds,
    Luther

    Dear Mark:
    I have two choices. I can either migrate to 6i or I can go with the existing 4.5. If I go with 4.5 ......the reports are not being called from forms. This problem is happening after I changed the database from 9i to XE. Please advise what to do so that I can keep my forms in 4.5, database in XE and can call reports from forms.
    Rgds,
    Luther

  • Start report server from forms.

    Hello everybody, merry chrismats to all.
    Im working with Forms & Developer DevSuite in Red Hat Linux ES/AS.
    Sometimes when I call a report from form using RUN_REPORT_OBJECT the report server is up & working but the forms dont find it & say FRM-41213 error, but after trying sometimes it begin to work.
    Question : ¿ Is there anyway to start and stop report server from forms ?
    Thanks in advanced & regards.

    Hello,
    For all queries involving testcases or queries that are potentially bug related
    we recommend you log a Service Request (SR) with Support via Metalink (http://metalink.oracle.com).
    This will ensure your query is tracked appropriately and any urgent requests can be
    dealt with in a timely manner by Global Support Services. May we also take this opportunity to remind you that the Metalink Library pages contain many Forms / Reports
    articles which could be of use to you.
    Best Regards
    Denis SEGARD

  • How would I display paper report, called from forms?

    I want to call reports 9i, from forms 9i, and display the paper report on the screen. How would I do this? So far I have gotten forms to call the report and give me a status back of FINISHED, but I don't see anything displayed on my screen.
    Thank you.

    Hi,
    you use the Forms Web.Show_Document() built-in for this. Please read http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
    Frank

  • Accessing clustered report servers from Forms

    Hi
    The "Oracle Fusion Middleware Publishing Reports to the Web with Oracle Reports Services 11g R2 (11.1.2)" manual in Section 2.5 talks about setting up a High Availability environment for Reports.
    It discusses how to set the cluster configuration and how to create a reports job repository in the database. It says that you need to have a unique name for each report server, finally it says that you should use Oracle Web Cache to load balance for the reports cluster.
    If you are calling the report server from Forms with a run_report_object then you don't go via the web cache, so I am confused how you send your report request to the reports cluster in a load balanced fashion.
    Has anyone done this or can explain how this works for Forms?
    TIA
    Tony

    I know that this is an old thread, but I've taken the liberty to bump it up, as I have the same question.
    The Reports documentation describes quite succinctly how to configure the report servers to be clustered - no problem there.
    The issue is that when you run a report from forms using run_report_object, you are required to specify a report server name. The Reports docs specify that all of the server names must be unique, so this seems to indicate that you cannot use a clustered report server environment from Forms, or am I missing something somewhere? Oh, wait - an insight coming here - Can you (I'll test this, but it would be good to know) specify a cluster name instead of an actual report server name? Google to the rescue:
    Using RUN_REPORT_OBJECT: If the call specifies a Reports Server cluster name instead of a Reports Server name, the reports_servermap environment variable must be set in the Oracle Forms Services default.env file. If your Oracle Forms application uses multiple Reports Server cluster names, you can map each of those cluster names to a different Reports Server using reports_servermap in rwservlet.properties, as follows:
    There's the answer. Sometimes writing the question down helps figure out the answer :)
    Regards,
    John

  • Calling Crystal Reports XI from Forms 10g

    Any one succeed in calling Crystal Reports XI from Forms 10g,
    or using Import Java Class in Forms 10g
    to call Crystal Reports XI
    or any other method to invoke crystal Reports XI from FORMS
    share your Knowledge to OTN
    please provide me the steps,documents to [email protected]
    Message was edited by:
    user501763

    Hi,
    Use web.show_document for calling the reports. Check out forms online help for syntax and example of web.show_document.
    -Arun

  • How to change a LOV query from Forms Personalization(Doc ID 1534116.1)

    Customer followed the step on Note 1534116.1, but after that close the form and reopening the form , cus is unable to  query the form.
    Please advise.
    Thanks,
    Ling

    Pl post EBS version - what does "unable to query the form" mean ? Any error codes / messages ? Was FRD trace enable to troubleshoot ?
    MOS Doc 438652.1

  • How to change report query dynamically in Oracle APEX?

    Hi,
    I want to dynamically change the where condition in APEX report query. Can anyone help me solve my this problem?
    (Just want to change the query which we change in Oracle Reports using lexical parameter to change &Where, &Order by etc. dynamically!!)
    Thanks, Praful

    Hi
    I've been using flexible queries in APEX for a few years now, and your question just added a whole new dimension to the flexible and powerful nature or writing reports in APEX.
    While APEX Interactive reporting has almost completely removed the need the equivalent of Lexicals in Oracle Reports, I thought it might be fun to try and use lexicals in an APEX report.
    Before we start I should summarise the powerful capability of APEX reporting to have oprtional parameters (lots and lots of them if this is needed).
    For each parameter, you simply add a page item which will hold the value of the parameter.
    The item/parameter can be populated by typing in the value, defining an LOV, using a date-picker etc.
    To make the parameter optional simply use an OR in the where clause.
    So for a apge item P200_PARAM1.....include
    WHERE (:P200_PARAM1 IS NULL
    OR COLUMN1 = :P200_PARAM1)
    This way you can either leave the page item null or type in / select a value from a LOV.
    There is a small quirk in APEX LOV's which sometimes returns a value of '%' or '%null%' - depending on the version - when no value is selected.
    See Patrick Wolf's solution for this at Re: Null value handling in LOVs
    I include this Application Process in all my APEX applications ;)
    Now let's look at using the equivalent of Oracle Reports Lexicals......
    First-off - this is based on the APEX SQL report - NOT Interactive Report.
    It relies on the fact that you can let the query be parsed only at runtime.
    1. Define an SQL report entering the 'core' of your query.
    With a query like SELECT ENAME, JOB FROM EMP
    Select 'Generic Columns' option in the 'Column Headings' section
    Finish the report creation
    2. Define a page item - say P200_LEXICAL - type text on the page
    3. Edit the report and update the SQL query to include your lexical page item
    SELECT ENAME, JOB FROM EMP &P200_LEXICAL. (REMEMBER THE '.' AT THE END)
    Ensure that the option "Use Generic Column Names (parse query at runtime only)" is selected at the bottom of the query
    4. Add a button to the page -using 'Create a button displayed among this region's items' the will submit the page.
    5. Run the page - you will see all the employee names and job desdriptions
    6. Enter a where clause into the 'Lexical' textbox - say "WHERE ENAME LIKE 'K%'" and click the 'Go' button
    Voila! your where clause is magically applied.
    Try any variant you like adding an ORDER BY clause etc...... this is FUN!
    7. Clear the value of the LEXICAL and click go.
    Edit the report and move the &P200_LEXICAL. into the selected columns (or add another one)
    SELECT ENAME, JOB &P200_LEXICAL. FROM EMP
    8. Run the page
    Enter ",SAL" in the textbox and "Go"
    We can add as many columns as we like (subject to the "Maximum number of generic report columns:" set below the SQL query in the report edit section)
    Now because we have all the flexibility in APEX of setting page items using SQL or PLSQL you can set the value of the lexical programatically, or just pre-set a few values in an LOV - the options are limitless.
    While I've never had the need to use lexicals - you can see that APEX provides the most Flexible Lexicals in town.
    Eat your heart out "Oracle Reports"!!!
    Have fun
    Mike

  • Dynamically change sql query (from statement)

    Hi all,
    Is it possible to change the 'from statement' dynamically in
    report 6i? I have 3 identical tables with different names (each
    to collect data in different area) and I want to be able to
    dynamically change the sql query at run time so I can use only
    one (1) report to print data in 3 different tables.
    Is it possible? Thanks for the tip!

    Yes you can. Create a user parameter lets say "frm". give the
    initial value for the parameter as the table a. Ex : FROM EMP .
    Go to the datamodel of the report . Change the query like this,
    Original query => Select * from emp
    Modified query => Select * &frm
    Coz frm has the default value FROM EMP, so it will replace the
    default value. When you call the report from differrent product
    you can pass the parameter value as table a, table b , table x.
    Hope you got your answer.
    Thanx
    Feroz

  • Report Running From Forms

    How to Run a Report from Form Builder
    i use Run_report_object function
    by givng report object name created in form
    report is already created
    i receive error message 'Report Name is not given'
    Kashif Khan
    ------

    Here is an example. This is the when-button-pressed trigger. I use the in-process reports server and therefore the web.show_document, but executing the run_report_object is similar.
    Hope this helps.
    Z.
    DECLARE
    rep_url varchar2(2000);     
    myenvid varchar2(128);
    BEGIN
    -- Check to ensure we have a valid record first
    if :PPS_AIR_MISSION.UNIQUE_ID is null then
    message('No air mission record is displayed to generate the report.', ACKNOWLEDGE);
    message(' ', NO_ACKNOWLEDGE);
    null;
    else
    Tool_env.Getvar('JTLSAAR',myenvid);
    rep_url:='/reports/rwservlet?&envid='||myenvid||'&&report=aar_amhist1.rdf&ssoconn='||myenvid
    ||'&desformat=pdf&destype=cache&paramform=no'
    ||'&MISSION_ID='||
    '"(''' || :PPS_AIR_MISSION.UNIQUE_ID || ''')"' ;
    -- synchronize and run the report
    SYNCHRONIZE;
    WEB.SHOW_DOCUMENT(rep_url,'_blank');
    end if;
    END;

  • How to display the output of a reports called from forms in the same window

    Hi all.
    I have installed Forms / Reports 11g Rel2 developer only installation on my windows 7 box.
    I can successfully call a reports from forms using RUN_REPORT_OBJECT and WEB_SHOW.document, but the report is opened in a new window.
    I'd like to open it in the same widow, in a new tab, similar to ctrl-t and make a call.
    How is that possible?.
    I'm using Chrome 25.0. Could this be done through browser settings?.
    Thanks in advance ...!
    Edited by: myluism on 14-mar-2013 6:09

    Don't know for Chrome, so Google for it.
    One more thing, though. what is the 2nd parameter in web.show_document? Is it '_blank'? If not, try that.

  • How do I reference columns in a report query from another report query?

    In Apex 3.1 it is possible to generate a report on more than one query. I have read that these queries can be correlated, but I cannot find how in the documentation.
    I go the Shared Components and create a new Report Query:
    select * from dept
    Then I click Add Query and I add:
    select * from emp
    How do I correlate these two queries (I want to join emp.deptno to dept.deptno) and have a nice hierarchicle XML-file.
    Is it possible in Apex 3.1?
    Dik Dral

    Dik,
    This type of query can't be build. The two queries are independent, you can't reference values in the first query from the second query. However you can reference page and application items - which won't help you all that much with this scenario though. You could also try combining the two queries into one, and then take care of the proper presentation in your template.
    Regards,
    Marc

  • Report Called from FORMS having Printing Problem

    Hi all
    Guys i have a report problem in reports 6i.
    I am calling a report from my FORM 6i directly to printer (a dot matrix printer).
    I have set
    Add_Parameter(pl_id,'DesType',TEXT_PARAMETER,'printer');     
    The report is actually a confirmation report and i have given its layout height equal to 3.7 . But when i send it to printer it ejects the paper equal to 11 (equal to height of a portarait report).
    How can manage this ejection from Form or Report Side.
    NOTE : This problem occurs even if print the report from report preview(means not printed directlty from FORM).
    Kindly help me with this if any.
    I need it urgent.
    Thanx.

    Hello All
    The furthur detail to my previous problem is given as follows:
    I am getting problem
    with the Oracle reports. I have a dot matrix printer (Epson LQ-300, which is a
    tractor feed printer). While printing a report which is always not more than half a
    page, the printer does not stop after printing the report(the half page). It stops at
    the end of the page. I mean that half the page is printed and the rest half is blank.
    I want that the printer should print only at half a page. On the blank half it should
    print another copy of same report.
    Regards,
    Qaiser Qayyum Malik.

  • How to change report size from A4 to A3 in Report 6i

    I want to change the size of an existing report in Report 6i from A4 to A3 size. How to go about it? Thank in advance.
    Anil chopra

    Hello Anil,
    Have you tried to click on the property palette of the 'Main Section' under 'Layout Model'. There you can set the Report Width and Height.
    -Marilyn

  • Change Report Status from "completed / passed" to "Completed"?

    With Captivate 5, is it possible to change the Report Status from "completed / passed" to "Completed"? The "completed / passed" given is causing issues with my LMS thus need "Completed" only. Is this possible with version 5 or even version 6?
    Thank you in advance for any help!

    Hi There,
    Thank you for reaching Adobe Community.
    You can select the below settings from Edit > Preferences >  Quiz > Reporting panel. You can change the Status representation to Incomplete > Complete.
    Here is the screen shot frm ScormCloud LMS:
    Thanks!

Maybe you are looking for

  • MORE kernel panics with 10.4.5

    ok so i posted that i had kernel panics after updating to 10.4.1 etc. and after i installed the newest security update to 10.4.5 the kernel panics stopped...for half a month. now all of a sudden as april hits my screen keeps having little mini freeze

  • Soft KeyBoard is not working on ios 7 with Air sdk 3.8

    Hi In my app Soft KeyBoard is not working on ios 7 with Air sdk 3.8. Does any one know soluton for this ?

  • Drill down in Bins

    Created Bins. I to achive drill down in Bins. I Tried acctivating drill option in data format but it did not work. Any other way?

  • Lagacy Patch Clusters or Patches

    I am looking for patches for Solaris 2.5 and 2.6, are patch clusters available for these versions? Regards, Brian Borders

  • Siri in iOS devices

    Hi! Spanihs is my natural language, but i will try comment my idea in your language. I will make all the possible to you understood. First of all, my name is Jhon, and i can not post it at "User Tip Contributions" because it was blocked, for this rea