Bind variables in User Defined Reports

SQL Developer 1.0.0.11 / Windows XP / Oracle 9.2.0.5
Thanks for adding the capability for bind variables in user defined reports. However, if there is more than one instance of the same bind variable in the report, the "Enter Bind Values" prompt lists all instances and requires the value be input for all instances. This is unlike the SQL worksheet which only lists the bind variable once. Please change the report behavior to prompt only once per unique bind variable.

Just spoke with the developer of this - you will be prompted for each instance of a bind. That will not change any time soon so I wanted to let you know -
-- Sharon

Similar Messages

  • Using bind variables in user defined reports

    How do I go about using a bind variable in a user defined report?
    Here's a trivial example in SQL*Plus:
    var ublocksize number
    begin
    select value into :ublocksize
    from v$parameter
    where name = 'db_block_size';
    end;
    select :ublocksize from dual;
    This code does not work in raptor.
    The error displayed is:
    Missing IN or OUT parameter at index:: 1
    Vendor code 17041
    any ideas?

    You also have a second issue of supporting the following syntax in SQL scripts:
    var ublocksize number
    begin
    select value into :ublocksize
    from v$parameter
    where name = 'db_block_size';
    end;
    We are itterating to support all SQL plus commands
    Mike

  • User defined report with bind variable

    How can I create an user defined report using a bind variable?

    We currently do not support bind variables in User Defined Reports. We are looking at adding that function before production but I can't promise.
    -- Sharon

  • Having trouble with variables followed by a period in user defined reports.

    Using SQL Developer 1.0.0.15 on XP.
    The DB is Oracle 10.
    Having trouble with variables followed by a period in user defined reports.
    select * from &OWNER.TABLE_NAME
    I noticed that the "Data Dictionary Reports" use :OWNER
    So I have tried all sort of variations:
    select * from :OWNER.TABLE_NAME
    select * from :OWNER\.TABLE_NAME
    select * from ":OWNER".TABLE_NAME
    select * from ':OWNER'.TABLE_NAME
    select * from (:OWNER).TABLE_NAME
    And every other variation I can think of. This is a simple example, but all my reports need the owner of tables as a variable.
    I assume this is simple, I just have not hit the right combination.
    Thanks -
    Dyer

    Use two points ..
    select * from &OWNER..TABLE_NAME

  • Bind variable is not defined

    Hi, it is my first attempt to modify a rdf file.
    I run into a problem while trying to add an additional user parameter in an existing rdf file. While I am successful in adding a new FREQUENCY user parameter and I am able to update the form to show this new parameter, I am not able to run the report.
    I have updated the SQL query in the report editor, under data view to use this new parameter :FREQUENCY. (select ... from table where frequency= :FREQUENCY) There was no error here.
    Whenever I run the report, I will always get an error saying:
              "REP-0730: The following bind variable is not defined: "(nothing behind this                                                             error message)
    The program will have a memory error and it exits itself.
    I had tried many methods trying to solve this problem to no avail.
    I am using Oracle 9i Reports Builder 9.0.2.0.3.
    I would appreciate any help given on this matter.
    Thank you :)
    Message was edited by:
    Leion

    In Object Navigator Under Layout ->User parameters are you able to see your bind variable FREQUENCY?

  • Columns tab in User Defined Report

    I've written a few user defined reports, but so far I've just filled in the SELECT command. I'm looking at the tab labeled "Columns" and trying to understand how that affects the report formatting.
    Am I right in assuming that this is equivalent to the COLUMN command in SQL*Plus? So "Name" maps to the column name in the SELECT, right? "hAlign" and "vAlign" are pretty self explanatory, and valid values for these are listed in the on-line help. But what about "Format"? What are valid values for this field? Do I use the format values from SQL*Plus, like "A30" for a 30 character wide column?
    Finally, is there a way to specify that a column is not to be displayed? I have a primary key that I don't want to display, but I do need to include in the SELECT, because the report has a Child query that needs to use this as a bind variable for a foreign key.

    <p>
    I've found part of the answer to my own question:
    </p>
    <p>
    Formats for the "format" field in the Columns tab are the formats used in the java.text.MessageFormat class. For example, you can use:
    </p>
    {0,date,yyyyMMdd hh:mm:ss}<p>
    The zero means the first argument; it will always be zero because we are only formatting one column. The second part tells what kind of formats to use, date or number. There is also a "choice" format type, which is related to number - works sort of like the DECODE function. The third part is the format itself, which can be one of several default formats like "currency", "percent" and "integer" for numbers, or "short", "medium", "long" or "full" for dates. I used an explicit format.
    </p>
    <p>
    I still don't have an answer to the second part of my question: How do I include a column in my query to be used as a bind variable in a child query, but exclude it from the report?
    </p>

  • Problem Editing User Defined Report - 1.1.0.22.71

    When I rt click on an existing user-defined report on the Reports tab and select edit, change the default value on a bind variable and click Apply, I get message "Name already used please enter new one" message and changes will not save. Am I missing something here or is this a bug?

    I expected that if I basically did a "save as" the issue could be avoided. But I wanted to be sure that if I'm maintinanig a set of shared reports I can edit an existing report without having to jump through a hoop or two. Is this issue being addressed?
    Thanks

  • Problem in User defined reports

    Hi!!
    I'm trying to generate an user defined report using following querry
    select
    Decode(:x,1,'ONE',
    2,'TWO',
    3,'Three',
    4,'Four',
    5,'Five',
    6,'Six',
    7,'Seven',
    8,'Eight',
    9,'Nine')
    from Dual;
    But its not working. I'm getting an error message stating
    "Mising IN or OUT parameter at Index:1"
    Vendor code 17041
    plz help

    I don't think user defined reports supports bind variables yet.

  • PL/SQL in user defined reports

    Is it possible to use PL/SQL in user defined reports? As far as I know, it isn't, but...
    And one more question: can we do something like this in user defined reports:
    ' select * from :TABLE '
    where
    :TABLE is a bind variable?
    Thanks in advance
    Aliq

    I want to create a parent-child report, which in simply version does three things:
    parent
    1. takes all the table names from user_tables
    2. for each table_name (taken from user_tables) it takes a few rows from this table (selet A,B,C from table_name).
    child
    3. for each table name (from master) gives additional information from this table (select D,E,F from table_name)
    And I wonder if it's possible.

  • Using Bind variables in SQL PLUS Report

    using Bind variables in SQL PLUS Report. This report gets the arguments from the application concurrent program. Now my need is to convert the start_date and end_date to bind Variables to improve the performance. I have commented the original code in 'prompt List of Unapproved Adjustments' and used my Bind Variable but it is giving an error
    error: Bind Variable "ENDING_DATE" not declared
    Report Date and Time:
    26-OCT-2010 15:44:13
    List of Unapproved Adjustments
    Bind Variable 'ENDING_DATE" not declared
    Please see below the code for the sql plus report:
    define p_org_id           = '&1'
    define p_fy_begin_date = '&2'
    define p_start_date = '&3'
    define p_end_date = '&4'
    define p_conversion = '&5'
    declare
    variable begin_date date;
    exec :begin_date := p_start_date;
    variable ending_date date;
    exec :ending_date := p_end_date;
    /* Begin
    :begin_date := to_date('&p_start_date','YYYY/MM/DD HH24:MI:SS');
    :ending_date := to_date('&p_end_date','YYYY/MM/DD HH24:MI:SS');
    End; */
    set newpage none
    set termout off
    set pagesize 55
    set linesize 180
    set heading on
    set feedback off
    set wrap off
    set space 1
    set heading on
    begin
    dbms_application_info.set_client_info('&p_org_id');
    end;
    prompt
    prompt Report Date and Time:
    prompt ----------------------
    select to_char(sysdate,'DD-MON-YYYY HH24:MI:SS')
    from dual ;
    prompt
    prompt List of Unapproved Adjustments
    prompt -------------------------------
    select b.trx_number,
    a.adjustment_number,
    f.user_name created_by
    from apps.ar_adjustments a,
    apps.ra_customer_trx b,
    apps.fnd_user f
    where a.customer_trx_id = b.customer_trx_id
    and a.status <> 'A'
    and a.created_by = f.user_id
    and a.creation_date between :begin_date
    and :ending_date
    -- and a.creation_Date between to_date('&p_start_date','YYYY/MM/DD HH24:MI:SS')
    -- and to_date('&p_end_date','YYYY/MM/DD HH24:MI:SS')
    order by
    b.trx_number ;

    Hi
    Please go to customization part of the report and verify..You have set a default value out there ..And also verify your lov and look at the values ..If it is again giving you the problem ..pl delete the report and develop it again from the scratch it will be solved...
    vishnu
    null

  • Recreate USER - User Defined Report

    Dear all,
    you might find this useful!
    For those who are interested in saving the definition of a user before dropping him.
    I have created this user-defined report. You may save this and import it as user defined report.
    If you have additions please let me know:
    -------------- CUT HERE -------------------
    <?xml version="1.0" encoding="UTF-8" ?><displays><display id="37db04bc-0120-1000-8003-a609686616e5" type="" style="Code" enable="true">
         <name><![CDATA[RECREATE User]]></name>
         <description><![CDATA[Create a script to recreate a user]]></description>
         <tooltip><![CDATA[]]></tooltip>
         <drillclass><![CDATA[null]]></drillclass>
         <CustomValues>
         </CustomValues>
         <query>
              <sql><![CDATA[select line from
    select 1 as line_no,
            'CREATE USER ' || username || CHR(10) ||
            '  IDENTIFIED BY VALUES "' || password || '"' || CHR(10) ||
            '  DEFAULT TABLESPACE ' || default_tablespace || CHR(10) ||
            '  TEMPORARY TABLESPACE ' || temporary_tablespace || CHR(10) ||
            '  PROFILE ' || profile ||
            '  ;' || CHR(10) || CHR(10) as line
    from dba_users
    where username = :USERNAME
    UNION
    SELECT 2 as line_no,
        'ALTER USER ' || username || CHR(10) ||
        '    QUOTA ' || bytes || ' ON ' || tablespace_name ||
        ';' || CHR(10) || CHR(10) as line
    FROM
        dba_ts_quotas
    where username = :USERNAME 
    UNION
    select 3 as line_no,
           'GRANT ' || privilege || ' TO ' || grantee || decode(admin_option,'NO',' ','YES',' WITH ADMIN OPTION ') ||
           ';' || CHR(10) || CHR(10) as line
    from dba_sys_privs
    where grantee = :USERNAME
    UNION
    select 4 as line_no,
           'GRANT ' || privilege || ' ON ' || owner || '.' || table_name || 
           '   TO ' || grantee || decode(grantable,'NO', ' ','YES',' WITH GRANT OPTION ') ||
           ';' || CHR(10)  as line
    from dba_tab_privs
    where grantee = :USERNAME
    UNION
    select 5 as line_no, ' '|| CHR(10) as line from dual
    UNION
    select 6 as line_no,
          'GRANT ' || granted_role || ' TO ' || grantee || decode(admin_option,'NO', ' ','YES',' WITH ADMIN OPTION ') ||
          ' ;' || CHR(10) as line
    from dba_role_privs
    where grantee = :USERNAME
    UNION
    select 7 as line_no, ' '|| CHR(10) as line from dual
    UNION
    select 8 as line_no, 'ALTER USER ' || :USERNAME || ' DEFAULT ROLE ' || defrole || ' ;'  as line from
    (select rtrim(listagg,',') as defrole from (
    select
       xmltransform
          sys_xmlagg
             sys_xmlgen(granted_role)
         xmltype
           '<?xml version="1.0"?><xsl:stylesheet version="1.0"
              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
              <xsl:template match="/">
                <xsl:for-each select="/ROWSET/GRANTED_ROLE">
                  <xsl:value-of select="text()"/>,</xsl:for-each>
              </xsl:template>
            </xsl:stylesheet>'
      ).getstringval() listagg
    from dba_role_privs
    where grantee = :USERNAME
    order by line_no
    )]]></sql>
              <binds>
                   <bind id="USERNAME">
                        <prompt><![CDATA[Name of the User to recreate:]]></prompt>
                        <value><![CDATA[TRAINER01]]></value>
                   </bind>
              </binds>
         </query>
    </display>
    </displays>
    -------------- CUT HERE -------------------

    1) Create user defined parameters in builder
    2) While running in web give paramform=yes. This will cause paramform to be displayed and user can enter the values
    Thanks
    The Oracle Reports Team

  • SQL Developer user defined reports (appropriate utilization)

    I have used SQL developer on a limited basis but I have never created a user defined report. Can someone compare and contrast the
    types of user defined reports that can be created via SQL developer versus the types of user defined reports that can be created via
    a tool such as Crystal Reports or similar tool.

    Hi user7753875 -
    I agree with reidelme that it won't match the capabilities for fancy organisation/output of tools like Crystal Reports, but you can do interrelated parent/multiple child reports.
    Check out the Reports tab on the SQL Developer Exchange for some examples of what other users have done with this.
    Brian Jeffries
    SQL Developer Team
    Edited by: bjeffrie on Jun 3, 2011 5:01 PM
    Turns out no one has used that in a long time. You will have to do some interpretive cut/past from xml given by web site & report editor in SQL Developer. Here is the "Who" report (master+2 child reports) from the exchange in a format you can use the import function from "User Defined Reports" on.
    <?xml version="1.0" encoding="UTF-8" ?>
    <displays>
    <display id="57507b3a-0130-1000-8008-a9fec67b8254" type="" style="table" enable="true">
         <name><![CDATA[Who]]></name>
         <description><![CDATA[
    A Report to show active seesion and some details about there activities. Includes 2 Child-reports for Active SQL and PID for the process supporting the session.
    ]]></description>
         <tooltip><![CDATA[Who is logged in and what is he doing]]></tooltip>
         <drillclass><![CDATA[null]]></drillclass>
         <CustomValues>
         </CustomValues>
         <query>
              <sql><![CDATA[SELECT sid, serial#, username, status, server, machine, program FROM v$session order by sid]]></sql>
         </query>
         <display id="null" type="Child" style="Table" enable="true">
              <name><![CDATA[ActiveSQL]]></name>
              <description><![CDATA[]]></description>
              <tooltip><![CDATA[]]></tooltip>
              <drillclass><![CDATA[null]]></drillclass>
              <CustomValues>
                   <TYPE>null</TYPE>
              </CustomValues>
              <query>
                   <sql><![CDATA[select c.spid b1, b.osuser c1, b.username c2, b.sid b2, b.serial# b3, a.sql_text,b.status,to_char(b.logon_time, 'DD-MON-YYYY HH24:MI:SS') from v$sqltext a, v$session b, v$process c where a.address = b.sql_address and b.paddr = c.addr and a.hash_value = b.sql_hash_value and b.sid = :SID order by c.spid,a.hash_value,a.piece]]></sql>
                   <binds>
                        <bind id="SID">
                             <prompt><![CDATA[SID]]></prompt>
                             <tooltip><![CDATA[SID]]></tooltip>
                             <value><![CDATA[NULL_VALUE]]></value>
                        </bind>
                   </binds>
              </query>
         </display>
         <display id="null" type="Child" style="Table" enable="true">
              <name><![CDATA[Process]]></name>
              <description><![CDATA[]]></description>
              <tooltip><![CDATA[]]></tooltip>
              <drillclass><![CDATA[null]]></drillclass>
              <CustomValues>
                   <TYPE>null</TYPE>
              </CustomValues>
              <query>
                   <sql><![CDATA[select p.spid,p.addr,s.sid,s.server,p.username,s.osuser,p.program,t.value/1024/1024 PGA_Mb from v$process p,v$session s,v$sesstat t where p.addr=s.paddr and s.sid=t.sid and s.sid = :SID and t.statistic#=20]]></sql>
                   <binds>
                        <bind id="SID">
                             <prompt><![CDATA[SID]]></prompt>
                             <tooltip><![CDATA[SID]]></tooltip>
                             <value><![CDATA[NULL_VALUE]]></value>
                        </bind>
                   </binds>
              </query>
         </display>
    </display>
    </displays>
    Edited by: bjeffrie on Jun 3, 2011 5:01 PM

  • How to use SYSDATE as a default value of a bind variable in a query report?

    Hi,
    I want to use SYSDATE as default value for a bind variable in Query based report.
    I don't see any way to do it, someone helps?
    Thanks a lot.
    Paulo.

    You can aslo use #sysdate directly.
    Hi,
    The way I'm doing in my report is, I have a database function (f_ret_sysdate) with the following code
    create function f_ret_sysdate return varchar2
    begin
    return to_char(sysdate,'mm/dd/yyyy');
    end;
    Now, in the 'Customization Form Display Options' section of the report I'm calling this function as #f_ret_sysdate in the default value field of corresponding bind variable to display SYSDATE with the format.
    Hope this helps!...
    -Krishnamurthy

  • Error creating a user defined report in the grid control

    I am trying to create a simple User Defined report in the Grid OEM
    Under the 'Elements' tab I have a 'Type' - 'Database Table from SQL'
    And I have this 'Statement' - SELECT * FROM SYS.DBA_USERS
    When I Click the 'Preview' button I get this error.
    Error rendering element. Exception: ORA-00942: table or view does not exist
    I'm logged on as SYSTEM.
    Isn't the SYS.DBA_USERS table accessible by SYSTEM?
    Any advice on what I'm doing wrong/
    Edited by: bfee_sdc on Oct 19, 2010 9:12 AM

    What are the tricks?
    It has to be some what supported since I found this somewhere in an Oracle note...
    How to create custom reports on tables other than mgmt* views.
    To create reports on other tables, grant permissions to MGMT_VIEW user as MGMT_VIEW is responsible for creating reports in grid control
    SQL> GRANT SELECT on SYSMAN.<table_name> to MGMT_VIEW;
    And then create the reports in the reporting framework referencing SYSMAN.<table_name> in the query.
    I tried GRANT SELECT on SYS.DBA_USERS to MGNT_VIEW but this did not work.

  • Not able to edit user defined reports

    Hi,
    I've run into an issue recently with user defined reports. After some time, I'm not able to edit them. This only happens on some of them. Is there a way to work around this?
    Thanks.

    Hi,
    The platform is Windows XP Pro (32 bit) sp3, sql developer 1.5.5 (although I've seen this happen on earlier versions as well). After some time, some reports become un-editable. If I right click on the report and click edit, nothing happens. I've also tried exporting and re-importing the reports, but that doesn't seem to help.
    Also, I open it up via sqldeveloper.exe, but no console window come up.

Maybe you are looking for

  • Airplay Lag on iPhone 4

    Updated to iOS 4.3 on all my apply gizmos.. ATV, iPad, iPhone4 iPods etc... Streaming to and from my iPhone 4 is Laggy... Takes a very long time to load and once loaded plays 1 second and has to rebuffer... plays another second... rebuffers (again fo

  • Backup CD's burned from iPhoto require updating EVERYTIME they're inserted!

    When I insert a CD that contains albums that I burned as backup from an older version of iPhoto and try opening them in iPhoto 6, I'm stuck watching an "updating photos" dialog box for the next 5+ minutes. To add insult to injury, this happens EVERYT

  • Sliced and imported photoshop layout into dreamweaver

    First, I am a newbie to all of this web design stuff and coding and dreamweaver. I wanted to create my first website so here I am. I went through 2 different tutorials (youtube and on lynda.com) I created a layout in photoshop and I also sliced it. I

  • Oracle, MS IIS, and Frontpage

    I am new to Oracle and am wanting to know if I can use MS ODBC/IIS to connect to Oracle 9i. It appears that MS only has a connector for MS SQL. I am also wondering if Frontpage will function with Oracle as MS SQL is supposed to if they can be connect

  • How to make a rigid container ?

    Hello, Suppose that we have the following tree : <mx:Application> <mx:Box id="mybox" height="100%" /> <mx:Application> and that we dynamicaly add content to mybox, so much that the height of the content of mybox become greater that the screen height.