How to reference a user parameter in program unit

I tried to define a user parameter in Oracle Report 6i and I could reference it (&p_where_clause) in the main query but I failed to reference it in one of the program units. Here is the logic:
function CF_OTHER_COURSESFormula return Char is
cnt           number;
priority     number;
class_code     varchar2(8);
oc           varchar2(100) := null;
cursor oc_cur is
select class_code, branch_priority
from nominations n, employments e
where n.hkic_no = e.hkic_no
and e.staff_status_code = 'EMP'
and &p_where_clause --> contain "n.course_code in ('A','B','C')"
and n.hkic_no = :hkic_no
and n.class_code != :class_code;
begin
cnt := 1;
open oc_cur;
loop
fetch oc_cur into class_code, priority;
if oc_cur%notfound then
     exit;
end if;
if cnt = 1 then
oc := oc||class_code||'('||priority||')';
else
oc := oc||', '||class_code||'('||priority||')';
end if;
cnt := cnt + 1;
end loop;
close oc_cur;
return oc;
exception
when no_data_found then      
return '';
end;
Does anyone tell me how to reference it in program unit? Does Oracle Reports 6i support this operation?

There hasn't been any changes to the way lexicals and bind variables work in Reports between 2.5 and 6i. There are different versions of PL/SQL and you might be hitting some problem here.
In your case, you shouldn't be using the query lexical "&p_where_clause" just the PL/SQL bind variable syntax ":p_where_clause". Since you're creating a PL/SQL cursor, you should probably use dynamic sql creation with a concatenation of the where clause to build up the SQL for the cursor. Check out the PL/SQL documentation for this.

