Running a query only once for a report in Reports 6i in a BEFORE REPORT trigger.

Hello all -
I am using Oracle Reports 6i on Windows NT 4.0 SP 6.0.
The report I am converting from Access to Oracle Reports is
rather complex, and features detail by decile (a rank) within
territory (geographical sales area). Also it features a summary
at the bottom of each territory/decile combination which
summarizes not only the territory information, but goes above
that to higher levels like district, region, and national.
With the help of a consultant, we have managed to get the report
almost finished. However, we are running into a snag with the
summary. While my two main queries need to run in the data
model as normal, I would like to run the summary query _only
once_ during the entire cycle of the report, and have the report
fields populated once for the entire report. This is possible
because for a district, the summary numbers are the same on
every page of the report, only the territory information
changes. So by only having the query run once and fill the
report values once, this would save considerably on the report
runtime.
However, I have tried a few different methods but cannot get the
report to recognize the fields in the query, most likely because
they are out of scope at report creation. Does anyone have any
ideas on how I can accomplish this in Reports? Any help would
be appreciated - I hope my question was clear, if not please let
me know.
Thanks,
-Jennifer Prichard

Hello!
You can place in the data model editor formula and placeholder
columns outside of any groups. I think you need for each of your
summary-attibutes a placeholder column and one formula column.
Use the formula column to populate the placeholders via PL/SQL.
Afterwords you can reference the placeholders anywhere you want.
Regards,
Hajo Winkler

