Creating Subquery Depend on user parameters at discoverer

Below is An Example
I have atable that contains history data of a Receipt, I'll assume the table contains only two columns
Status_Date Status
01-jan-12 Open
15-jan-12 Modified
20-jan-12 Requier Approval
25-jan-12 Approved
31-jan-12 Closed
The report need to display the status at specific date entered by the user
if the user enter parameter 10-jan-12 the status is still open so the report display Open
if user enter 26-jan-2012 the report should display "Approved" the last status before date parameters
and so on .....
is there any way in the discoverer to do this. if i create a condition on the date saygin date <= :p_date it'll retirve all the statues before this date not the last status
and if i said date = :p_Date the user may enter a date that is not exists in the table so it'll not retrive any data

Hi Rod West
The calculation using LEAD Function will lead to data like below
01-JAN-2012     OPEN     15-JAN-2012
15-JAN-2012     MODIFIED     20-JAN-2012
20-JAN-2012     REQUIRE APPROVAL     25-JAN-2012
25-JAN-2012     APPROVED     31-JAN-2012
31-JAN-2012     CLIOSED     
so when using :p_date between status_date and status_end_date
In case :p_date = '05-jan-2012' it'll return OPEN
In case :p_date = '16-jan-2012' it'll return MODIFIED
Good work BUT
In case :p_Date = '15-JAN-2012' it'll return 2 records OPEN, Modified * can be fixed using >= and <
BUT
In case of 01-FEB-2012 it'll not return any result
while the status starting from 31-jan-2012 till now is CLOSED.
:(

Similar Messages

  • How to create optional parameters in discoverer 10.1.2

    I am new to discoverer, Can any one tell me how to create optional parameters in Discoverer desktop edition in 10.1.2
    I looked at the following thread which says optional parameters can be created in 10.1.2 but doesn't tell how tro create it
    How to create optional parameters in Discoverer
    Thanks in Advance

    Hi.
    In the thread you quoted Michael Armstrong-Smith says that optional parameters can be created in Plus but not in Desktop and that's true.
    So your question "how to create optional parameters in Discoverer desktop" is already answered in that thread.
    Assume that it is a typo and you wanted to ask how to create optional parameters in Plus.
    Then the answer is simple: Just uncheck the "Require users to enter a value" checkbox when creating new parameter.
    Regards Jakub

  • I am creating parameters in Discovere plus

    Dear ,
    I have created parameters in Discoverer Plus and follow these steps.
    •     Enter Category in the "What do you want to name this parameter?" field.
    •     Select Prod_Category from the "Which item do you want to base this parameter on?" drop-down list.
    •     Select the Create condition with operator check box and select IN from the drop-down list.
    •     Enter Select a Category in the "What prompt do you want to show for this parameter?"' field.
    •     Select the Require users to enter a value and Enable users to select multiple values check boxes.
    THESE OPTIONS ARE DISABLE on parameters vizard
    1. What default value do you want to give this parameters.
    2. Do you want to list of the value for this parameters.
    i am unable to create lov in parameters . please guide me.

    Hi,
    The list of values is not created within the plus
    the list of values (called item classes) are created in the Admin
    Please refer to the discoverer administrator guide
    http://download.oracle.com/docs/html/B10270_01/item_cla.htm#1656
    Tamir

  • Is it possible to use dependent parameters in discoverer

    Dear All,
    Is it possible to use dependent parameters in discoverer... Like in RDF's(concurrent program)
    Reddy.

    Hi Hussain,
    I think In Discoverer 4i there is no optional parameters Option.I wrote in condition(Desktop addition) like Org = :Org_param or org = DECODE(:"Org Parameter 1",'All',Org) .
    At the time of running work book I am passing 'All' in parameter it's taking all orgs and giving org's data.
    But in application i am not able give 'All' in parameters.
    how to do optional parameters in 4i.
    In 10G Optional parametes are there.
    Regards,
    Reddy
    Edited by: Hanimi on Apr 15, 2009 5:39 AM

  • Challenge passing parameters to discoverer report

    Hello everyone, I am following the instructions on this website - http://learndiscoverer.blogspot.com/2008/11/metalink-note-304192.html
    Basically, we want to use parameters for discoverer reports, especially date parameters because of some performance issues we have been having with discoverer.
    Here is the process I am using. Please correct me if I am doing anythinng wrong.
    1. Login to apps schema and create context
    CREATE OR REPLACE CONTEXT DISCO_CONTEXT
    USING EUL4_US.DISCO_PKG
    2. Login to eul4_us schema and create package
    CREATE OR REPLACE PACKAGE DISCO_PKG
    AS
    FUNCTION set_context(p_name VARCHAR2,
    p_value VARCHAR2) RETURN VARCHAR2;
    FUNCTION show_context(p_name VARCHAR2) RETURN VARCHAR2;
    END disco_pkg;
    CREATE OR REPLACE PACKAGE BODY DISCO_PKG
    AS
    FUNCTION set_context(p_name VARCHAR2,
    p_value VARCHAR2) RETURN VARCHAR2
    IS
    BEGIN
    dbms_session.set_context('DISCO_CONTEXT', p_name, p_value);
    RETURN p_value;
    END set_context;
    FUNCTION show_context(p_name VARCHAR2) RETURN VARCHAR2
    IS
    BEGIN
    RETURN SYS_CONTEXT('DISCO_CONTEXT', p_name);
    END show_context;
    END disco_pkg;
    Then grant access to apps
    GRANT ALL ON DISCO_PKG TO APPS;
    Then import the functions show_context and set_context into discoverer
    3. Go back to apps schema and create synonym
    CREATE PUBLIC SYNONYM DISCO_PKG FOR EUL4_US.DISCO_PKG;
    4. Create discoverer custom folder using the following query:
    SELECT DISTINCT
    pet.run_result_id
    ,papf.employee_number
    FROM
    per_all_people_f papf,
    --hr_lookups hl,*
    per_all_assignments_f paaf,
    hr_all_organization_units haou,
    per_jobs pj,
    per_grades pg,
    pay_people_groups ppg,
    --per_addresses pa,*
    --hr_locations_all hla,*
    per_positions pps,
    per_people_f ppf,
    pay_assignment_actions paa,
    pay_payroll_actions ppa,
    PAY_RUN_RESULTS_V pet,
    --pay_element_types_v1 pet,
    pay_all_payrolls_f papaf
    WHERE
    papf.person_id=paaf.person_id
    AND papf.employee_number=ppf.employee_number
    AND paaf.organization_id=haou.organization_id
    AND paaf.job_id=pj.job_id(+)
    AND paaf.grade_id=pg.grade_id(+)
    AND paaf.people_group_id=ppg.people_group_id(+)
    AND paaf.position_id=pps.position_id(+)
    AND paaf.business_group_id=0
    AND paa.assignment_id = paaf.assignment_id
    AND paa.payroll_action_id = ppa.payroll_action_id
    AND paa.assignment_action_id=pet.assignment_action_id
    AND paaf.payroll_id=papaf.payroll_id
    AND ppa.effective_date BETWEEN paaf.effective_start_date AND paaf.effective_end_date
    AND ppa.effective_date BETWEEN papf.effective_start_date AND papf.effective_end_date
    AND ppa.action_type ='R'
    AND ppa.action_status = 'C'
    AND paaf.assignment_type = 'E'
    AND paaf.primary_flag = 'Y'
    AND haou.business_group_id=0
    AND ppa.effective_date = TO_DATE(SYS_CONTEXT('DISCO_CONTEXT','PAYROLL_DATE'))
    5. Create a parameter called Payroll Date. Default value is set to NULL and the "Create Condition" checkbox is unchecked.
    6. Create a calculation
    SET_CONTEXT('PAYROLL_DATE', TO_CHAR(:Payroll Date))
    And that's it.
    The thing is, this doesn't work for me.
    But for the same query, if I enter the date value I am substituting, values show up. So it seems for some reason, the context value probably isn't being set or thereabouts.
    I have tried setting the context manually in a TOAD session using:
    declare
    v_ret varchar2(50);
    begin
    --dbms_session.set_context('DISCO_CONTEXT', 'PAYROLL_DATE', '31-MAR-2010');
    v_ret := disco_pkg.set_context('PAYROLL_DATE', '01-MAR-2010');
    dbms_output.put_line(v_ret);
    end;
    And afterwards run the query:
    select sys_context('DISCO_CONTEXT', 'PAYROLL_DATE') from dual
    And results do show up here. So I'm wondering what could be wrong.
    Please help.

    Hi ,
    Are you saying I should create a new workbook that is not based on my custom folder for setting and showing the context value? You don't need to create a new workbook, you can just create a new worksheet in your report workbook, but you will need two sheets to use contexts. The sheet that sets the contexts should not be based on your custom folder, but on a folder that returns a single row. You cannot set and check contexts in a single SQL statement, so you have to have 2 worksheets.
    You can default the contexts using a trigger or initialisation SQL so that the user only has to set the contexts if they are not using the defaults.
    Rod West

  • Show report in different currency depending on user parameter

    hi all,
    i'm trying to show my report in different currency, depending on users given parameter.
    i hold my account balance in USD based. User should select one parameter, in which currency they want to see their account balance. (e.g. EURO, GBP ...) and depending on their selection, i want to convert USD based info into chosen currency, by fetching field from currency table and making some calculation.
    also i want to include in report currency($, £ ...) accordingly ().
    how can i achieve this, has somebody any suggestion to me?
    thanks in advance.
    bogi.

    hi,
    i think i need to explain my problem more detailed. anyone who has suggestion, please help me.
    i have 3 tables account, times and currency.
    - times table has time_key, date, day_of_week fields.
    - account table has - account_balance and time_key_FK fields.
    - currency table has currency_type, amount, time_key_FK fields.
    1. i have function decode(:Currency,'USD',account_balance,'EURO',--here i want to replace my calculation CALC1---)
    CALC1- this calculation need to some calculation like this: account_balance * (fetched field from this sql)(select amount from currency, account where currency.currency_type='EURO' and account.time_key_FK=currency.time_key_FK)
    i tried to do this, but discoverer plus doesn't let me make condition and calc. i'm very confused.
    2. after i achieve this query, somehow i want to display on worksheet on which currency is it based. can i get parameter value, and show this value as in column heading?
    tnx!!!

  • How to set user parameters in transaction MD61 through a report?

    Hi,
    I want to set default values for 'Requirement Type' in user parameters of transaction MD61 through a report. Please help.
    Thanks in Advance.

    Create Variant using SHD0 and with Group and assign to particular user's
    Here is the steps
    Creating a Variant Group
    1. Open transaction SHD0, enter the transaction code, and press enter.
    2. Choose the Standard Variants tab page, and then the sub tab page Variant Groups, and enter a group name, such as GROUP_GEN
    3. Choose Create. Enter a short text on the Maintain Variant Group window that appears and save the variant group.
    Assigning Users
    Once you have created the variant group and the relevant transaction variants with screen variants, you now need to assign users to the variant group as follows
    1. Return to the Standard Variants tab page, Variant Groups sub tab page.
    2. Enter the name of a user that you want to assign to this variant group, and choose Assign. A message that this user was successfully assigned to the variant group appears in the status bar. If you choose a where-used list for users, this user is displayed in the user list.
    3. However, for the screen variants of the variant group that you created above to be displayed for the user, you first need to select Set Proposal. The user is assigned to the group and the associated transactions are started with the corresponding variants only once you choose the Set Proposal function.
    You can use this procedure of user assignment for all other users that you want to add to the variant group
    Hope this helps.
    Thanks
    S.N

  • Can't create multiple dependent LOVs from the same bind variable

    Hi all,
    I'm having difficulty creating multiple dependent LOVs from queries based on the same bind variable in my JSF application (JDev 10.1.3.1). Basically I have a static LOV in a af:selectOneChoice component from which users select a value which then becomes the bind variable value for two separate queries that generate two different dependent LOV. Having developed the code along the lines of Steve Muench 's blog (http://radio.weblogs.com/0118231/2006/04/03.html#a685), the first dependent LOV works really well. The first dynamic LOV gets refreshed whenever the list from the static LOV changes, and I can execute other queries based on the values selected.
    The problem arises when I want to create the second dynamic/dependent LOV that has the same bind variable based on the same selected value from the static LOV. Here I would also like the functionality whereby the second dynamic LOV is also refreshed after the selected value in the static LOV changes. Thinking that all I had to do was replicate the methodology used in creating the first dependent LOV, I created the second iterator, invokeAction and other binding components in the PageDef. The executable section now looks like the following:
    <iterator id="SelectStaticQueryViewObjIterator"
                  Binds="SelectStaticQueryViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>
    <invokeAction id="refreshDynamicQuery1BindParameter"
                  Binds="ExecuteWithParams1" Refresh="prepareModel"
                  RefreshCondition="#{empty requestScope.VariableChanged}"/>
    <iterator id="SelectDynamicQuery1ViewObjIterator"
                  Binds="SelectDynamicQuery1ViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>
    <invokeAction id="refreshDynamicQuery2BindParameter"
                  Binds="ExecuteWithParams2" Refresh="prepareModel"
                  RefreshCondition="#{empty requestScope.VariableChanged}"/>
    <iterator id="SelectDynamicQuery2ViewObjIterator"
                  Binds="SelectDynamicQuery2ViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>I now have a problem whereby everytime I change the value of the static LOV, multiple HTML components for the same ADF component are being generated (the LOVs are refreshed via PPR). The surprising thing is that this duplicating behaviour applies to all ADF components listed after the first dynamic LOV in the *.jspx source. For example, I have a <af:outputText="Test Text"/> component created after the first dynamic LOV. Each time the value in the static LOV changes, a duplicate HTML component is created. This also applies to the 'related' second dynamic LOV which is bound to a af:selectOneChoice component - multiple dropdown lists are created. I've checked with the browser's Page Source and there are actually multiple html components being generated with their own unique ADF-generated IDs. I've tried all different options for the Referesh and RefreshCondition attibutes in the second invokeAction element but nothing seems to eliminate this issue.
    Any suggestions about how I might create multiple dependent LOVs from the same bind variable that get refreshed when the selected value changes would be greatly appreciated.
    Thanks
    George

    Hi all,
    Just updating the thread on how I've overcome this issue. As it stood the manner in which I was trying to solve my use case, as described above, was creating an absolute mess. Then with a blank sheet of paper I quickly realised that a much simpler solution would be to create a whole series of master-detail VOs and build my components around them. Thankfully I haven't had any issues going down this path as yet.
    Cheers
    George

  • On Lexical variables: Are they always treated as user parameters???

    Hi
    Report Developer 10g, Winodws XP platform, local client
    I have a dynamic where clause in my report query with a lexical variable &p_where which holds the where clause. This where clause is determined at runtime, depending on the user parameter value that was entered.
    My problem is, the lexical variable &p_where is automatically added to the list of my user parameters and does show up in my parameter form, when the report is run. This will cause lot of confusion to the user, as it is not part of user input.
    It is not a user parameter, but should be treated as a regular variable. How do I work around this?
    Thanks
    Suma

    I understand. The lexical variable was automatically added to the user parameters list upon it having appeared in a query.
    This is expected. The lexical variable must be defined. Since it is not a system parameter, Oracle*Reports added it to the user parameter list.
    But if it is also showing up on your user parameter FORM (the form which solicits input from the user prior to running the report), it can simply be deleted from that form without affecting its use in the query.
    Regards,
    Steve

  • Not able to connect through Application user name in Discoverer Admin

    Hi,
    I created an EUL with all privileges it needed. I created a business area from that EUL and shared it to Application User name through giving access privileges (from Security and Privileges). When I am trying to login through the Application User name in Discoverer Admin it is giving the error like:
    Failed to connect to database - Unable to connect to Oracle Applcations database: invalid username/password.
    Earlier I did in another instance it worked fine but now itself I am facing the problem.
    Thanks & Regards,
    Arun Babu R.

    Hi,
    Please post the application release along with the database version and OS.
    What is the Discoverer version?
    Please see these docs.
    Connecting to an E-Business Suite EUL Using Any Discoverer Component Fails With "Authentication Failed" or "ORA-01017: invalid username/password;logon denied" [ID 364665.1]
    Discoverer 10g (10.1.2) Connections To Oracle E-Business Suite 12 Fails With 'Invalid Username/Password' [ID 443661.1]
    Discoverer 10g (10.1.2) Plus/Viewer Connection To E-Business Suite Database Fails With " invalid username/password" Error [ID 467919.1]
    Connecting to Oracle EBS 11.5.10 with Discoverer 4i/10g Fails with ORA-01017 Invalid Username/Password Error [ID 295037.1
    Discoverer Desktop/Administrator 10g (10.1.2.2) Fails To Connect With Error 'Unable to connect to Oracle Applications database: invalid username/password. ' Only Between Certain Hours [ID 757384.1]
    Connecting to Oracle EBS with Discoverer Fails with ORA-01017 Invalid Username/Password Error [ID 784358.1]
    Discoverer 4i Viewer/Plus Logon To Oracle Applications EUL Fails with "ORA-1017 Invalid Username/Password" Unless a Colon '' : '' is Entered After Username [ID 360314.1]
    Questions And Guidance For Troubleshooting Common Discoverer Desktop and Administrator Connection Issues [ID 415614.1]
    Thanks,
    Hussein

  • Create Idoc in a User Exit

    Hello everyone,
    we have a requirement where we want to create and send an idoc out through a user exit.has anyone done anything like this before?i think it is possible.if anybody has any headup on how to do it please let me know.ok yea i know the function module which is to be used.its idoc_output_inotif.there is a tcode INOT which sends the idoc out but OSS says we cant use it 4.6c onwards and thats the reason this need of creating an idoc in user exit arises.
    i have tried executing the FM independantly and punching in a few values and i saw that it created an idoc in the system.so my guess is, if i can call this FM in one of the user exits for the transaction IW51/52, and pass all the needed values i should get an idoc.
    if anyone has manually created an idoc in a user exit please suggest me some options.
    thanks a lot.

    Hi Sanket ,
    Distribution Model is required when you use message control to send IDOCS . Since you are triggering your IDOC in a uaer exit , a distribution model is not required . Simple create a partner profile in WE20 and assign your message type in outbound parameter. You need not fill the message control parameters in WE20.
    ( If you use message control , the process code links the respective FM like  idoc_output_inotif in your case ).
    But in your case you will have to trigger your IDOC in user exit . You have two options here -
    First Try -  idoc_output_inotif in the user exit to fill the segments , then use  FM MASTER_IDOC_DISTRIBUTE to trigger the send process.
    If this  does not work then use
    L_IDOC_HEADER_CREATE -Once
    L_IDOC_SEGMENT_CREATE ( Once for each segment ).
    ( This will create IDOC on data base )
    L_IDOC_SEND - Once to trigger the IDOC created above.
    Hope this helps .
    Cheers

  • Report data filters depending on user

    I have web intelligence report returning data grouped by departments. Is it possible to filter report data by department for user logged in depending on user's department?
    Thanks
    Edited by: Denis Sapunkov on Aug 19, 2010 12:58 PM

    This can be achieved in 3 ways:
    1. In Web Intelligence
    Providing you have a table in your database that holds username and department you create a webi report where you select "Dept. Username", "Department" and all other objects you require for your report.
    - Run the Query
    - Create a new variable called CurrentUser => Formula: =CurrentUser()
    - Create a new variable called "Department Filter" => Formula: =If([CurrentUser] = "Dept. Username" ; "Yes" ; "No")
    - Create a new report filter: Department Filter = "Yes"
    This will only return the deprtment for the user that is currently logged on to BO.
    2. On universe level you could use access restrictions to achieve this
    3. If you require to schedule the report, you could create a group for each department and assign this group to a profile that filters on department.
    Hope this helps!

  • Display different portal page or portlet depend on user's

    can I display different portal page or portlet depend on user's
    profile,such as: if user's gender is male, display a portal
    page named "malePortal",if the user's gender is female, display
    a portal page named "femalePortal"

    This can be accomplished by using Entitlements Segments.
    You can define them in EBCC. you will have to define a user profile which
    will contain user information (like gender).
    Once you have two segments defined, you can use portal administration site
    to configure entitlements for pages and portlets.
    Regards
    Mike
    "Joshua Davies" <[email protected]> wrote in message
    news:3d1c78cb$[email protected]..
    >
    "xxxx" <[email protected]> wrote:
    can I display different portal page or portlet depend on user's
    profile,such as: if user's gender is male, display a portal
    page named "malePortal",if the user's gender is female, display
    a portal page named "femalePortal"If it has to be a portlet, you'll have to create a custom web flow thatstarts with
    a custom IP class. If you just want to show different content based on auser profile
    value, take a look at "Content Selectors" in EBCC; this sounds like aneasier way
    to get where you're trying to go.
    I don't think there's a way to display different portal pages/portalsbased on user's
    profile settings.

  • Chioce of KF depending on user entry

    Hello,
    I have 3 different key figures that separate transaction currency, company code currency and controlling area currency per record.
    The requirement is to be able to display one of these key figures based on user entry. That is, I'd like to choose for example company code currency and thereby use that particular key figure in the query.
    Traditionally, a currency type is used for this, but in this case I doesn't exist. How would you solve this issue? Via a virtual KF?
    Regards,
    F C

    Hello,
    I want the query to select one of the mentioned key figures depending on the user entry. Hence, I cannot use variables. I reccon I need to fill a virtual KF with the value of either one of the real KF's.
    I could create an own column per KF and hide/unhide, but this is not the requirement. Only one should be chosen depending on user entry.
    Any other ideas?
    Regards,
    F C

  • Referencing runtime values of user parameters

    Hi folks,
    i have a report that displays data for a period between 2 date values that are specified at runtime via 2 date user parameters created in the report.
    i want to reference the runtime values of the 2 user parameters in boilerplate text as follows
    Between <date_param1> And <date_param2>
    Since they are not fields, i cannot reference them in boilerplate text as described in the help notes.
    Can anyone help out.
    thanks in advance.

    In addition to fields, you can also reference column or parameter values directly from within boilerplate. So you should be able to do: "&<date_param1> And &<date_param2>"
    Alternatively, create a field - "F_1", mark it as hidden and set its source to "date_param1". You can then reference the field as defined within the help notes.

Maybe you are looking for

  • How to generate a trigger in the CIF on ECC custom field ?

    Hi We have an intercompany scenario in ECC where we use a custom transaction to convert the stock transfer order into a sales order (at the source plant). As the 2 objects are not technically linked in ECC, we modified the CIF in order to delete the

  • How to take bake my data from an Iphone which is in recovery mode.

    Hi All, I badly need to take my datea back from my Iphone which is in recovery mode. here is my story, I went to a very important scientific conference and I was excited about using my Iphone to do all the tasks I used to do with paper including taki

  • External Hard Drive Won't Unlock?

    Hello All, I have an external hard drive that I'm using with my MacBook Air (2012) that refuses to unlock. When I type in the password to unlock the hard drive, the box freezes and doesn't do anything unless I unplug the connection cord or until I wa

  • In Pages, how can I set a background for the whole document?

    I tend to regard Pages as more of a page layout program than a simple word processor, so I use it for stuff containing graphics as well as text. Now I want to put a kind of frame around every page in the document, and I want this frame to be effectiv

  • External Connection issue

    Hi everyone, I have a External Connection class of which i have a Service Object (SO) in one partion, Now that i want this Listener to listen on two (2) different port numbers as iam expecting to receive more number of connections. As of now i have s