Similar Messages

  • How to reference layout object in the program unit?

    Hi Everyone
    I am trying to change the outcome of the result for a field- F_Test_Result1, so i create a format trigger for it, the code is showed at below:
    function F_Test_Result1FormatTrigger return boolean is
    begin
    if F_TEST_Result1 = '0'     then
         F_Test_Result1 := 'Pass';
    end if;
    return (TRUE);
    end;
    but the report builder return error said F_TEST_Result1 is not defined yet. so how do i refer these layout object and data object(from the data model) in trigger?
    Thank you
    Bryan
    Edited by: Bryanevil on Apr 22, 2009 8:50 PM

    Hello,
    I suggest to Create a Formula Column in the group containing the column PASS_FAIL_SUMMARY
    and use a PL/SQL code like this for the Formula Column :
    function CF_1Formula return Char is
    begin
    if :PASS_FAIL_SUMMARY = '0' then
    return ('pass');
    else
    return('--');
    end if;
    end;
    Then, set this Formula Column as Source for the field in the layout .
    Regards

  • What are user parameters? and how can i add user parameter

    Hi Experts,
    what are user parameters? and how can i add user parameter and how can i add a user parameter
    HR_DISP_INFTY_NUM with value X?

    user parameters are used give reference grps and counntry grouping use SU3 tcode as amite said

  • How to include input user parameter values in XML report output?

    How can i include input user parameter values in XML report output. I a have a report which can be run by providing start date and end date. I would like to include value of these parameters in XML output to enable me to figure out dates for report, just by looking at XML output.
    Rgds,
    manish

    I think all the XML attributes can contain lexicals. If you bring up the property palette against the report object you can just set the following:
    XML Tag Attributes: myParameter="&<P_1>"
    where P_1 is your user parameter.

  • Parameter Form-How to use a user parameter to retrieve list of values for another par

    I am developing a report in Reports 6i. There are 2 parameters on parameter form namely year and month.
    LOV for Year is retrieved from database. After user selects a value from LOV for year, I want to retrieve another LOV for month parameter based on selected year. That is how can we use a user parameter's value to dynamically retrieve an LOV for another parameter on the same parameter form.
    Pl. guide.
    Thanks in anticipation.

    You can't restrict the "List of Values" of one parameter based on the value of another parameter within the Reports Builder/Runtime parameter form.
    The SQL select statements within LOV's are only executed once. They aren't re-calculated when you enter, leave or change other field values in the parameter form. This is mainly because there is no event model in the Reports parameter form and it only supports basic form functionality.
    To do what you're after in a client-server environment you need to create an Oracle Forms "parameter form" and use that to execute the Report using the run_product() call. Actually, you should probably use Oracle Forms for any more generic "form" functionality such as radio buttons or check boxes.
    If you're in a Web rather than Client-Server environment, it may be easier to create a JSP based parameter form. You can then use Reports 9i since it has JSP support to assist here.

  • How to create a user parameter for a report

    Hi,
    I am writing a report in ORACLE 6.0, and I need to create a user
    parameter for my report.
    My database includes fields: item_id, item_cost, and item_desc.
    What I want to do is: set up a user parameter for item_cost, and
    the report will prompt the user to enter number into this
    parameter, then the report will display item_id and item_desc
    depending the user-entered item_cost.
    thanks.
    Jun

    My SQL code is below:
    select item_id, item_invo, item_desc
    from tb_item
    where item_invo=:p_1
    but I got an error message:
    REP-0788:Warning: The value of restricted LOV parameter p_1 is
    not among the selectedble values.
    Would you help me again? Thanks.
    Jun

  • How does workflow retrieve users under an org. unit when sending email

    Dear All:
    Workflow supports sending email activity where you can specify the receipt type and receipt ID. For example, the email is supposed to send to the users within an organizational unit.
    I am just wondering how SAP workflow determines the users within an organizational unit? Does it use HR-ORG evaluation path to get objects under an org. unit?
    Many Thanks in advance!
    Haifeng

    Hi,
    For example, the email is supposed to send to the users
    within an organizational unit.
    Yes workflow template and standard task are also part of organizational unit. As you mentioned that the if the recipient type is choosen as Organizational Object then the workflow system will try to fetch the data from the organizational unit based on the recipient ID you provided in the mail step let say if you are using the recipient id as position Id then workflow system will try to get the data from the organizational unit
    Org object types supported by the workflow system are US, C, S, O....
    If at all the you choose the workflow recipient type as email address which can be a external address then in that case it just simply makes use of BCS communication methods and and in this case your SCOT settings must be configured properly.
    The difference between the first and second  is, in the first case the work items or mails/documents will be sent to sap inbox (SBWP) in the second case it depends on the mail ID you mention for example a outlook mail ID.
    Regards
    Pavan

  • How can I add user from C program?

    I need to add, change, remove users and change passwords from my application on Solaris 2.6.
    How can I do it?

    Hi,
    I do not think there is a direct API for accomplishing this.
    You can try calling "useradd" through Std C library function
    system (3C).
    "useradd" has a limitation that you can set/change password. Bundled
    with Solaris 2.6 and higher, there is a functionality called
    'admuseradd' which allows the passwd to be set on the command line. You will need to install Adminsuite from the 'Solaris Internet
    Extension CD' to get the functionality.
    Hope this helps.
    Thanks,
    Gopinath
    Sun - DTS.

  • How does workflow retrieve users under position/job when sending email

    Dear All:
    This question is after my thread before: 'How does workflow retrieve users under an org. unit when sending email", my further question would be how to get users under a position/job.
    I find the evaluation path 'WF_ORGUS' that is delivered by SAP, and I am wondering whether it will cover all my cases: to retrieve users under an org. type including org. unit, position and job.
    Thanks in advance!
    Haifeng Hu

    Hello,
    Okay, I misunderstood. You don't get to specify the evaluation path - if you fill in a Position then SAP fetches the users in that position. It works, so I haven't thought about it any further. Any reason you want to know exactly how it is done?
    regards
    Rick Bakker
    hanabi technology

  • What does "error in user parameter list" mean? how do i fix it?

    Can't burn my movies to iDVD because this message keeps showing up "Unable to prepare project for publishing". The project could not be prepared for publishing because an error occurred. Error in user parameter list. Please tell me how to fix this.

    The first thing I test to do when iMovie doesn't behave as it should is to trash the preference file.
    It's a very common way to try to solve problems with Applications that has problems.
    Reg iMovie that file is named as one or more of these
    com.apple.iMovie.plist
    com.apple.iMovie3.plist
    com.apple.iMovie7.plist
    com.apple.iMovie8.plist
    com.apple.iMovie9.plist
    com.apple.iMovieApp.plist
    Not always all of them are present - but many can be
    I also trash
    com.apple.iApps.plist
    and clean out the Cache folder
    All of them are in a folder named Library - BUT as there are more than one - most people chose the wrong one.
    The obvious one is Library on Root level - first window that opens when You open Your Start-Up Hard Disk.
    AND - that is the wrong one
    The one to find is the one in Your User Account folder - and in Mac OS X.7 and so on - it is HIDDEN.
    Easiest way to find the correct one is to go up to the top row Menu (Apple symbol to the top Left hand corner of screen) and here go to the right to GO and keep Option-key DOWN and it will Show You the correct Library.
    Now - here find the folder Preferences to move out the com.apple.xxxxxx files to the desktop WHEN APPLICATION IS NOT RUNNING ! IMPORTANT !
    then find the folder named Caches - here too - try to identify the cache files that are connected to the application - and move them too to desktop.
    Now try to run Your application e.g. iMovie
    There is an easier way to test if this is the real problem by
    • Goto Apple menu and down to System preferences
    • Select Accounts
    • Click on the Plus sign and create a new user e.g. test1
    • Apple menu - and down to Log out
    • Now log into the new user test1
    • Now see if application runs as intended
    If so - then the problem to 99% is in the Pref or Cache files.
    Yours Bengt W

  • Whenever i try sharing my imovie trailer with idvd it says "The project could not be prepared for publishing because an error occurred. (Error in user parameter list)". How am i supposed to burn it to a dvd then?

    Whenever i try sharing my imovie trailer with idvd it says "The project could not be prepared for publishing because an error occurred. (Error in user parameter list)". How am i supposed to burn it to a dvd then?

    Additional info: trying to write to internal disk (268 GB Free out of 499 GB)
    Please advise, alko80

  • Unable to prepare project for publishing The project could not be prepared for publishing because an error occurred. (Error in user parameter list) How do I fix this???

    Unable to prepare project for publishing
    The project could not be prepared for publishing because an error occurred. (Error in user parameter list)
    How do I fix this???
    I have downloaded my family movies captured on Hi8 video through a Dazzle hollywood DV-bridge to the iMac. Everything went well until I tried to finalize the project.

    I'm having the same problem. 
    When I export (and I want HD quality) I get the error message that
    Unable to prepare project for publishing The project could not be prepared for publishing because an error occurred. (Error in user parameter list)
    How do I free up more space on my startup disk?  My hard drive has 158.61 GB free.  Do I need to free up more space?

  • I am trying to finalize a movie project and I get an "error in user parameter list" message.  What does that mean, and how can I fix it?

    I am trying to finalize a movie project and I get an "error in user parameter list" message.  What does that mean, and how can I fix it?

    what movie editing software are you using?

  • How to send a user defined parameter to a web form?

    Hi,
    I4m looking for a solution how to send a user defined parameter to a web form when I start the form from a html-page.
    I think that it should work to add the parameter to the URL.
    Example: I added myparam=myvalue at the end oft the URL
    http://my.server.com:7777/f60cgi?form=myform.fmx&userid=scott/tiger@mydb&otherparams=useSDI=NO&lookAndFeel=generic&colorScheme=teal&myparam=myvalue
    How can I fetch the parameter myparam in forms?

    You have the user the otherParams parameter, which you can specify in the formsweb.cfg file, or override on the url. e.g. http://myhost/servlet/f690servlet?config=myApp&otherParams=myParam=myValue
    In the Forms Builder, in the Navigator window, there is a node called Parameters. Create one in there, and then you can refer to it like a block variable. e.g. if :myparam = 'myvalue' then...
    At runtime, Forms will match up any parameters on the command with parameters defined in your form, and populate them for you. You don't have to do anything.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • How to reference a field statically in a program?

    Hi Everyone,
    Can any one explain me how to reference a field statically.
    As the error on Extended program check is as follows:
    Field FLAG is not referenced statically in the program   
    where as the particular field has been defined as below in the program :
    when 'SMTP_ADDR'.
              DATA: flag type i.
    I think is there a need to define the field globally.
    Thanks and Regards,
    Johny

    Hi,
    We can avoid this EPC check by deleting or putting a comment Or By passeing the EPC to it ie
    DATA:
    w_flag type i." #EPC
    we can also avoid the EPC error by this way.then this willnt be aa part of EPC check
    Thanks & Regards,
    Chandralekha.

