Dynamic queries in report builder 6i ( ref cursor query )

Hi everyone,
My requirement is that I want to create a report where the query is dynamic. The dynamic part will be known at runtime as it is being passed via a parameter. My query looks like this :
select * from emp where sal :p1 :p2
Possible values for :p1 are - '>', '<', '>=', '<=', '=', '!='
Possible values for :p2 are - any value entered by the user
I tried creating a query in report builder based on a ref cursor. But it does not allow me to create the query for the ref cursor dynamically. That means I have to hardcode the query in the program.
I tried using place holder columns without success.
Can someone please help me ?
Regards,
Al

Hi,
You can use lexical paramters in the sql query
x - char - parameter
select * from emp &x
you need to pass the value for x in the parameter as
'where sal < 1234'.
Note : Lexical variable should be of char datatype.
This is an alternative to the ref cursors.
This works. Hope this is clear.

Similar Messages

  • Cursors are not closed when using Ref Cursor Query in a report  ORA-01000

    Dear Experts
    Oracel database 11g,
    developer suite 10.1.2.0.2,
    application server 10.1.2.0.2,
    Windows xp platform
    For a long time, I'm hitting ORA-01000
    I have a 2 group report (master and detail) using Ref Cusor query, when this report is run, I found that it opens several cursors (should be only one cursor) for the detail query although it should not, I found that the number of these cursors is equal to the number of master records.
    Moreover, after the report is finished, these cursors are not closed, and they are increasing cumulatively each time I run the report, and finally the maximum number of open cursors is exceeded, and thus I get ORA-01000.
    I increased the open cursors parameter for the database to an unbeleivable value 30000, but of course it will be exceeded during the session because the cursors are increasing cumulatively.
    I Found that this problem is solved when using only one master Ref Cursor Query and create a breake group, the problem is solved also if we use SQL Query instead of Ref Query for the master and detail queries, but for some considerations, I should not use neither breake group nor SQL Query, I have to use REF Cursor queries.
    Is this an oracle bug , and how can I overcome ?
    Thanks
    Edited by: Mostafa Abolaynain on May 6, 2012 9:58 AM

    Thank you Inol for your answer, However
    Ref Cursor give me felxibility to control the query, for example see the following query :
    function QR_1RefCurDS return DEF_CURSORS.JOURHEAD_REFCUR is
    temp_JOURHEAD DEF_CURSORS.JOURHEAD_refcur;
              v_from_date DATE;
              v_to_date DATE;
              V_SERIAL_TYPE number;
    begin
    SELECT SERIAL_TYPE INTO V_SERIAL_TYPE
    FROM ACC_VOUCHER_TYPES
    where voucher_type='J'
    and IDENT_NO=:IDENT
    AND COMP_NO=TO_NUMBER(:COMPANY_NO);
         IF :no_date=1 then
                   IF V_SERIAL_TYPE =1 THEN     
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
                   AND IDENT=:IDENT
              AND ((TO_NUMBER(VOCH_NO)=:FROM_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NULL)
              OR (TO_NUMBER(VOCH_NO) BETWEEN :FROM_NO AND :TO_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NOT NULL )
              OR (TO_NUMBER(VOCH_NO)<=:TO_NO and :FROM_NO IS NULL AND :TO_NO IS NOT NULL )
              OR (:FROM_NO IS NULL AND :TO_NO IS NULL ))
                   ORDER BY TO_NUMBER(VOCH_NO);
                   ELSE
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
                   AND IDENT=:IDENT               
              AND ((VOCH_NO=:FROM_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NULL)
              OR (VOCH_NO BETWEEN :FROM_NO AND :TO_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NOT NULL )
              OR (VOCH_NO<=:TO_NO and :FROM_NO IS NULL AND :TO_NO IS NOT NULL )
              OR (:FROM_NO IS NULL AND :TO_NO IS NULL ))     
                   ORDER BY VOCH_NO;          
                   END IF;
         ELSE
                   v_from_date:=to_DATE(:from_date);
                   v_to_date:=to_DATE(:to_date);                         
              IF V_SERIAL_TYPE =1 THEN
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
              AND IDENT=:IDENT                         
                   AND ((voch_date between v_from_date and v_to_date and :from_date is not null and :to_date is not null)
                   OR (voch_date <= v_to_date and :from_date is null and :to_date is not null)
                   OR (voch_date = v_from_date and :from_date is not null and :to_date is null)
                   OR (:from_date is null and :to_date is null ))     
                   ORDER BY VOCH_DATE,TO_NUMBER(VOCH_NO);     
              ELSE
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
                   AND IDENT=:IDENT                         
              AND ((voch_date between v_from_date and v_to_date and :from_date is not null and :to_date is not null)
                   OR (voch_date <= v_to_date and :from_date is null and :to_date is not null)
                   OR (voch_date = v_from_date and :from_date is not null and :to_date is null)
                   OR (:from_date is null and :to_date is null ))     
                   ORDER BY VOCH_DATE,VOCH_NO;          
              END IF;
         END IF;               
         return temp_JOURHEAD;
    end;

  • How to write REF-CURSOR Query in Oracle Reports

    Hello Guys!!
    I have a form in which you can select regions/divisions/locations etc by the use of check boxes. And the selected values will be inserted into a table, and based on the selected values of the table the report is run.
    The issue I have is with the query inside the Oracle reports(attached to this file).
    The query works fine until the last two EXISTS conditions.
    IF a region exists In the table report_param then it works fine but if there are no divisions in it , then the query returns no values, which is not correct.
    Someone has advised me to use a ref-cursor query inside reports tool, which I am not aware off. So, anykind of suggestions or advises are welcome. Please let me know about it as it is very urgent issue for me. Anykind of help would be greatly
    appreciated.
    Thanks,
    Vishal
    -------------------------------------------------------Query in Oracle Reports---------------------------------------------------------
    select c.key_segment, p.supplier_id,
    decode(:in_col_nm, 'BRAND',nvl(p.product_brand,'<Unknown Brand>'), 'PLN',nvl(p.product_legal_name,'<Unknown Legal Name>')) COL_NM,
    sum(a.ext_price) sales_dols,
    sum(comp_allow_pkg.get_comp_allow_stddiv(a.control_loc_id, a.product_id, a.sold_to_customer_id,
    a.doc_dt, a.ext_price, a.units)) cust_reb_dols,
    sum(a.units) units,
    sum(a.ext_cost) cost_dols
    from sales a, key_segment_plns c, product p, rep_wrtr_dw_cust h
    where a.doc_dt between :in_start_dt and :in_end_dt
    and a.customer_oc = h.control_loc_id
    and a.sold_to_customer_id = h.sold_to_cust_id
    and a.ship_to_customer_id = h.ship_to_cust_id
    and ((:in_dg_cd = 'B' and h.dealer_grower_cd in ('D','G')) or h.dealer_grower_cd = :in_dg_cd)
    and a.product_id = p.product_id
    and p.product_gl_class_cd = 'CHEM'
    and p.product_legal_name = c.product_legal_name
    and c.key_segment in ('GLYPHOSATE','PLANT HEALTH/RUST FUNGICIDES','PYRETHROIDS','STROBI FUNGICIDES')--&IN_KEY_SEGMENTS
    -- and (:in_oc = 'ALL' or (a.control_loc_id in (select control_loc from control_loc_comb_ocs where control_loc_comb = :in_oc)))
    -- SALES DATA FILTERS TO MATCH ACCUM_SALES_DG_MV
    and a.sale_type_cd in ('02','08')
    and a.document_type_cd in ('I','C','D')
    and (substr(a.product_id,-1) in ('0','1') OR nvl(upper(trim(p.product_brand)),'X') = 'TECH FEE')
    and a.units <> 0
    and a.unit_cost <> 0
    and a.unit_price <> 0
    -- NEW FILTERS ADDED 9/11/07: LOCATION(BRANCH), BUSINESS TYPE, RSM/ASM/REP
    and ((:in_loc = 'ALL') or (nvl(a.warehouse_id,'<blank>') in (SELECT param_value
    FROM report_param
    WHERE report_id = :IN_REPORT_ID
    AND session_id= :IN_SESSION_ID
    AND USER_ID = :IN_USER_ID
    AND param_name='LOCATION_TYPE')))
    and ((:in_uhs_ag = 'ALL') or (:in_uhs_ag = 'NA' and p.product_uhs_ag != 'A') or (p.product_uhs_ag = :in_uhs_ag))
    and ((:in_sales_rep = 'ALL') or (nvl(a.territory_id,'<blank>') in (SELECT param_value
    FROM report_param
    WHERE report_id = :IN_REPORT_ID
    AND session_id= :IN_SESSION_ID
    AND USER_ID = :IN_USER_ID
    AND param_name='SALES_REP_TYPE')))
    and EXISTS
    (SELECT '1'
    FROM locations l, report_param rp
    WHERE rp.report_id = :IN_REPORT_ID
    AND rp.session_id= :IN_SESSION_ID
    AND rp.user_id = :IN_USER_ID
    AND rp.param_value = l.region
    AND rp.param_name = 'REGION_TYPE'
    AND a.warehouse_id = L.ARS_LOCATION)
    and EXISTS
    (SELECT '1'
    FROM locations l, report_param rp
    WHERE rp.report_id = :IN_REPORT_ID
    AND rp.session_id= :IN_SESSION_ID
    AND rp.user_id = :IN_USER_ID
    AND rp.param_value = l.region
    AND rp.param_name = 'DIVISION_TYPE'
    AND a.warehouse_id = L.ARS_LOCATION)
    group by c.key_segment, P.supplier_id,
    decode(:in_col_nm, 'BRAND',nvl(p.product_brand,'<Unknown Brand>'), 'PLN',nvl(p.product_legal_name,'<Unknown Legal Name>'))

    Hi,
    I need your help to create a report using Ref-Cursor. please see the below thread
    Report using ref cursor or dynamic Sql

  • Report based on Ref Cursor and lock package/table (ORA-04021)

    Hi,
    I have reports based on Ref Cursor. Report builder and Reports Background Engine make pins for package, which consist of Ref Cursor, and for tables, which is used in package. So I can't grant any privileges on these tables anybody.
    For example, after next statement:
    GRANT SELECT ON table_name TO user_name
    I received the next error:
    ORA-04021: timeout occurred while waiting to lock object table_name
    Thanks

    Hi,
    I have reports based on Ref Cursor. Report builder and Reports Background Engine make pins for package, which consist of Ref Cursor, and for tables, which is used in package. So I can't grant any privileges on these tables anybody.
    For example, after next statement:
    GRANT SELECT ON table_name TO user_name
    I received the next error:
    ORA-04021: timeout occurred while waiting to lock object table_name
    Thanks

  • Report based on Ref Cursor and grant privileges

    Hi,
    I have reports based on Ref Cursor. Report builder and Reports Background Engine make pins for package, which consist of Ref Cursor, and for tables, which is used in package. So I can't grant any privileges on these tables anybody.
    For example, after next statement:
    GRANT SELECT ON table_name TO user_name
    I received the next error:
    ORA-04021: timeout occurred while waiting to lock object table_name
    Thanks

    Hi,
    I have reports based on Ref Cursor. Report builder and Reports Background Engine make pins for package, which consist of Ref Cursor, and for tables, which is used in package. So I can't grant any privileges on these tables anybody.
    For example, after next statement:
    GRANT SELECT ON table_name TO user_name
    I received the next error:
    ORA-04021: timeout occurred while waiting to lock object table_name
    Thanks

  • Multiple queries on report builder?

    I know how to create a report in report builder with a single
    query but in this case i would like to create a single page report
    that consist of 3 sections containing results from 3 seperate
    queries. how do i do something like this?

    Using subreports
    Subreports let you nest a report within your report. The data
    you
    display in a subreport is typically related to the data in
    the main
    report and you enable this by passing one or more subreport
    parameters
    to the subreport. However, the data displayed in a subreport
    can also be
    unrelated to the data in the main report.
    http://www.adobe.com/livedocs/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm? context=ColdFusion_Documentation&file=part_dev.htm
    If that link doesn't work, it is located here in either the
    bundled or
    on line documentation.
    ColdFusin MX Developer's Guide > Creating Reports for
    Printing >
    Creating reports with the ColdFusion MX 7 reporting >
    Using subreports

  • Reports 3.0, Ref Cursor from stored procedure

    I have a problem trying to use Ref Cursor as datasource (i.e.
    Ref Cursor Query) in Reports 3.0
    I have created a stored package with a function which returns
    Ref Cursor.
    That function just opens the cursor and returns it to the
    calling module.
    Reports recognizes returned cursor - it creates a group for that
    query, with all columns, than I built
    a layout model - everything is OK on that stage.
    During the execution of that report (from previewer or using
    Reports Runtime) I got an error message like that:
    REP-0065 Virtual Memory System Error
    REP-0200 Cannot allocate enough memory cavaa22
    Error's description does not correspond the reality :) - there
    is enough virtual & physical memory according to
    Task Manager information.
    So, that does not work when this package is stored one.
    When I create the package on the client side - in Reports -
    everything works just fine.
    Cursor is opened with a very simple query, selecting records
    from the very simple table having only one record.
    There is no code written which closes that cursor or fetches the
    records.
    Client platform: WinNT 4.0 SP3
    Oracle Reports: 3.0.5.8.0
    Oracle Server: Oracle8 8.0.5.0.0 (and I tried also on Oracle7
    7.3.4.3.0)
    Thanx.
    null

    Sara,
    GTT (Global Temporary Tables) in Oracle work a different way compared to SQL Server and Informix. There you can create temporary tables on the fly and drop them on the fly.
    Here you should (note, you don't have to, but, best practice says that you should) create the table using the syntax...
    create global temporary table.....
    Once you create it, even though it looks like persistent table, it's not. It will have it's own individual data PER SESSION . You have two types of GTTs:
    ON COMMIT PRESERVE ROWS and ON COMMIT DELETE ROWS (they work in slightly different way).
    Look up GTTs here:
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#sthref2213
    HTH,
    Rahul

  • Link Query and Ref Cursor Query

    Hi all!!
    How can I link Query and Ref Cursor Query??
    I mean, How can I pass input parameters to the PL/SQL procedure if they are not User parameters but they come from another table??
    Thanks a lot
    F.

    I have searched the forum and this is the closest to my problem.
    Just started using ref cursors in my reports.
    The problem I am running into is that I have two ref cursor queries in my report - they each contain a column named seq_no which forms a join (in the database) .
    My report returns the correct number of records in each query, but I can't find a way to enforce the join. I've tried all the methods I can think of including combining the results into one query.
    The IDE won't let me join on a column and when I join on the group (which I make only contain the seq_no fields) that join is ignored.
    Can anyone help me on this?

  • Ref Cursor Query

    I was exploring the use of a ref cursor query within my report. The question that I have is do you have to put the package in the reports program units or can you place the package on the db server and call the package?

    Hi,
    You can do it both ways.
    Regards
    Kamal

  • User inputted letters with dynamic fields in Report Builder

    I'm proactively trying to get certain aspects off our hands in IT and more specifically, the way letters are generated through ColdFusion.  Right now we are using activeX controls (with some vbscript and asp pages) through IE to do Word mail merges for letter's for our students.  We would like the user to be able to change these letters by themselves through our web application and have them saved in our database so they can be stored as a future template.
    Now I'm new to Report Builder and have a few examples to show my colleagues, but I'm having troubles being able to dynamically insert the student's name (for example) into the report.
    So basically I have an empty template with a huge dynamic box for the text which reads #param.MessageBody# that comes from a textarea within the cfm page.  That works, but taking it one step further, I want to replace all instances of "%%StudentName%%" within that MessageBody with the actual student's name.
    Since I cannot loop over the report and do my usual ReplaceNoCase(lMessageBody, "%%StudentName%%", Trim(ReportQueryLetters.StudentName), "ALL")>, how can I put this into a built-in function into the report?
    I figured the function needs to be in <cffunction name="BeforeExport"> and while a simple display of the message works perfectly, I cannot get my replace line to work.  I am passing the query to Report Builder instead of having it built-in, is that my problem?!  I would prefer if it was external to save my stored procedures if I can.  Is there any way to call the query to get that line to work?!
    The code inside the cffunction (in report Builder):
    <cfargument name="lTextArea">
    <cfset lTextArea = #form.frmTextArea#>
    <cfset lTextArea = ReplaceNoCase(lTextArea, "%%StudentName%%", Trim(ReportQueryLetters.StudentName), "ALL")>
    <cfreturn lTextArea>
    The error:
    Element STUDENTNAME is undefined in REPORTQUERYLETTERS.           

    Sorry for the late reply, just got back from vacation.
    I don't think you use ReportQueryLetters for the query.  it should be
    query.StudentName
    Also, you can have an intermediate step on the page that receives the
    MessageBody and change the MessageBody before passing it as a parameter to the
    report.

  • ColdFusion Report Builder 9 Using MySQL query's

    Hey Everyone
    I have been pulling my hair out for several days with this, I have all of the Adobe ColdFusion 9 dev books, and Google returns a cluster of information that doesnt seem to work. I was hoping someone could help me out here.
    So what I did was open query builder in Adobe ColdFusion 9 Report Builder, I clicked the icon at the top that says report query and placed the following mySQL information, which works fine.
    MySQL
    select name.soc_sec, name.last_name, name.first_name, nmcrs.course,nmcrs.crs_txt AS Course_Title ,practicl.day_cod,CAST(practicl.start_hr AS VARCHAR(2)) + ':' + CAST(practicl.start_min AS VARCHAR(2)) AS Start_Time,
      CAST(practicl.end_hr AS VARCHAR(2)) + ':' + CAST(practicl.end_min AS VARCHAR(2)) AS End_Time, nmcrs.section, nmcrs.sch_yr, nmcrs.sm_desc, nmattend.attend_txt,address.phone,address.cell_phone,
      address.e_mail
    From name
      --INNER JOIN  nmprg ON name.soc_sec = nmprg.soc_sec  
            INNER JOIN  nmcrs ON name.soc_sec = nmcrs.soc_sec
            Left Join crssect ON name.soc_sec = crssect.crs_id
      Inner Join practicl On practicl.sid = nmcrs.sid
            inner join nmattend on name.soc_sec = nmattend.soc_sec
            Inner join  address On name.soc_sec = address.soc_sec
    WHERE (name.camp_cod = 'California') AND (nmcrs.sch_yr = '201213')and (nmcrs.semester = '1') and (nmattend.attend_txt = 'SP') and
      (nmcrs.section not like'w%')
    group by name.soc_sec, name.last_name, name.first_name,nmcrs.course,nmcrs.crs_txt,practicl.day_cod,practicl.start_hr,
       practicl.start_min, practicl.end_hr,practicl.end_min,nmcrs.section, nmcrs.sch_yr,nmcrs.sm_desc, nmcrs.grade,
       nmattend.attend_txt, address.phone,address.cell_phone,address.e_mail
    ORDER BY nmcrs.section, name.soc_sec
    Now I place my fields where I want them in the desgner, I double click the field to open the expression builder and all I have to type is something like query.Start_Time
    When I run the report it lists all of the start times that match my criteria.
    good
    So my trouble is, I would like to use an if statement to make something happen based on the start time and cant get it to work. I have tried using <cfscript> <cfif> <cfquery> if, IIF, nothing works, mainly because once I use one of those tags it no longer recognizes the query.Start_Time.
    I was wondering if someone could give me an example on how to do this like
    <cfif (query.Start_Time) IS '12:0'>
    query.Start_Time = '12.00'
    </cfif>
    or
    <cfscript>
    if(query.Start_Time == '12:0')
         query.Start_Time = '12:00';
    </cfscript>
    I mean I know thats wrong and Its probably not that simple but all I need is a simple example to work off of and one would be greatly appreciated. Or even an example in the mySQL info I provided would work too. Please Help
    Thanks
    Shawn

    Shawn, forgive me not focusing on the direct question, but I want to clarify first that this is not the right forum for that question, about the CF Report Builder. This forum is for CF Builder, the relatively new CF IDE (integrated development environment) for CF, based on Eclipse.
    Your question about the CF Report Builder should be directed to its own forum, the CF Reporting forum:
    http://forums.adobe.com/community/coldfusion/coldfusion_reporting
    I do understand the easy confusion (the name CF Builder is awfully close to the CF Report Builder). Also, the forum name “CF Reporting” may not have jumped out as a place for RB questions. (For any readers who may be interested, the list of all CF-related forums is at http://forums.adobe.com/community/coldfusion)
    That forum is not as busy, no, but then the Report Builder is quite a bit older, having come out with CF 7, and not really having been updated much since then.  Still, there are folks there who have replied to questions asked, including Adobe staff.
    Since I don’t read that forum myself, and won’t see your question asked/answered there, let me point out something else that may help (in case others there would not).  You say “I have all of the Adobe ColdFusion 9 dev books”, and that may mean various books like the CF Web App Construction Kit books that Ben, Ray, myself, and others have done.
    But did you know that there is an entire chapter on the CF Report Builder in the free online CF9 manual called “Developing ColdFusion 9 Applications” (a 1300-page manual which many miss entirely , as happened with the versions for CF8 and 7 as well). Many people never even know there is any such “documentation” from Adobe for working with the CF Report Builder. I’ll note also that we (writers of books) may not always get into all the detail that’s in those docs because, well, we don’t want to duplicate their effort. But I know even some writers/bloggers/forum respondents never even know of the manuals, as they are rarely referred to.
    In your case, with the CFRB, it’s especially important to be aware of its substantial chapter:
    http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24 -6fc2.html
    For instance, you may already know about this but there you’ll learn that there is a QUERY attribute for the CFREPORT, whereby you can build the query dynamically (as any CFQUERY can be) and then pass that resultset to the report. That may suffice to solve the challenge for you, but if it does not, then you may want to at least take a moment to peruse that chapter before proceeding to ask the question in that other forum.
    And if the book doesn’t help (and I grant it may not) them one more suggestion before you may re-post the question on the other forum: it really may be best for you not to make reference to MySQL or CF9 in your subject, as you did here. There’s doesn’t really seem anything about your challenge that’s specific to them, but saying it in your subject may limit who would read/reply (if they don’t use with MySQL or are not yet on CF9).
    Hope something there’s helpful.
    /charlie
    PS If you may feel that this answers the question, please do mark it as such in the forum web interface, if you would please. Thanks.

  • ORACLE reports Build 10g - Data Model - query - If statement in Alias ?

    I have the following select statement. It has the alias Survivors, Deaths and "All
    With the ORACLE reports Build 10g - Data Model - I have the following query statement. I require the alias to change. Can the following be done.
    Cases". Is it posible to use :P_LANGUAGE variable to say that -- IF :P_LANGUAGE = FRENCH THEN alias are Survivants for survivors, Décès for Deaths, Tous_les_cas for All Cases. Please advise
    SELECT ALL T_NTR_MULTIBAR.CAT, T_NTR_MULTIBAR.NUM_CASES_LEFTBAR AS Survivors,
    T_NTR_MULTIBAR.NUM_CASES_MIDDLEBAR AS Deaths, T_NTR_MULTIBAR.NUM_CASES_RIGHTBAR AS "All Cases"
    FROM T_NTR_MULTIBAR
    WHERE INSTANCE_NUM = :P_INSTANCENUM
    order by ORDERS

    It is no problem, you can automatically change the complete query before the report is running, which delivers you different kind of values. But the alias names does not change in the group of the data-model, although two query are running with different alias names at different times. In the data model you see the alias names of the first implemented select statement, which are the column fields in the layout.

  • How do you call dynamic fields in Report Builder

    I have some fields that they were filled in a dynamic way,
    and I want to make some calculations using the information that was
    populated in this field. When I put the name of the field in my
    calculation control, it did not see find the field control.
    Does anyone know how can I call the field control? The
    information is not part of any particular column of the
    query.

    check out the Oracle Portal Tutorial White Paper (http://technet.oracle.com/docs/products/iportal/listing.htm#tutcase), there is a section where they build a report with repeating fields

  • Dynamic Queries in reports 6i

    Hi, I was wondering if its possible to build a dynamic query on reports 6i. on the report wizard I cant get a user parameter...
    here is what im trying to do: I have a query where the fileds am retrieving are always the same, what its going to change is the where clause, it can be like betwwen 2 different dates ot it also could be a lot of ORs, like, Company_ID = 1 or Company_ID = 2 and such.
    Thanks

    yes, the thing is when I build the query on the report wizard it goes like this:
    select field1,field3, field4 from Table
    where p_clause
    so I get an error, and the query cannot be build like that, it says ORA-00920 invalid relational operator Where p_clause ==>
    So I thing my problem basically is how to build the query... any idea on how to do it? thanks
    can you explain me how this After Parameter works a little bit more
    Edited by: user10798811 on Mar 24, 2009 1:11 PM

  • Help about writing a ref cursor query

    I can't see what's wrong about this query (the problem seems to be in 'where CO_MSDN_V >= '':p_MSISDN'' '):
    v_Query := 'select env.SQ_ECL_01, env.CO_MSDN_V, env.CO_IMSI_V, sms.CO_TEXT_V, env.CO_MSC_V, per.DS_PER_CLT_V, env.CO_REIN_N, TO_CHAR(env.FX_FECH_ENV_D, ''DD/MM/YYYY HH24:MI:SS''), TO_CHAR(env.FX_RCP_IAS_D, ''DD/MM/YYYY HH24:MI:SS'') ' ||
    'from (select /*+INDEX(ir_tb_env_clts,IN_PK_ENV_CLTS)*/ ' ||
    'SQ_ECL_01, CO_MSDN_V, CO_IMSI_V, CO_SMS_N, CO_MSC_V, CO_PER_CLT_N, CO_REIN_N, FX_FECH_ENV_D, FX_RCP_IAS_D ' ||
    'from ir_tb_env_clts ' ||
    'where CO_MSDN_V >= '':p_MSISDN'' ' ||
    'and FX_FECH_ENV_D >= :p_DATE ' ||
    'and CO_IMSI_V >= :p_IMSI '||
    'and SQ_ECL_01 > :p_SEQUENCE ' ||
    'and rownum <= :p_NUMROWS) env, ir_ct_sms sms, ir_ct_per_clt per ' ||
    'where env.CO_PER_CLT_N = per.CO_PER_CLT_N(+) ' ||
    'and env.CO_SMS_N = sms.CO_SMS_N(+) ' ||
    'order by env.CO_MSDN_V, env.FX_FECH_ENV_D, env.CO_IMSI_V, env.SQ_ECL_01 ';
    OPEN v_AllSendClients FOR v_Query USING p_MSISDN, v_DATE, p_IMSI, p_SEQUENCE, p_PageSize;
    When I call the procedure it is included in, I get the ORA-01001 error
    If I write 'where CO_MSDN_V >= :p_MSISDN ' I don't get the error, but it doens't do what I want

    Here are some additional examples that may help clarify. Notice, in the last example, that if the variable is declared as varchar2, it is treated as varchar2, not number, even without quotes.
    scott@ORA92> -- test data:
    scott@ORA92> SELECT * FROM ir_tb_env_clts
      2  /
    CO_MSDN_V
    35899995000
    34900000001
    scott@ORA92> -- where 35 is a character:
    scott@ORA92> select min(CO_MSDN_V)
      2  from ir_tb_env_clts
      3  where CO_MSDN_V >= '35'
      4  /
    MIN(CO_MSDN_V)
    35899995000
    scott@ORA92> -- where 35 is a number:
    scott@ORA92> select min(CO_MSDN_V)
      2  from ir_tb_env_clts
      3  where CO_MSDN_V >= 35
      4  /
    MIN(CO_MSDN_V)
    34900000001
    scott@ORA92> -- where co_msdn_v is a number:
    scott@ORA92> variable co_msdn_v number
    scott@ORA92> exec :co_msdn_v := 35
    PL/SQL procedure successfully completed.
    scott@ORA92> select min(CO_MSDN_V)
      2  from ir_tb_env_clts
      3  where CO_MSDN_V >= :co_msdn_v
      4  /
    MIN(CO_MSDN_V)
    34900000001
    scott@ORA92> -- where co_msdn_v is a character:
    scott@ORA92> variable co_msdn_v varchar2(20)
    scott@ORA92> exec :co_msdn_v := '35'
    PL/SQL procedure successfully completed.
    scott@ORA92> select min(CO_MSDN_V)
      2  from ir_tb_env_clts
      3  where CO_MSDN_V >= :co_msdn_v
      4  /
    MIN(CO_MSDN_V)
    35899995000

Maybe you are looking for

  • Use VO to get DB value and set attribute

    Hi, I am working a page to create new order. I need some information populate. This is my code, which somehow not work public void createOrder() //(String[] args) OAViewObject vo = (OAViewObject)getxxMobileOrderVO1(); if (!vo.isPreparedForExecution()

  • Cannot upgrade my itunes 10 11.1

    cannot upgrade my itunes to 11.1

  • Error when migrating from obiee 11.1.1.3 to 11.1.1.5

    Hi We have developed scorecards in Obiee 11.1.1.3. Now we have a requirement to upgrade from 11.1.1.3 to 11.1.1.5...For that we are palnning to install 11.1.1.5 on other machine and move the rpd and catalog from 11.1.1.3 to the new system..Will it wo

  • Voice command for Contacts doesn't work after a re...

    Voice command for Contacts doesn't work after a reboot or a contacts restore. Steps to reproduce: 1. Backup contacts. Open Files > Backup & Restore > Select Contact for Backup Contents and select Back up now. 2. Edit/save a contact, press and hold th

  • Macbook Pro not charging... help please!

    I have a refurbished 2011 macbook pro i bought about 5 months ago. The problem is that one day I went to plug in my external firewire hard drive and my laptop (which wasn't pluged in at the time) inexplicably shut off. I can only get it to turn on if