Similar Messages

  • Execute query only once in mapping

    Hi All,
    I hav a scenario where I hav to Query a DB using all the child nodes. the source structure is as follows:
    <root>
         <employee>     -
    0..unbounded
              <empNo>
              <emdpName>
         </employee>
    </root>
    I hav to retrieve all the empNo and frame a query and shud execute the query only once and hav to retrieve the results and store it in a HashMap so that, i can map it to the target structure.
    I had followed JAVIER PORRAS blog. but it seems to be not the executed one. Can any one suggest me how to do it. Any help wud b appreciated.
    Thnx in Adv
    Anil

    Hi,
    My requirement is something like this.
    Source : External System
    Target : BW
    Source Structure:
    <Root>
         <Emp>
              <Col1>
              <Name>
         </Emp>
         <Emp>
              <Col1>
              <Name>
         </Emp>
         <Emp>
              <Col1>
              <Name>
         </Emp>
         <Emp>
              <Col1>
              <Name>
         </Emp>
    </Root>
    I'm getting Data from External System in which a column (Col1) has to be replaced by some other column (Col2)
    which exists in the DB. Col2 can b accessed using a query (select col1, col2 from myTable where col1 = x1 or x2 or x3 etc..). The values of X1, X2, X3 etc hav to be filled using the
    Col1 values of each segment of the <Emp> in the source structure. The condition here is that, i shud execute the query only once for all the values of col1 to prevent the bottleneck.when i get the result, i hav to store it in a hashmap and use the result to map it to the target structure element by element.
    This is my require ment. seems to b exactly the blog of JAVIER PORRAS. but the blog doesn't seem to b the executed one.Any help in resolving this.
    Thnx
    Anil

  • Help: I want to auto schedule a load using file watcher but it runs only once for the first time and after that it is not running at all

    Hi All,
    I am trying  to execute the below code as provided from one of the blogs. i am able to run the job only once based on a file watcher object(i.e. for very first time) and after that the job is not running at all and if  i schedule the job to run automatically based on interval of 10 or more minutes it is executing properly). Please let me know or guide me if i have missed any step or configuration.that is needed.
    Version of Oracle 11.2.0.1.0
    OS : Windows 7 Prof
    Given all the necessary privileges
    BEGIN
      DBMS_SCHEDULER.CREATE_CREDENTIAL(
         credential_name => 'cred',
         username        => 'XXXX',
         password        => 'XXXX');
    END;
    CREATE TABLE ZZZZ (WHEN timestamp, file_name varchar2(100),
       file_size number, processed char(1));
    CREATE OR REPLACE PROCEDURE YYYY
      (payload IN sys.scheduler_filewatcher_result) AS
    BEGIN
      INSERT INTO ZZZZ VALUES
         (payload.file_timestamp,
          payload.directory_path || '/' || payload.actual_file_name,
          payload.file_size,
          'N');
    END;
    BEGIN
      DBMS_SCHEDULER.CREATE_PROGRAM(
        program_name        => 'prog1',
        program_type        => 'stored_procedure',
        program_action      => 'YYYY',
        number_of_arguments => 1,
        enabled             => FALSE);
      DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT(
        program_name        => 'prog1',
        metadata_attribute  => 'event_message',
        argument_position   => 1);
      DBMS_SCHEDULER.ENABLE('prog1');
    END;
    BEGIN
      DBMS_SCHEDULER.CREATE_FILE_WATCHER(
        file_watcher_name => 'file_watcher1',
        directory_path    => 'D:\AAAA',
        file_name         => '*.txt',
        credential_name   => 'cred',
        destination       => NULL,
        enabled           => FALSE);
    END;
    BEGIN
      DBMS_SCHEDULER.CREATE_JOB(
        job_name        => 'job1',
        program_name    => 'prog1',
        queue_spec      => 'file_watcher1',
        auto_drop       => FALSE,
        enabled         => FALSE);
      DBMS_SCHEDULER.SET_ATTRIBUTE('job1','PARALLEL_INSTANCES',TRUE);
    END;
    EXEC DBMS_SCHEDULER.ENABLE('file_watcher1,job1');
    Regards,
    kumar.

    Please post a copy and paste of a complete run of a test case, similar to what I have shown below.
    SCOTT@orcl12c> SELECT banner FROM v$version
      2  /
    BANNER
    Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
    PL/SQL Release 12.1.0.1.0 - Production
    CORE    12.1.0.1.0    Production
    TNS for 64-bit Windows: Version 12.1.0.1.0 - Production
    NLSRTL Version 12.1.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl12c> CONN / AS SYSDBA
    Connected.
    SYS@orcl12c> -- set file watcher interval to one minute:
    SYS@orcl12c> BEGIN
      2    DBMS_SCHEDULER.SET_ATTRIBUTE
      3       ('file_watcher_schedule',
      4        'repeat_interval',
      5        'freq=minutely; interval=1');
      6  END;
      7  /
    PL/SQL procedure successfully completed.
    SYS@orcl12c> CONNECT scott/tiger
    Connected.
    SCOTT@orcl12c> BEGIN
      2    -- create credential using operating system user and password (fill in your own):
      3    DBMS_SCHEDULER.CREATE_CREDENTIAL
      4       (credential_name     => 'cred',
      5        username          => '...',
      6        password          => '...');
      7  END;
      8  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- create table to insert results into:
    SCOTT@orcl12c> CREATE TABLE ZZZZ
      2    (WHEN      timestamp,
      3      file_name varchar2(100),
      4      file_size number,
      5      processed char(1))
      6  /
    Table created.
    SCOTT@orcl12c> -- create procedure to insert results:
    SCOTT@orcl12c> CREATE OR REPLACE PROCEDURE YYYY
      2    (payload IN sys.scheduler_filewatcher_result)
      3  AS
      4  BEGIN
      5    INSERT INTO ZZZZ VALUES
      6        (payload.file_timestamp,
      7         payload.directory_path || '/' || payload.actual_file_name,
      8         payload.file_size,
      9         'N');
    10  END;
    11  /
    Procedure created.
    SCOTT@orcl12c> -- create program, define metadata, and enable:
    SCOTT@orcl12c> BEGIN
      2    DBMS_SCHEDULER.CREATE_PROGRAM
      3       (program_name          => 'prog1',
      4        program_type          => 'stored_procedure',
      5        program_action      => 'YYYY',
      6        number_of_arguments => 1,
      7        enabled          => FALSE);
      8    DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT(
      9       program_name         => 'prog1',
    10       metadata_attribute  => 'event_message',
    11       argument_position   => 1);
    12    DBMS_SCHEDULER.ENABLE ('prog1');
    13  END;
    14  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> BEGIN
      2    -- create file watcher:
      3    DBMS_SCHEDULER.CREATE_FILE_WATCHER
      4       (file_watcher_name   => 'file_watcher1',
      5        directory_path      => 'c:\my_oracle_files',
      6        file_name          => 'f*.txt',
      7        credential_name     => 'cred',
      8        destination          => NULL,
      9        enabled          => FALSE);
    10  END;
    11  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> BEGIN
      2    -- create job:
      3    DBMS_SCHEDULER.CREATE_JOB
      4       (job_name          => 'job1',
      5        program_name          => 'prog1',
      6        queue_spec          => 'file_watcher1',
      7        auto_drop          => FALSE,
      8        enabled          => FALSE);
      9    -- set attributes:
    10    DBMS_SCHEDULER.SET_ATTRIBUTE ('job1', 'PARALLEL_INSTANCES', TRUE);
    11  END;
    12  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- enable:
    SCOTT@orcl12c> EXEC DBMS_SCHEDULER.enable ('file_watcher1, job1');
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- write file (file must not exist previously):
    SCOTT@orcl12c> CREATE OR REPLACE DIRECTORY upncommon_dir AS 'c:\my_oracle_files'
      2  /
    Directory created.
    SCOTT@orcl12c> declare
      2    filtyp utl_file.file_type;
      3  begin
      4    filtyp := utl_file.fopen ('UPNCOMMON_DIR', 'file1.txt', 'W', NULL);
      5    utl_file.put_line (filtyp, 'File has arrived ' || SYSTIMESTAMP, TRUE);
      6    utl_file.fclose (filtyp);
      7  end;
      8  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- wait long enough (may take more than one minute) for job to run:
    SCOTT@orcl12c> EXEC DBMS_LOCK.SLEEP (100)
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- check for results:
    SCOTT@orcl12c> SELECT * FROM zzzz
      2  /
    WHEN
    FILE_NAME
    FILE_SIZE P
    22-OCT-13 10.12.28.309000 PM
    c:\my_oracle_files/file1.txt
            57 N
    1 row selected.
    SCOTT@orcl12c> declare
      2    filtyp utl_file.file_type;
      3  begin
      4    filtyp := utl_file.fopen ('UPNCOMMON_DIR', 'file2.txt', 'W', NULL);
      5    utl_file.put_line (filtyp, 'File has arrived ' || SYSTIMESTAMP, TRUE);
      6    utl_file.fclose (filtyp);
      7  end;
      8  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- wait long enough (may take more than one minute) for job to run:
    SCOTT@orcl12c> EXEC DBMS_LOCK.SLEEP (100)
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- check for results:
    SCOTT@orcl12c> SELECT * FROM zzzz
      2  /
    WHEN
    FILE_NAME
    FILE_SIZE P
    22-OCT-13 10.12.28.309000 PM
    c:\my_oracle_files/file1.txt
            57 N
    22-OCT-13 10.14.08.580000 PM
    c:\my_oracle_files/file2.txt
            57 N
    2 rows selected.

  • How to know that a form is running in query-only mode

    I have a form that can run in query-only mode or non-query-only mode depending on the current user who logs in, and I want to change its apprearance dynamically when it's in different modes (for example, enable or disable buttons). Is there a built-in or system variable from which I know that the form is running in query-only mode or not?
    Thanks,
    Shu

    The global variable solution is what we are using now. I thought there are some unpublished built-in or system variables. In my application, there is a public "menu" form from where hundreds of forms are CALLed with some in query-only mode and some in non-query-only mode depending on the current user role. :PARAMETER.QUERY_ONLY will always be 'NO' because the "menu" form is started in non-query-only mode. But it's good to know about it.
    Thank you very much for your replies,
    Shu

  • Need to display records only once for that particular group

    Hi,
    I have a requirement like displaying repeated records only once for that particular group.
    For eg, in the emp table, I need to display repeated deptno only once for the particular group of job.
    And for the above requirement I have used the below query,
    SELECT empno, DECODE (LAG (job, 1) OVER (ORDER BY job), job, NULL, job),
    DECODE (LAG (deptno, 1) OVER (ORDER BY deptno), deptno, NULL, deptno)
    FROM emp;
    Output:
    EMPNO     JOB     DEPTNO
    7782          10
    7934     CLERK     
    7839     PRESIDENT     
    7876          20
    7788          
    7902     ANALYST     
    7566     MANAGER     
    7844          30
    7900          
    7654     SALESMAN     
    7698          
    But in the above output you can find that, say deptno 10 is getting displayed only once, whereas I want that deptno 10 to be checked whether it is getting repeated within the group of JOB and than hide the deptno 10 only if it is repeated within that job group. If not, deptno 10 should be displayed again.
    Please help me in this.
    Regards,
    Shiva

    Hi,
    Hope the below helps.
    SELECT emp_id, job, deptno,
           CASE WHEN LAG(deptno, 1) OVER (partition by job order by deptno) = deptno THEN null else deptno end
      FROM empRegards
    Ameya

  • FRM-40208: Form running in query-only mode. Cannot change database fields.

    Hi,
    I am using forms 6i where it is calling a form from a menu in query like call_form(,query_only). Now an error is occurring on call of that form ‘FRM-40208: Form running in query-only mode. Cannot change database fields.’ Though this is been handled to give a certain message from on_error message from a package from library.
    Now the issue is that the error keeps on popping even after the ok button is pressed. There are number of records from the table. How can we handle the error. Any suggestion would be really appreciated!!!
    Regards,
    Rajesh

    thanks Gred but i have resolved the issue. it seems that each row was going into query_only mode (program written such a way). therefore the error was showing even after the OK button. handled the issue from ON_ERROR trigger. anyway thanks for your time Gred!

  • How to set a payload field value only once for multiple instances selected?

    The user needs to set a payload field value and then he can approve the task so the task can continue through the process, that's fine when the user selects one instance and sets the value in the task details section and then clicks the approve button, but how do we achieve the same behavior in a multiple way?, I mean the user can select multiple tasks in the workspace (in this case the details task page is not available and instead the following label appear "Multiple tasks selected") then if the user clicks the Actions drop down -> APPROVE he only gets the message "your request was processed successfully", so how can the user modify the payload field value only once for all the selected tasks so when he clicks APPROVE the value is populated in all the instances selected.
    Thanks,
    Carlos.

    In the action which displays the edit page just set the form idx value before displaying the jsp.

  • Why java allow start() method only once for a thread

    Hi ,
    Why java allows start method only once for thread . suppose
    Thread t = new Thread();
    t.start();
    say at later stage if again we call t.start() IllegalStateException is thrown , even though isAlive method returns false.
    Hence the question , why start() method is allowed only once.If you need start a thread , we need to create a new instance.

    Really. Why do you think that? Do you have any evidence? It is one of the first things I would think of, personally.Considering that the Thread API doesn't allow you to specify a stack address (only stack size), I think it demonstrates they wanted to remove that capability from their Thread API all together. That missing "capability" makes me believe they want me to believe it's not something I need to worry about when using their API... I think the exact semantics of the Thread class and its methods were driven by how to make it most understandable and usable for their customers. I'm certain this issue was one of many that was given considerable thought during the design and implementation of the JVM and the underlying runtime classes.
    Do I have any evidence? No. But if you can point me at some first-hand information on this, I'd love to read it. Most of what I've found is second or third hand accounts. (and I mean that sincerely, not as a smart-ass remark or rebuke of your comments).
    On the one hand you seem to think the Java API designers are idiots, on the other hand you think that they should be. I can't make it out.I thought my position was that the Java developers were talented enough to implement platform in whatever way their API called for; hence, the designers made a choice about how they wanted their API to be used by their customers. They decided which capabilities they wanted to include or exclude, and created an API that was consistent with their vision for this technology. While I'm certain technical limitations had an effect on the API design, I certainly don't think the API was dictated by the them.
    I think the current design of the Java Thread API was a reflection of their vision to make Threading easier and more accessible to Joe Programmer, not limitations in the implementation. I never said it was wrong or that I could do better... I just said I think they could have done something different if they decided it would have made for a better customer experience. But hey, maybe I'm wrong.

  • Query retrieval limit for discoverer reports in oracle applications

    Hi,
    I would like to set the query retrieval limit for discoverer reports in oracle applications. Can i have the steps for the same?
    Cheers
    Maytas

    Hi Maytas
    As Michael said the query retrieval limit can be defined by Discoverer Administrator
    like :
    - Discoverer Administrator >> Tools >> Privilege >> Select the user that will see the workbook >> Query Governor tab and there you setup the query retrieval limit.
    Note:
    Normally if you defined the limit for the user via Discoverer Administrator it should work but i saw that this was not happened in my case when i open Viewer so i entered with my eul owner on Discoverer Plus and defined the limit for all the workbooks
    Tools >> Options >> Query Governor >> Limit Query retrieved data to
    Regards,
    Dani

  • Mass activity running only once for custom parallel object

    Hi
    I have created custom parallel object EXT_UI and created mass activity for this but the report in triggered only once and not going for second interval .
    Can any one help me out in this.
    Thanks in advance.
    Chetan
    Message was edited by: CHETAN N P
    Mass activity is running fine for standard object ANLAGE but not for custom one
    Please share me steps to be followed in creating custom parallel object.
    Regards,
    Chetan

    Hi Chetan,
    I think you need to make changes in the Events which gets triggered by the mass activity.
    Can you let me know the mass transaction code for which you have customised the activity,
    Thanks,
    Amlan

  • Need to populate value for a KF only once for a combination of characterist

    Hello All,
    We had a requirement for a report. wherein we need to consolidate the data of the 0FI_GL_4 datasource and a custom table.
    both these sources have only 4 fields in common i.e Fiscal Year/Period; Company Code and Pool
    in the custom table, for each fiscal yr/period & Pool combination, there is a unique Plan value available.
    To consolidate the data, I wrote a routine in the transformation to extract data from the custom table based n the combination of Fisc yr Period, Comp Code & Pool.
    However, since 0FI_GL_4 has more than 1 entry for the above mentioned combination  that is GL_accounts, document number, etc; during extraction, my plan value is being extracted multiple times to the cube and hence for a fiscal yr/period, cube shows a summation value.
    I want the plan value to be picked only once.. please advice

    Hi Sneha,
    As I understand in your infocube along with the primary key of custom table one more field exists e.g. Document number and due to which the value is getting repeated over multiple lines.
    Though all these records are valid but when you are running report on this cube without document number all the plan values are getting aggregated, again this behaviour is also correct.
    For your reporting purpost I feel that you need to extract data from the custom table in other data target and then do the reporting on that, wherein the plan value will not be repeated.
    Regards,
    Durgesh.

  • Changing datasource of reports in a loop only works for first report.

    Hi,
    I have code that loops through a list of reports to change the datasource and save the change in the report. The idea is that this can be done at build time so time taken at runtime is only for opening the report and running it.
    The problem is that the first iteration of the loop works, and any further ones don't. Apart from closing the client document is there anything else that should be explicitly closed? I don't retrieve any ReportSource from the Client Document so I shouldn't need to dispose of that...I don't think. In particular is there something that should be done to the databaseController retrieved from the clientDoc after each loop?
    The code goes like the below:
    for(File report : reports){
         System.out.println("Preparing report: " + report.getAbsolutePath());
         ReportClientDocument clientDoc = CRJavaHelper.getReportClientDocument(
                   report.getAbsolutePath());
         CRJavaHelper.replaceDBConnection(clientDoc, props);
         clientDoc.close();
         System.out.println("Report " + report.getAbsolutePath() + " prepared.");
    getReportClientDocument does this:
    ReportClientDocument clientDoc = new ReportClientDocument();
    clientDoc.setReportAppServer("inproc:jrc");
    clientDoc.open(fullPath,
              OpenReportOptions.openAsReadOnly.value());
    return clientDoc;
    replaceDBConnection does the following:
    DatabaseController dc = clientDoc.getDatabaseController();
    logonDataSource(dc, username, password);
    prepareReport(dc, schema);
    ConnectionInfos cis = dc.getConnectionInfos(null);
    for (IConnectionInfo oldci : cis) {
         IConnectionInfo newci = new ConnectionInfo();
         newci.setKind(ConnectionInfoKind.SQL);
         newci.setAttributes(propBag);
         newci.setUserName(username);
         newci.setPassword(password);
         dc.replaceConnection(oldci, newci, null, DBOptions._useDefault
                   + DBOptions._doNotVerifyDB);
    SubreportController src = clientDoc.getSubreportController();
    IStrings strs = src.getSubreportNames();
    Iterator<?> it = strs.iterator();
    while (it.hasNext()) {
            String name = (String) it.next();
         ISubreportClientDocument subreport = src.getSubreport(name);
         DatabaseController sdc = subreport.getDatabaseController();
         cis = sdc.getConnectionInfos(null);
         for (IConnectionInfo oldci : cis) {
              IConnectionInfo newci = new ConnectionInfo();
              newci.setAttributes(new PropertyBag(propBag));
              newci.setUserName(username);
              newci.setPassword(password);
              sdc.replaceConnection(oldci, newci, null, DBOptions._useDefault
                        + DBOptions._doNotVerifyDB);
    clientDoc.save();

    What's the URL for the site where you are using this?  Offhand, it looks like it should work with your first example so you are either placing the script before those elements are loaded or you might try wrapping your current javascript inside the:
    $(document).ready(function() {
    --- your existing javascript here
    This make sure the code runs once all the html is loaded on the page.  Without seeing a URL and debugging with the js console in Chrome I can't give you a solid answer.
    But, I do know that you can probably do this with a lot less markup.  Once we figure out what the actual problem is I have a better solution mocked up for you on jsfiddle.
    When looking at my HTML code on jsfiddle, please realize I setup some dummy HTML and removed your tags and added actual values which would be output by your tags.  The main thing I did was remove the whole div.more-selection and instead, added a "data-is-selected" attribute on your div.more-option element.  Then, in my javascript for each div.my-option element on the page, we loop through them, find the value of that data attribute and hide that div if it's less than 1 (or 0).
    Here's the fiddle for you to look at:  http://jsfiddle.net/thetrickster/Mfmdu/
    You'll see in the end result that only two divs show up, both of those divs have data-is-selected="1".
    You can try pasting the javascript code near the closing </body> tag on your page and make sure to wrap my js inside a <script> tag, obviously.  My way is neater on the markup side.  If you can't get it to work it's likely a jquery conflict issue.  My version is using the $(document).ready() method to make sure all the code is loaded before it runs.
    Best,
    Chris

  • Display Select list only once in the report

    Hi,
    select
    CLS.NAME "Name",
    CLI.SECTION "Section",
    CLI.DESCRIPTION "Description",
    htmldb_item.select_list(5,R.REVIEWER_CONFIRM,'YES;YES,NA;NA,NO;NO') "Reviewer Confirm",
    htmldb_item.text(6,R.REVIEW_COMMENT,60,60) "Reviewer Comment",
    R.ID "ID"
    from
    CHECK_LIST_SUB CLS,
    CHECK_LIST_ITEM CLI,
    RCL R
    where
    CLS.CHECK_LIST_SUB_ID = CLI.CLS_ID
    and
    CLI.CLI_ID = R.CLI_ID and
    R.RI_ID = :P21_RI_ID
    The above query will return set of rows there is also a select list displayed for each row
    I need to restric this select list for each name wise in the result of the report.
    select list should not repeat it must be report only once
    Please suggest me how to do this
    Thanks
    Sudhir

    Sudhir,
    Try this query.
    SELECT
    CLS.NAME "Name",
    CLI.SECTION "Section",
    CLI.DESCRIPTION "Description",
    CASE WHEN ROWNUM = 1 THEN
         htmldb_item.select_list(5,R.REVIEWER_CONFIRM,'YES;YES,NA;NA,NO;NO')
         ELSE NULL
    END "Reviewer Confirm",
    htmldb_item.text(6,R.REVIEW_COMMENT,60,60) "Reviewer Comment",
    R.ID "ID"
    FROM     CHECK_LIST_SUB CLS,
         CHECK_LIST_ITEM CLI,
         RCL R
    WHERE     CLS.CHECK_LIST_SUB_ID = CLI.CLS_ID
         AND CLI.CLI_ID = R.CLI_ID
         AND R.RI_ID = :P21_RI_IDThanks,
    Manish

  • Asking only once for a parameter...

    Post Author: Nightcrawler
    CA Forum: Data Connectivity and SQL
    Hi,
    I have a report which need to select a list of items for a dynamic lookup for the report. I have created two stored procedure in SQL which work in QA. When I link them to a report I get asked for the date range twice. This is because the two stored procedures ask for the date range for them to select data. The parameter names are the same in each stored procedure. Basically I want the screen to ask me for the date range then give me a popup list based on the items. Then pass this to the second stored procedure to run for the report ??
    How is best to do this ?
    Thanks
    Ed

    Post Author: Nightcrawler
    CA Forum: Data Connectivity and SQL
    Hi,
    No there are no refs in the section expert. Not sure what you mean by in and out but ? The date is passed to the sp but not returned.
    It seems everytime I want to do a dynamic pararmeters for the first sp. It asks me for the varaibles but not the ones listed in field explorer.... IE if I link the field explorer fields for the first sp to the subreport it asks for the date twice ?? Once for the first sp ( I can tell this as it has the name of one of the sp fields in the top right of each question) and then again for the paremeters that are in the field explorer - which I have given a description, thus I can tell there the next set.
    Surely thou these first parameters are the same ?? Is there a way of changing the priority...
    It seems a complex system for something that should be very simple.
    All I want is to pass two date values to have a dynamic list of rooms wchih are valid. Then pass the same date variable and the chosen room to the next sp... but prefrable without the duplicate date asking .....
    I've just read the subreport linking docs but its doesnt help as everytime you refernace the parameters from the first sp that are shown in field explorer, it asks duplicate questions.
    Just to make this clearer - when I say duplicate questions I mean it is obiviously runs the sp first then for those variables. Then it runs the report and asks for the field explorer variables which it has created when I first referanced the sp. Does this make sense ???
    Thanks
    Ed

  • DB Link between 8i and 10g : INSERT query parse once for every execution ?

    Hi, All
    Wonder if there is anyone out there who has processes that work among 8i x 10g databases through DB Link, and could enlight this.
    I have the following INSERT statement :
    INSERT INTO SAFX01
    (COD_EMPRESA,
    COD_ESTAB,
    DATA_OPERACAO,
    CONTA_DEB_CRED,
    IND_DEB_CRE,
    ARQUIVAMENTO,
    VLR_LANCTO,
    CONTRA_PART,
    CENTRO_CUSTO,
    CENTRO_DESPESA,
    HISTPADRAO,
    COD_OPERACAO,
    HISTCOMPL,
    COD_INDICE_CONV,
    VLR_OPER_IND,
    NUM_LANCAMENTO
    VALUES
    :BIND001,
    :BIND002,
    :BIND003,
    :BIND004,
    :BIND005,
    :BIND006,
    :BIND007,
    :BIND008,
    :BIND009,
    :BIND010,
    :BIND011,
    :BIND012,
    :BIND013,
    :BIND014,
    :BIND015,
    :BIND016 )
    This piece of the process starts at the 8i side.
    The SAFX01 is a table on the 10g side.
    They connect through a db link.
    The trace shows the following situation :
    call count cpu elapsed disk query current rows
    Parse 227521 696.91 1258.88 1 0 910 0
    Execute 227521 381.97 1136.74 0 0 0 227521
    Fetch 0 0.00 0.00 0 0 0 0
    total 455042 1078.88 2395.62 1 0 910 227521
    As can be seen, for every executation, the statement is parsed.
    Is this a expected behaviour, in general ?
    or ...
    Is it happening because it is a 8i vs 10g interface ?
    Am I missing some DB parameter, that could avoid this ?
    Thx,

    This your application is submitting the statement over and over and over again.
    However, it is probably a soft parse.
    You could make it a still softer parse if you set session_cache_cursors to something sensible (100 or so)
    Other than that, only INSERT etc statements in pl/sql procedures are parsed only once, reason why Oracle often uses packages to do DML in their own applications.
    Hth
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • My iPhone4 does not display under Devices in iTunes

    I don't know if my iPhone 4 got overheated due to the recent power failure, but I charged it the other day and have been trying unsuccessfully to connect to iTunes ever since.  My Mac does not recognize my phone - it doesn't open iPhoto or iTunes whe

  • PO Acknowledgement and Mile Stone

    HI friends, 1)  PO Acknowledgment and its acceptance, this process how can map in SAP . Please explain stepbystep 2) Whats the Process of Milestone in SAP . Please explain step by step of configuration and user process o

  • Re: multiple methods - Help

    It looks you used it, what are you saving the extra 5 duke'd for ? Noah

  • Itunes has disappeared from my ipad. how to get it back?

    itunes has disappeared from my ipad. how to get it back?

  • Pop / Click Sound when mic plugged into iPad

    Is anyone else having an issue with a faint 'pop' heard when using a mic to record audio into the ipad through the headphone jack? I've tried using the iPhone earbuds w/ built-in mic and 3 different iRig Mics at the local music store - each time, the