Discover custom folder parameter
Greetings everyone,
I`m working with Oracle Discoverer Release 3.1 Admin and User Edition. I would like to pass parameters to a custom folder, have followed the steps specified in Doc ID: Note:282249.1 and Doc ID: Note:304192.1, everything works fine but when i close the workbook (User Edition) and reopen again i get the following message:
"1 = SET_PARAM(:PARAMETER)
Do u want to substitute another condition, ignore this message, ignore all missing items, or cancel opening this workbook", when i choose any of this option the conditon 1 = SET_PARAM(:PARAMETER) dissapeare, so i have to create it again.
By the way, i have saved all the changes before closing the workbook. What could be happeing.??
Thanks beforehand
Jorge
Jorge.
I know if I don't say it ... someone else will. So let me be the first.
Maybe it's because you're still using v3.1.
All kidding aside, I figure v3.1's got to something like 5 years old now? If you could patch up to atleast 4.148 - which is still extremely old, but pretty stable, you may have more luck.
What I'm wondering is if that note applies to v3.1 or is it something it simply won't support (ie: there were many changes made to the actual EUL and what it supports between various v3 and v4 versions).
Russ
Similar Messages
-
How to pass parameter in where clause in custom folder?
I have the follow query
blue color are the parameters
i have paste this to a custom folder
and
select last_update_date, creation_date
from ra_customer_trx_all
where trunc(last_update_date)='29-SEP-2012'
and customer_trx_id=1109
to another custom folder returning 1 row only and create another worksheet in the same workbook and create
3 parameter and 2 of them pointing to the 1 row query and create calcualtion
SET_CONTEXT('Date_From',TO_CHAR(:Date From)) and SET_CONTEXT('Date_TO',TO_CHAR(:Date To))
and 1 condition 1= SET_PARAM3(:Period)
but this doesnt work for me, no data return please help
select m.party_name TENANT_NAME
, b.interface_line_attribute10 lease_num
--, b.interface_line_attribute12 "PPS Number"
,b.interface_line_attribute2 LOCATION_CODE
,flexv.description property_name
, a2.trx_number INVOICE_NUMBER
--, t.name "Transaction Type"
--, e.attribute15 "AS400 Key"
, b2.description "BILL_ITEM_INVOCIE_DESCRIPTION"
,case when gcc.segment5 like '6%' then 'P/L'
when gcc.segment5 like '7%' then 'P/L'
when gcc.segment5 like '8%' then 'P/L'
when gcc.segment5 like '9%' then 'P/L'
else 'B/S'
end as account_nature
--, gcc.concatenated_segments as "Charge Account"
,gcc.segment1 company_code
,gcc.segment2 department_code
,gcc.segment3 property_code
,gcc.segment4 business_segment
,gcc.segment5 account_code
,gcc.segment6 project_code
,gcc.segment7 intercom_code
,gcc.segment8 spare1
,gcc.segment9 spare2
, b2.extended_amount BILL_ITEM_INVOICE_AMOUNT
,to_char(substr(ps.gl_date,4,8)) gl_period
, b.interface_line_attribute11 bill_start_date
, b.interface_line_attribute14 bill_end_date
, decode(a2.invoicing_rule_id, '-2',
DECODE(TO_CHAR(b.RULE_START_DATE, 'YYYYMM'), to_char(to_date(to_char(TRUNC(to_date(SETPARAM.GET_PARAM3,'yyyymm') , 'Month')-1),'DD-MON-YYYY'),'YYYYMM'), 'Current', 'In Advance'),
'Current') bill_nature
, to_char(a2.trx_date, 'DD-MON-YYYY') invoice_date
,pal.lease_commencement_date
,pal.lease_termination_date
,h.user_name created_by
--, NULL as remarks
from ra_customer_trx_all a
, ra_customer_trx_lines_all b
, pn_leases_all d
, pn_tenancies_all e
, hz_cust_accounts l
, hz_parties m
, fnd_user h
, ar_payment_schedules_all ps
, RA_CUST_TRX_LINE_GL_DIST_ALL dist
, gl_code_combinations_kfv gcc
, AR_RECEIVABLE_APPLICATIONS_all app
, ra_customer_trx_all a2
, ra_customer_trx_lines_all b2
, RA_CUST_TRX_TYPES_all t
, fnd_flex_values_vl flexv
,pn_lease_details_all pal
where
app.APPLICATION_TYPE = 'CM'
and flexv.flex_value=gcc.segment3
and flexv.FLEX_VALUE_SET_ID=1014916
and pal.lease_id=d.lease_id
and app.applied_customer_trx_id = a.customer_trx_id
and app.customer_trx_id = a2.customer_trx_id
and a2.cust_trx_type_id = t.cust_trx_type_id(+)
and a2.org_id = t.org_id(+)
and b.customer_trx_line_id = b2.previous_customer_trx_line_id
and dist.CUSTOMER_TRX_LINE_ID = b2.CUSTOMER_TRX_LINE_ID
and dist.account_class = 'REV'
and dist.account_set_flag = DECODE(NVL(a2.invoicing_rule_id,1), -2, 'Y', 'N')
and gcc.CODE_COMBINATION_ID(+) = dist.CODE_COMBINATION_ID
and b.interface_line_attribute10 = d.lease_num
and d.lease_id = e.lease_id
and e.primary_flag = 'Y'
and b2.customer_trx_id = a2.customer_trx_id
and a2.bill_to_customer_id = l.cust_account_id
and l.party_id = m.party_id
and a2.created_by = h.user_id
and ps.customer_trx_id = app.customer_trx_id
and ps.gl_date between trunc(trunc(TO_DATE(SYS_CONTEXT('DISCO_CONTEXT','Date_From')),'MM')-1,'MM') and trunc(TO_DATE(SYS_CONTEXT('DISCO_CONTEXT','Date_To')),'MM')-1What exactly is wrong with the results? Can you make the report include the gl_date so that you can see exactly what is being included?
The only way to troubleshoot this is to go back to basics. You have to be 100% certain that the parameter and calculations for the dates are working. You have granted execute permission over the function to your EUL owner - yes? What I did was create the function in a package owned by EUL_US then I had no issue with grants or permissions.
Also, gl_date is a DATE and not a string right? I ask because if it is not a date but a string then some dates might be left out.
Assuming you are 100% certain of the building blocks you should start by including only the gl_date and primary key from the table you are using. Once you are sure you are getting the right data you can start to add in more fields.
I do notice you are using E-Business Suite objects. I copied the code into my system where I am not using leasing. So I commented out the references to the 3 PN tables. I got 150 rows of data when I queried using the parameter and again when I hard coded the BETWEEN for the gl_date. You do have to make sure that your EUL owner has been granted SELECT right from all the tables and views used in your code and, if you intend to share this code with someone else, you will also need to have GRANT rights.
Try your code in a SQL tool such as TOAD and see what happens. Are you absolutely sure that every one of your transactions has an entry in the PN tables? This might be why you are not getting the results you expect. You could try, as I did, to comment those lines out and then see what happens.
Hope this has given you enough to solve your issue
Michael
PS. It would be nice to know your name. You haven't used it once in your thread. -
Passing parameter to a query in Discoverer Admiin custome folder.
I am developing a report in which I need to paa in the request Id as parameter to display the user the data corresponding to that request Id. However the query is very complex and If I am enetering the request Id in Discoverer Desktop se as Condition for the workbook created the report takes a lot of time to generate. Is there any mechanism through which I can pass the parameter directly to the Custome folder query. As this will reduce my computation time since all the joins will be done only for the rows with that given request Id rather than for all the rows which is happenning correctly.
Thanks.Hi,
Well there is no straight forward way to do that.
There is a work around to get that functionality by using outer tables or context.
Take a look at the following posts:
Re: Parameters in SubQuery
Re: Parameters in Discoverer Administration
Re: Passing multiple parameters into Custom Folder... -
Parameter value in sql statement (Custom Folder)
Hi ,
I want to formulate a custom folder - consisting of a sql statement , inside of which there is a parameter. Then in Desktop , the users can select a number as the searching criteria and this value will replace the parameter in sql statement , as in the following:
select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA from
select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA , row_number() over (order by sum_posotita desc) rw from
(SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES ,SUM(POSOTITA) SUM_POSOTITA
FROM EKTELESI_AT_SINT_CLINIC A, MITROO_FARMAKOU B
WHERE CODE_FARMAKOU = FARMAK_CODE
GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS))
where rw<=&p
order by SUM_POSOTITA desc The problem is that the use of parameter , whereas in sql*plus is valid, in Discoverer is not....
What can i do in this situation...????
Thanks , a lot
SimonHowever , a peculiar event happens....
whereas the sql statement is:
select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA,RW from
select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA , row_number() over (order by sum_posotita desc) rw from
(SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES ,SUM(POSOTITA) SUM_POSOTITA
FROM EKTELESI_AT_SINT_CLINIC A, MITROO_FARMAKOU B
WHERE CODE_FARMAKOU = FARMAK_CODE
GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
UNION ALL
SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
FROM EKTELESI_AT_SINT_EX_IATR A, MITROO_FARMAKOU B
WHERE CODE_FARMAKOU = FARMAK_CODE
GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
UNION ALL
SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
FROM EKTELESI_AT_SINT_FOREON_MS A, MITROO_FARMAKOU B
WHERE CODE_FARMAKOU = FARMAK_CODE
GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
UNION ALL
SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
FROM EKTELESI_GEN_SINT_KLIN A, MITROO_FARMAKOU B
WHERE CODE_FARMAKOU = FARMAK_CODE
GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
UNION ALL
SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
FROM EKTELESI_GEN_SINT_EX_IATR A, MITROO_FARMAKOU B
WHERE CODE_FARMAKOU = FARMAK_CODE
GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS))
order by RW ascand produces the results....
CODE_FARMAKOU EMP_NAME PACKTYPE PACKSIZE SUM_POSOTITA RW
1000003279 MOXACEF BT 40(BLIST10X4) 45 1
0000014071 DOPAMINE HYDROCHLORIDE VIAL 5 ML X 25 30 2
1000016655 KABIVEN BT 50ÖÕÓ.×1,7ML 21 3
1000014127 DEPON VIT. C BT 2TUBX10 6 4
0000002419 FACTREL INJECTION VIAL 2 ML 5 5
0000086289 DETUSSIN EXPECTORANT BOT 120 ML 3 6
1000016655 KABIVEN BT 50ÖÕÓ.×1,7ML 2 7
1000014127 DEPON VIT. C BT 2TUBX10 2 8
1000000760 DEPON BT 20(BLIST2X10) 2 9
1000003279 MOXACEF BT 40(BLIST10X4) 1 10
1000003279 MOXACEF BT 40(BLIST10X4) 1 11
1000000760 DEPON BT 20(BLIST2X10) 1 12
12 rows selectedIn Discoverer , even i select to see -as parameter- let's say the 10 first records, the system displays the 7 first records , whereas when i want to see the 1,2,3,4,5,6,7 first records the system works fine....and displays accordingly 1,2,3,4,5,6,7 first records. The problem occurs above the 8th record-as parameter selected..!!!!!
I defined the parameter as :Rw<=:Rw
What may be the problem...????
SORRY!!!!! I FOUND THE PROBLEM ....!!!!
Regards and many thanks,
Simon
Message was edited by:
sgalaxy -
Date Parameter in Discoverer Custom Folder
Hi All,
We have a requirement where i need to filter sql query data in the where condition as below.
WHERE 1=1
AND TRANSACTION_DATE BETWEEN :PARAMETER_DATE-90 AND :PARAMETER_DATE-9
Can anyone of you help me on achieving that in discoverer.
Thank You
gt0990Hi,
to do that inside the custom folder you can use DB contexts, read the following :
http://learndiscoverer.blogspot.com/2008/11/metalink-note-304192.html
Re: Passing multiple parameters into Custom Folder...
Tamir -
Issue with Custom data parameter in Excel Data Connection
Hello,
We are querying a OLAP (SSAS 2008) cube using Excel 2007 by creating a data connection to SSAS server with an extended parameter “Custom Data”. We are using custom data parameter to apply our application’s user security to filter dimension
members in Excel’s pivot table report. We have created a pivot table in Excel and the excel is including this custom data parameter along with each request that excel is submitting to SSAS.
However, when the user selects “Show Properties in Report” option for a dimension which is selected in Row-axis of pivot table, Excel is not including custom data parameter . Why this “Custom Data” parameter is not being included in
the request only for this specific case?
1. The Request which sent from Excel to SSAS when user clicks on “Show Properties in Report” option
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><Session xmlns="urn:schemas-microsoft-com:xml-analysis" SessionId="AE6B294B-4983-4010-BC5F-E0896A49ECD9"/></soap:Header><soap:Body><Discover
xmlns="urn:schemas-microsoft-com:xml-analysis"><RequestType>DISCOVER_LITERALS</RequestType><Restrictions/><Properties><PropertyList><Content>SchemaData</Content><Format>Tabular</Format></PropertyList></Properties></Discover></soap:Body></soap:Envelope>
2. The sample Request which sent from Excel to SSAS for all other requests
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><Session xmlns="urn:schemas-microsoft-com:xml-analysis" SessionId="74165AD6-C240-4634-92A1-61A400A3FC97"/></soap:Header><soap:Body><Discover
xmlns="urn:schemas-microsoft-com:xml-analysis"><RequestType>MDSCHEMA_CUBES</RequestType><Restrictions><RestrictionList><CUBE_NAME>RepCube</CUBE_NAME></RestrictionList></Restrictions><Properties><PropertyList><Catalog>QAV10_12thMay2010</Catalog><Timeout>5000</Timeout><SafetyOptions>2</SafetyOptions><MdxMissingMemberMode>Error</MdxMissingMemberMode><LocaleIdentifier>1033</LocaleIdentifier><DbpropMsmdMDXCompatibility>1</DbpropMsmdMDXCompatibility><CustomData>xxxxxx</CustomData></PropertyList></Properties></Discover></soap:Body></soap:Envelope>
As the Custom Data parameter is missing in 1st request our application logic is throwing a custom exception to Excel and Excel is not able to understand the exception message. Excel is sending the same request repeatedly (going into infinite loop) and the excel
window is freezed. Not able to work with excel until restarting the Excel.
Can anyone help me to resolve the above? quick help is much appriciated!
Thanks,
VenkatVenkat,
We have a very similar issue, but there is almost no material to help us. If this gets to you, please let me know if you progressed it or whether I need to go to Microsoft for a solution
THanks
David -
Item based on a formula in a custom folder
Hi, actually I'm using Discoverer 4i and I have a problem when I create (with the administrator) an item based on a formula inside a custom folder.
The item is based on the following formula :
GET_THRESHOLD(Name,'XXI_SZF_SLA_Thresholds_Kormos') -- (1)
where:
GET_THRESHOLD is a function that returns a number
Name is the first parameter (and at the same time another item of the custom folder)
'XXI_SZF_SLA_Thresholds_Kormos' is an hardcoded value.
So..when I wrote the formula into the Item Properties, this is written correctly and when I connect with Desktop or Viewer my report works correctly.
But when I close and I re-open the administrator, I see the following formula
GET_THRESHOLD(Name,'XXI') -- (2)
.....how it was saved in a wrong way....or truncated....
I tried to check also the flag "Automatically save changes after each edit"....but I see always, after I reopened the administrator, the formula (2) and not the formula (1)
Is seems that my changes are not saved !!
Is this a bug ? Can I fix it in some way ?
Thanks in advance
Alexhi,
1. Try to execute the function manually by passing the same value.
2. Discoverer formats the names of Items/folders/parameters etc by replacing underscores ("_") with a space, so this might be the reason, why it converts the value to : 'XXI SZF SLA Thresholds Kormos' and takes only the first string "XXI".
3. Try passing a value without "_".
Hope this helps!
Yogini -
Performance for Custom folder in Discoverer
Hi there, thanks for all your helping questions and sharing your thoughts.
I got issue from user regarding Custom folder in Discvoerer while they try to run report, becoz there are item classes i created and its taking so long time to fetch LOVs.
Below is the query, I used to create custom folder and also created 3 LOVs (item classes) in Discverer Administrator, it is working well and good.
According to the requirement ( you can see bottom of this page) this is the query, Can anyone help me on how to improve performance, in TOAD the query takes long time, so for Item classes also it takes long time. Any ideas would be greatly appreciated, thanks in advance.
SELECT fu.user_name
, fu.description
, fu.start_date "User Start Date"
, fu.end_date "User End Date"
, frv.responsibility_name
, frv.start_date "Resp Start Date"
, frv.end_date "Resp End Date"
, furg.start_date "Resp Assignment Start Date"
, furg.end_date "Resp Assignment End Date"
, MAX (flr.start_time) AS "Last Logon"
, 'Y' as "Logon Flag"
FROM apps.fnd_user_resp_groups_direct furg
, apps.fnd_responsibility_vl frv
, applsys.fnd_user fu
, applsys.fnd_logins fl
, applsys.fnd_login_responsibilities flr
WHERE furg.responsibility_id = frv.responsibility_id
AND fu.user_id = furg.user_id
AND fl.user_id = fu.user_id
AND flr.responsibility_id = frv.responsibility_id
AND fl.login_id = flr.login_id
GROUP BY fu.user_name,
fu.description,
fu.start_date,
fu.end_date,
frv.responsibility_name,
frv.start_date,
frv.end_date,
furg.start_date,
furg.end_date
UNION ALL
SELECT fu.user_name
, fu.description
, fu.start_date "User Start Date"
, fu.end_date "User End Date"
, frv.responsibility_name
, frv.start_date "Resp Start Date"
, frv.end_date "Resp End Date"
, furg.start_date "Resp Assignment Start Date"
, furg.end_date "Resp Assignment End Date"
, NULL AS "Last Logon"
, 'N' as "Logon Flag"
FROM apps.fnd_user_resp_groups_direct furg
, apps.fnd_responsibility_vl frv
, applsys.fnd_user fu
WHERE furg.responsibility_id = frv.responsibility_id
AND fu.user_id = furg.user_id
AND (fu.user_id, frv.responsibility_id ) NOT IN (
SELECT fl.user_id, flr.responsibility_id
FROM applsys.fnd_logins fl,
applsys.fnd_login_responsibilities flr
WHERE fl.login_id = flr.login_id)
Requirement================
We have made use of modifications to a Discoverer report called 'Oracle Users and Responsibilities'. We use the report to review Oracle users and their associated responsibilities. We would like to see if it would be possible to make another report with fields from the above SQL query. The intent is to note when users last made use of a responsibility (last logged on with a responsibility). The above query needs some revision in the fact that it currently only returns responsibilities a user has logged in with. Ideally, we would like to also return the responsibilities a user has not logged in with. If a date parameter is supplied for a report, the end-user will be able to return all users, their responsibilities, and the last time the users logged in. The attached query can specify a user or the user's creation date; ideally, one would also be able to only pick responsibilities user(s) had prior to a specified date. Thus, if they wished to run a report to return all the users and the last time they logged in with their responsibilities if they have had the responsibility for at least 90 days, he could readily do so.Hi,
You could try this query, but whether it will be quicker depends on how you are using the custom folder in your reports.
SELECT ilv.user_name
, ilv.user_id
, ilv.description
, ilv."User Start Date"
, ilv."User End Date"
, ilv.responsibility_name
, ilv.responsibility_id
, ilv."Resp Start Date"
, ilv."Resp End Date"
, ilv."Resp Assignment Start Date"
, ilv."Resp Assignment End Date"
, ilv_login.start_time "Last Logon"
, NVL2(ilv_login.user_id, 'Y','N') "Logon Flag"
FROM (
SELECT fu.user_name
, fu.user_id
, fu.description
, fu.start_date "User Start Date"
, fu.end_date "User End Date"
, frv.responsibility_name
, frv.responsibility_id
, frv.start_date "Resp Start Date"
, frv.end_date "Resp End Date"
, furg.start_date "Resp Assignment Start Date"
, furg.end_date "Resp Assignment End Date"
FROM apps.fnd_user_resp_groups_direct furg
, apps.fnd_responsibility_vl frv
, applsys.fnd_user fu
WHERE furg.responsibility_id = frv.responsibility_id
AND fu.user_id = furg.user_id
) ilv
,(SELECT fl.user_id
, flr.responsibility_id
, MAX(flr.start_time) start_time
FROM applsys.fnd_logins fl
, applsys.fnd_login_responsibilities flr
WHERE fl.login_id = flr.login_id
GROUP BY fl.user_id
, flr.responsibility_id) ilv_login
WHERE ilv.user_id = ilv_login.user_id(+)
AND ilv.responsibility_id = ilv_login.responsibility_id(+)Rod West -
Passing values to the custom folder
Hi All
Can anyone tell me how to pass the dynamic values to the custom folder in the where condition.
I want to build a custom folder using the follwing query
select empno,ename,sal from emp where empno=10, here insted of 10 I want to pass the empno value dynamically.
Eg : select empno,ename,sal from emp where empno=<dynamic value>
I am really appreciate your help on this.
Thanks..Hi
The simplest way to do this is as follows:
1. Create this custom folder: select empno,ename,sal from emp
2. In Discoverer Plus, you build a workbook that has a condition on the empno with a parameter asking the user which one they want to query
The workbook is then extremely flexible and it's easier than trying to add conditions or parameters to custom code.
Best wishes
Michael -
Passing multiple parameters into Custom Folder...
Hi,
We have created a Package as per Metalink Note:304192 to pass parameters to the Custom folder in Disc admin. It is working for some simple sql custom folders. But not for the Custom folder which has some subqueries and inline views. Ex:
This is my query in Admin...
SELECT ENAME, SALARY FROM EMP_HISTORY
WHERE EMP_NO IN (SELECT EMP_NO FROM EMP_WAGES
WHERE WAGE_MONTH = TO_CHAR(SYSDATE, 'MMYYYY')
AND JOIN_DATE BETWEEN APPS.GET_DATE_PARAM1
AND APPS.GET_DATE_PARAM2;
GET_DATE_PARAM function returns the Package variables which were set in Disc Desktop like below.
Created worksheet in Desktop with parameters, p_begin_date and p_end_date and conditions:
1 = SET_DATE_PARAM1(:P_BEGIN_DATE) AND
1 = SET_DATE_PARAM2(:P_END_DATE).
SET_DATE_PARAM Fucntions set Package variables for that seesion at runtime for the related parameters entered by the user. After creating the conditions, the Sql created by Discoverer shows like this:
SELECT O123.ENAME, O123.SALARY
FROM
(SELECT ENAME, SALARY FROM EMP_HISTORY
WHERE EMP_NO IN (SELECT EMP_NO FROM EMP_WAGES
WHERE WAGE_MONTH = TO_CHAR(SYSDATE, MMYYYY)
AND JOIN_DATE BETWEEN APPS.GET_DATE_PARAM1
AND APPS.GET_DATE_PARAM2
) O123
WHERE (1 = SET_DATE_PARAM1(:"P_BEGIN_DATE")) AND
(1 = SET_DATE_PARAM2(:"P_END_DATE"))
So now the problem is: GET_PARAM functions are being executed first rather than SET_PARAM function. So it is not returning any data. If I remove Subquery it works great. So Is there any way to force the optimizer that it executes the Outer condition first and then rest of the inside joins/subqueries/filters ???
Thanks,
Ram.Hi,
There are many ways of doing this. Personally, I prefer to use database contexts as these are more efficient and flexible than other methods. You can access your parameters in a view using SYS_CONTEXT so it avoids a context switch between PL/SQL and SQL database engines.
The steps to set this up are:
1. CREATE OR REPLACE CONTEXT EUL_DISCO USING your_package;
2. CREATE OR REPLACE your_package containing the following functions:
FUNCTION set_context(p_name VARCHAR2,
p_value VARCHAR2) RETURN VARCHAR2
IS
BEGIN
dbms_session.set_context('EUL_DISCO', p_name, p_value);
RETURN p_value;
EXCEPTION
WHEN OTHERS THEN RETURN 'FALSE';
END set_context;
-- show xxmod_disco context
FUNCTION show_context(p_name VARCHAR2) RETURN VARCHAR2
IS
BEGIN
RETURN SYS_CONTEXT('EUL_DISCO', p_name);
END show_context;
3. You can define your parameters in one worksheet by creating calculations calling the set_context function, (you will have to convert into VARCHAR as context can only be VARCHAR) e.g.
set_context('START_DATE', TO_CHAR(:start_date_param))
You can define as many parameters as you want.
4. In another sheet (or even another workbook), you can access those parameters using the show_context function or if you are using a custom folder or view you can use TO_DATE(SYS_CONTEXT('START_DATE')) to obtain the value of the date parameter.
Using this approach you can implement a set_effective_date workbook, so that all your workbooks pick up the effective date set up for your session. This enables you to implement similar effective data functionality as in HR applications.
Hope that helps,
Rod West -
How to create custom folder for parameterized query
Hi Gurus,
I developed a query to generate report to " who is reporting to who in organization", when i am trying to create custom folder using this query but i am getting error like "The custom sql entered contains parameter and therefore invalid". Could you please help to parameterize the emp_key in query in Oracle Discoverer. Is there any way to pass the value using external procedure for this query.
SELECT
lpad(' ', 8 *(LEVEL -1)) || emp_last_name, emp_key, manager_id, emp_key, manager_key,
mgr_last_name, mgr_first_name, empid,
emp_last_name, emp_first_name, LEVEL FROM cmp_ppl1 START WITH emp_key = &emp_key
CONNECT BY PRIOR emp_key = manager_key;
Thanks & Regards
VikramI agree 100% that it's way easier to create a dataview or a custom folder - with no run time parameters being passed to the EUL - as is being done by Vikram.
The only concern I would have is that I don't know if it would work - or at least ever come back in reasonable time - for Vikram and therefore the question about parameters (only Vikram can say).
The reason I'm wondering is that I've created SQL similar to being shown (when used in an org chart report at a large client) and the start / connect by is used for going down the tree getting everyone on the way. And if it's not limited - that could be a huge undertaking - of records and/or time. Guess it depends on how many people work at the organization (and of course, levels).
But otherwise, absolutely, I would try and bring back all logical records to the folder and then filter in Disco.
Russ -
Unable to Create a custom folder in Discoverer Administrator
Hi,
I have a discoverer report which is based on on standard query(Which cant be modified).The requirement is to add a new column to it which doesn't exist in that folder.I can create a custom folder and add the column to the report,but the problem is whenever i create the folder and hit the Validate SQL button it is throwing the error " *The custom SQL entered is not valid SQL statement - ORA-00942: table or view does not exist* "
I have all the privileges for the user and when I am trying to validate the existing queries ,it is throwing the same error .
Discoverer Version - 4 i
Oracle Application - 11.5.9
Appreciate your help .
Thanks ,
VijayHi,
Creating new folders should be done when you are logged on as an application user.
If your application user does not have admin access to the EUL then log on the Disco Admin as the EUL owner and grant full admin privileges to an applications user or responsibility.
Then logon to Disco Admin with that user or responsibility. You should then be able to create and import folders.
Rod West -
Creation of a Custom Folder in Oracle Discoverer Administration Edition
Hi
Could anybody help me in solving this problem while creating a Custom Folder in Oracle Discoverer Administration Edition ?
My Requirement is :
I Connect to EUL_US/EUL_US@<HOST_STRING> under Oracle Discoverer Administration Edition.
I selected a Pre-Defined Business Area Eg. General Ledger
There i created a Custom Folder by Name Test Custom Folder
The Query which i used in my Custom Folder is
SELECT NAME FROM GL.GL_JE_BATCHES
When i Used this Query it says Table or view does not exist.
The Folder is getting created but without a Query.
I am not able to preceed further.
Any Help would be appreciated
Regards
Nakul VenkataramanHi Nakul, you may be running into a problem with the sql for your custom folder. For some reason Discoverer Admin will allow you to create a custom folder with sql, but then if you change it and it has any advanced sql, i.e. grouping sets, analytic functions etc., you probably receive an error.
An option is to create a view using the same sql and create a folder from the database using this view.
Hope this helps.
Brent. -
Order by clause in discoverer custom folder
hi,
i m working on discoverer 3.1.38.I've been trying to sort the period according to calendar sequence and for this i tried 2-3 different queries which are working fine on sql plus but in discoverer custome folder,one error is coming saying ..can't use ORDER BY clause in custom folder.
I've tried formatting option also but it doesn't work here with me as i preferably want to sort in MON-RR format.
thanks in anticipation
nullthanks for replying back. but i didn't get what exactly u meant by creting query in user edition and about alternative sort,i should have list of value item and item_to_sort in same folder but i don't have that..i am creating one cross tab report and using to_char(gl_date,'MON-RR') format on my top axis its' appearing alphabetically over there,i wrote one qurey which worked prefecly fine on sql plus,but in discoverer its' giving me error.i can't create alternative sort on this,so please give me some different solution
thanks in advance -
Hello ,
We want to create custom folder in mailbox as root or inside inbox for every user of mailbox but not using managed folder .
I have found below article , but we do not get success to do that .
http://careexchange.in/create-a-custom-root-folder-in-all-the-mailboxes-bulk-in-exchange-2010/
Any idea how to do that ?
It will be great helpful for us.
Thank you in advance.
Regards
faizWhat happens when you try that method? What errors do you get? Have you ensured you've installed EWS 1.2 per the requirements listed in the script? (it actually mentions 1.1, but that no longer seems to be available, but 1.2 is here
http://www.microsoft.com/en-gb/download/details.aspx?id=28952 ).
I'm assuming you're running Exchange 2007 (since you're posting in the 2003/2007 forum, and this won't work on 2003), is that correct?
While I don't know for sure that the script will work on 2007, have you ensured that you've amended the file paths to the correct locations? Eg, assuming it should work you'll need to amend the line :
$service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP1)
to reflect the version of Exchange you're running, and the line :
Import-Module -Name "C:\Program Files\Microsoft\Exchange\Web Services\1.1\Microsoft.Exchange.WebServices.dll"
with whatever version of EWS you've installed.
Maybe you are looking for
-
Customized responsibility not run " Supplier Open Balance Letter Report"
I have customized standard Responsibility from " Payable Manager " , this Responsibility run the " Supplier Open Balance Letter Report" with completed Error Status . ? Even it has same Request Group " All Reports " and " Payables " Application. The E
-
Link between swf files.
Hello. I need to find a way to link multiple .swf files, so I may have a menu and after clicking a button go from there to any swf file and back. But i need something that works in AS 2 and 3 because my files are in both ActionScripts. It shouldn't
-
If I am using Explorer, I can go to "File" and then "Send Link" - an email will automaticallt pop up, with the website url pasted in; I merely put in the recipents email address, hit Send, and away it goes With Firefox, the email does not pop up; I h
-
Middleware Error related to AGMT_MAST_CRM & CRM_ACCPL_ELEM
Hi Experts, I got few errors in Production system 1 . BDOC type CRM_ACCPL_ELEM it is in Intermediate State ( I04) I found nothing in Error segment , in the Extended Part i can see the Account plan and details . we are using CRM 5.O and Trade Prom
-
White areas printing as orange for multiple printers.
Hi all, Did a search and didn't find an answer, so here is the issue - I have a G5 running 10.3.9, and both an Epson R300Inkjet and a HP 3600dn laserprinter. On both printers, any area defined by the application as containing no data (and would norma