Maybe you are looking for

  • One Mac Mini-Two Logins-One iTunes Account?

    My Kids have a mini. They each have their own logins. Is it possible to have both logins access the same iTunes account? today if one logs out while their iPod is in it will erase the ipod and synch it with the second login. I also find myself buying

  • InDesign CC can't open file - error: saved in newer version (CS7.0)

    My coworker and I set up CC accounts last month (upgraded from CS5) but now when I'm trying to open a file she edited recently I get this error: "Cannot open "file name.indd" because it was saved with a newer version of Adobe InDesign (CS7.0). You mu

  • What is Letterboxing??

    When I import video from my digital camera a box automatically pops up and it says "letterboxing .. this may take a while". It takes forever - then the video is distorted. iMovie "Help" does not even contain "letterboxing".

  • High Response Times with 50 content items in a Publisher 6.5 portlet

    Folks, Have set up a load test, running with a single user, in which new News Article content items are inserted into a Publisher 6.5 portlet created of the News Portlet template. Inserts have good response times through 25 or so content items in the

  • Business Partner Role 'Employee' - not in WFM Core

    Hi, Having created a Business Partner (under role Employee), when I try staffing this resource to a task at the front end (I am using cProjects 4.0), I am not able to. Instead, I get the message "Person XYZ is not known in WFM core." What's to be don