How to use Pl/Sql in Discoverer report
Hello worldWould you be able to provide a flow of work and guidance how to use the sql function in right of discoverer of the creation of the function by using PLSQL Developer.
(I'm new to Oracle environment... Prev worked as analyst with Microsoft Access... takes PL/Sql class at school a few years ago)
We use Discoverer Desktop.
(a) dba just email for permission to create the pl/sql function.
(b) recently completed Discoverer Administrator installed on my pc.
can you pls add to the list:
c)....
d)....
etc. ?
TX for your help, sandra
Hi sandra,.
Its been ages've seen it here. How are you??
(c) creation of the function by using PLSQL developer
go through this link of creating functions
[http://www.techonthenet.com/oracle/functions.php]
(d) recording the discoverer function
GoTo Admin--> Tools--> Register PL / SQL--> functions import... Select your function and say apply
For more information about the functions, you can go through the tutorials
[http://download.oracle.com/docs/html/A90881_02/calculat.htm#1006629]
Hope this helps you.
Best wishes
Murielle.
Tags: Business Intelligence
Similar Questions
-
How to use PL/SQL in BI Publisher
I wonder how to use PL/SQL in BI Publisher as before the report triggers and other...
I need to know how and where?
Thank you!
MathisOne way to do this would be:
SELECT,
,
....
TABLE t
]]>
And your
. is a package of database, where you can build your logic as. CREATE OR REPLACE PACKAGE
AS
PN_PARAM1 NUMBER;
PC_PARAM2 VARCHAR2 (240);FUNCTION
RETURN Boolean;
END; CREATE OR REPLACE PACKAGE BODY
ASFUNCTION
RETURN a BOOLEAN value
AS
DECLARE
LN_PARAM1 NUMBER: = PN_PARAM1;
LC_PARAM2 VARCHAR2 (240): = PC_PARAM2;
BEGIN
...
...
...
END;
END; -
Hello
I would like to know how to use PL/SQL to create dynamic action to set the value of a list of selection by another selection list.
I wish can create dynamic action to manage the two above the Room select list (: P9_ROOM) and building (: P8_BUILDING).
When you select "1074" in the bathroom, building highlights like "BRM BLD 5"
When you select 'Area of the black box' in the room, building must assign the value "7 BLD BRM"
When the room is Null, building should also be Null.
I thank you,
Alice
I forgot to mention, for the PL/SQL Code, because you are working with items in the selection list, the return values are different from the display on your LOV values, you must instead use the return values.
Thank you
Erick
-
How to use the date with the report parameter format
Hi all
How to use the date format with this tag function,
<? param@begin:P_FROM_DATE? > <? $P_FROM_DATE? >
This date of form source of report and setting is coming as this 2012/11/01 00:00:00.
So now I need this in MY-DD-YYYY marker. I tried like this..? param@begin:P_FROM_DATE? > <? $format - date: P_FROM_DATE; ' DD-MON-YYYY '? >
but its giving error. Can someone pls how to convert to the format of date custom.
Thanks and greetings
Srikkanth.MProblem solved.
REF this link
-
Hello
If I want to use the PL/SQL procedure tips, it is valid to write it this way:
I doubt when I tried the optimizer didn't actually use the index.begin update /*+ INDEX(opp DIM_OPP_REFDB_IDX) */ scott.rec_dim_opportunity opp set opp.mp_opportunity_re .... end
Thanks in advance.
Oracle 10g R1
Windows 2003 32-bitIt is the right way to compel boards,
the index exists on the column used by your query?
How big is the table?
What's the expected release of your query? -
How to use Pl sql text color hex
SRW.set_text_color ('blue'); < in this line how can we use hex color or I want it to just lightbluePROCEDURE LineColors IS BEGIN if (:LineNo mod 2=0) then srw.set_text_color('blue'); else srw.set_text_color('black'); end if; END;
Thanks in advHello
You can use the RGB code for all of the color. For ex.srw.set_text_color('rxxxgxxxbxxx'); -- Here "xxx" represent the numbers.
Note. Sometimes for some code it does not work. But in the case you can try.
-Clément
-
How to use swivel to cross tabular report
Dear gurus,
I have it here is the Emp_Hist table, which is usually audit table for the Emp table.
For each record, we maintain version (there may be difference in version as for empno = 3) when it updated there.
ENo EName Sal job DOB Version
---------- ---------- ---------- ---------- ---------- ----------
1 Sanjiv 1000 committed 12/10/89 1
1 Sanjiv 1000 committed 12/10/89 2
1 committed Sanjeev 1900 12/10/89 3
Scott 2000 analyst 22/10/85 1 2
2 Scott 2000 analyst 22/10/85 2
Scott 2 3000 lead 22/10/85 3
3 Smith 4000 lead 13/11/81 1
3 Smith 5000 lead 13/11/81 2
3 Smith 5500 lead 13/11/81 4
3 Smith 8000 CTO 13/11/81 5
I want to display changes (current value and previous value)
for each column as below.
PK_Val Column_Name Previous_value Current_Value
----------- -------------------------- -------------------- --------------------
1 ENo 1 1
1 Ename Sanjiv Sanjeev
1 1000 1900 sal
1 committed post clerk
1 DATE OF BIRTH 12/10/89-12/10/89
2 ENo 2 2
2 Ename Scott Scott
2 sal 2000 3000
2 senior analyst job
2 DATE OF BIRTH 12/10/89-12/10/89
3 ENo 3 3
3 Ename Smith Smith
3 5500 8000 sal
Job 3 lead CTO
3 DATE OF BIRTH 12/10/89-12/10/89
Could someone help me growing up? Can swivel will contribute to higher.
Concerning
Sanjeev
For each employee, which values (column) to change.
ENO Column_Name Previous_value Current_Value
----------- -------------------------- -------------------- --------------------
1 ENo 1 1
1 Ename Sanjiv Sanjeev
1 1000 1900 sal
1 committed post clerk
1 DATE OF BIRTH 12/10/89-12/10/89
2 ENo 2 2
2 Ename Scott Scott
2 sal 2000 3000
2 senior analyst job
2 DATE OF BIRTH 12/10/89-12/10/89
3 ENo 3 3
3 Ename Smith Smith
3 5500 8000 sal
Job 3 lead CTO
3 DATE OF BIRTH 12/10/89-12/10/89
-
How to use the pl/sql procedure
Hi all,
How to use pl/sql packages and especially in what situations we are pl/sql, which is the cause of the procedure. Please explain with precision using small example.
Thanks and greetings
RAM
I could tell this at a very high level.
PL/SQL's procedural extension to SQL. SQL (structured query language) has no procedural capacity. They are executed as a stand-alone statement. When you want to generate a process flow with several SQL statement that you need to have a procedural language that could accommodate your SQL. PL/SQL is something similar to Java and Dot Net in this aspect. Said that PL/SQL is Oracle DB. This has some advantages. The most important thing is that when you have your SQL in PL/SQL oracle maintains its reliance on the object. Any database oracle related so you want to build, then you can consider to PL/SQL as the best way to use process flows.
PL/SQL provides various methods such as the PROCEDURE, FUNCTION and the PACKAGE. The only thing that race stands is in its ability to modularize your code. So, using the package you can create process workflows that is modular and easy to understand.
-
How to find resulting sql ' enq: TX - line lock conflict.
Hello
In one of our database we still find "enq: TX - line lock conflict" for 2-3 days. But then he stopped. Time it happened he blocked other sessions for a long while and he got is resolved automatically. Now the ADDM report, we have sql queries that has waited for this but, we cannot find that question of what module caused the outcome. What I should look for that, beyond the information. Help, please.
Database is 10 gr 2 on AIX.
Kind regards
ChaoukiHello
Have you tried querying DBA_HIST_ACTIVE_SESS_HISTORY with event WHERE as "enq: TX %' ?" This should return the lines for the duration of that event (hold/lock) was underway. See column BLOCKING_SESSION which will tell you the session ID that blocked and caused this wait event/lock.Now again ask DBA_HIST_ACTIVE_SESS_HISTORY with session_id =
. Here, you should see SQLs executed by this session "blocking". Take this list of SQLs and use v$ sql or AWR report using the awrsqrpt.sql script to see the details of each of these SQLs and this should help you find SQL blocking. DBA_HIST_ACTIVE_SESS_HISTORY also shows the module where this session/sql has been executed.
Salman
-
How to use BETWEEN function in calculation discoverer report?
Hello
I need discoverer report to:
All part_numbers between SDK00 and SDK99 should have calculation (Pay_amount + 100)
SQL for this is: PART_NUM between 'SDK00' and 'SDK99 '.
* How can I get the function BETWEEN in Discoverer report level calculation in Discoverer Desktop or discoverer more? *
Thanks in advance,
Gayatri
Published by: cool gayatri on June 24, 2009 08:32Hi Gayatri
Did you not see my answer for the CASE because the CASE offer the use of the clause BETWEEN, but DECODE indeed does not work. Let me give you a quick summary of DECODE.
In its simplest form, it takes 4 values and looks like this: DECODE (A, B, C, D)
This basically means, IF A = B THEN C D OTHER
The trick to solve ENTERS a DECODING is to work on algoriths where A = B. Because we do not know how values are from 00 to 99, although I could tell there were 100 we would of course 100 pieces in DECODING, but that would be awful. How about if we look at it another way and say this:
IF PART_NUMBER< 'sdk00'="" then="">
ELSE IF PART_NUMBER > 'SDK99' DO pay_AMOUNT
ANOTHER pay_amount + 100This statement was only 2 hard coded values, but how do you DECODE work with less of? Easy, we use the function LESS. The LEAST function takes 2 values and returns the one with the lowest value. So I use LESS (PART_NUMBER, 'SDK00'), then whenever the PART_NUMBER is lower than SDK00 it will be true. A similar situation exists for the inverse function more GRAND. Put it all together, then you can do this:
DECODE (PART_NUMBER, BIGGER (PART_NUMBER, 'SDK00'), DECODE (PART_NUMBER, LESS (PART_NUMBER, 'SDK99'), PAY_AMOUNT * 100, PAY_AMOUNT), PAY_AMOUNT)
In English it can be read as follows:
IF the PART_NUMBER is greater than or equal to SDK00 and the PART_NUMBER is less than or equal to SDK99 THEN PAY_AMOUNT x 100 ELSE 0
Best wishes
Michael -
How to use the concepts Advanced PL/SQL in oracle reports and forms
Hi all
Can anyone suggest me how to use the Concepts(nested tables,PAA,Varrays,Objects...) Advanced PL/SQL in Oracle forms.
In fact, I created a Table whose column of type Varray. now, I want to create an element in oracle forms on this field. can anyone suggest me how to proceed.
Thank you
KumarHello
Take a look at this one:
http://SheikYerbouti.developpez.com/tutoforms10g/tutoforms10g.htm
especially the chapter on the block that contains a collection of (2.3.3). The sample is built around a nested table, but you get the idea to adapt to work with a varray.Kind regards
AlexIf someone useful or appropriate please mark accordingly.
-
How to use CLOB in OBIEE 11 g (11115) Reporting
Hi all
I have a CLOB object. I need to use it in the report.
It comes only from the text. I challenged it in SPR as LONGVARCHAR or OBJECT, but it did not work.
I tried to use evaluate with TO_CLOB but I am getting below error any time
incompatible data types: expected - got CLOB call OCIStmtExecute OIC. [nQSError: 17010] Prepare the SQL statement failed.
Please give me an idea how to use a CLOB column in the report.
I see a rittmen blog that uses lookup, but I do not have this option.
Please let me know what wrong I do.
Thanks in advance.
KN
Thank you all for your suggestions.
I raised a SR and learned to know that use of BLOB/CLOB/NCLOB directly in the report is set to 11.1.1.8 version.
Oops, Yes, I have to wait then need to use the options proposed by srini/nanou.
Thank you
KN
-
Can someone please help me on how to generate excel file using pl/sql? I have generated csv files successfully, but now I need to generate a excel. I changed the code generation of the csv file, but the file gives me error when opening:
"The file you are trying to open,"XXXX.xls", is in a different format than specified by the file extension. Do you want to open it now? »
If I choose Yes then open the excel file, but it excludes the leading 0 in the front for one my column. How do I configure excel type default column as text rather than General, when you create the files? I also tried to generate excel file using xml. But I do not know how to set the type of column there, too. I'm using Oracle 11.2.0.3.0 and APEX 4.2.6.00.03. I'll call all these codes apex.
Code1 is used:
Declare
output_header varchar2 (4000);
fichier_en_sortie VARCHAR2 (255);
Varchar2 (2) EOL: = Chr (13) | Chr (10);
BEGIN
output_header: = 'tls_tracking_id ' | Chr (9) | ' fnn_ext' | Chr (9) | "path_id' | EOL;
fichier_en_sortie: = 'report_excel' |'. XLS;
owa_util.mime_header ("application/octet ', false");
HTP.p ('Content-Disposition: attachment; filename = "" | ") fichier_en_sortie |' « ') ;
owa_util.http_header_close;
HTP. PRN (output_header);
for r in)
Select tls_tracking_id, fnn_ext, DWD_DTOV_OUT_VW path_id
where nbn_loc_id = 'LOC000138413115. '
The order of tls_tracking_id LOOP)
HTP. PRN (r.tls_tracking_id
|| Chr (9) | r.fnn_ext
|| Chr (9) | r.path_id
|| EOL
);
END LOOP;
END;
Code2 used :
create or replace PACKAGE BODY IS pkg_excel_export
PROCEDURE excel_open (l_xml_body IN OUT NOCOPY CLOB) IS
BEGIN
l_xml_body: = ' <? XML version = "1.0" encoding = "ISO-8859-9"? > ' | Chr (10) |
"< workbook xmlns =" "urn: schemas-microsoft - com:office:spreadsheet" ' | "
Chr (10) |
""xmlns:o ="urn: schemas-microsoft-com ' ' |
Chr (10) |
"xmlns: x =" "urn: schemas-microsoft-com: excel" ' | "
Chr (10) |
""xmlns:ss ="urn: schemas-microsoft - com:office:spreadsheet" ' |
Chr (10) |
'xmlns:html=" http://www.w3.org/TR/REC-html40 ">' ||
Chr (10) |
' < ExcelWorkbook xmlns = "urn: schemas-microsoft-com: excel" > ' |
Chr (10) | ' < WindowHeight > 8580 < / WindowHeight > ' |
Chr (10) | ' < WindowWidth > 15180 < / WindowWidth > ' | Chr (10) |
' < WindowTopX > 120 < / WindowTopX > ' | Chr (10) |
' < WindowTopY > 45 < / WindowTopY > ' | Chr (10) |
' < ProtectStructure > false < / ProtectStructure > ' | Chr (10) |
' < ProtectWindows > false < / ProtectWindows > ' | Chr (10) |
' < / ExcelWorkbook > ' | Chr (10) | "< Styles > | Chr (10) |
'< ss:ID of style = 'Default' ss:Name 'Normal' = >' | Chr (10) |
"< ss:Vertical alignment = 'Bottom' / >" | " Chr (10) |
' < borders / > '. Chr (10) | ' < police / > '. Chr (10) |
' < Interior / > '. Chr (10) | ' < NumberFormat / > '. Chr (10) |
' < protection / > '. Chr (10) | "< / style > | Chr (10) |
'< ss:ID of style 's22' = >' | Chr (10) |
"< x: font family = ss"Swiss":"BOLD"="1"ss:Underline ="Single"/ >" | "
Chr (10) | "< / style > | Chr (10) | "< / style >";
END excel_open;
PROCEDURE excel_close (l_xml_body IN OUT NOCOPY CLOB) IS
BEGIN
l_xml_body: = l_xml_body | ' < / workbook > ';
END excel_close;
/ * Opens a worksheet in the Excel file. , You can open multiple worksheets. **/
PROCEDURE worksheet_open
(
l_xml_body IN OUT NOCOPY CLOB,
p_worksheetname in VARCHAR2
) IS
BEGIN
--
-Create the worksheet
--
l_xml_body: = l_xml_body | "' < worksheet ss:Name = ' ' | p_worksheetname |
"" > < table > ";"
END worksheet_open;
/ *Farm the worksheet in the Excel file. **/
PROCEDURE worksheet_close (l_xml_body IN OUT NOCOPY CLOB) IS
BEGIN
l_xml_body: = l_xml_body | ' < / table > < / worksheet > ';
END worksheet_close;
/ *Opens the tag line * /
PROCEDURE row_open (l_xml_body IN OUT NOCOPY CLOB) IS
BEGIN
l_xml_body: = l_xml_body | "< row >."
END row_open;
/ *Farm the tag line * /.
PROCEDURE row_close (l_xml_body IN OUT NOCOPY CLOB) IS
BEGIN
l_xml_body: = l_xml_body | "< / row > | Chr (10);
END row_close;
/ *After the opening of the line, we can write something the first cell* /
PROCEDURE cell_write
(
l_xml_body IN OUT NOCOPY CLOB,
p_content in VARCHAR2
) IS
BEGIN
l_xml_body: = l_xml_body | ' < cell > < data ss:Type = "String" > ' |
p_content | ' < / data > < / cell > ';
END cell_write;
/ * If you use this package of APEX, you get to download the excel file. **/
PROCEDURE excel_get
(
l_xml_body IN OUT NOCOPY CLOB,
p_filename in VARCHAR2
) IS
XX BLOB;
make the NUMBER;
This NUMBER;
BC NUMBER.
LC NUMBER;
w NUMBER;
BEGIN
DBMS_LOB.CREATETEMPORARY (xx, TRUE);
make: = 1;
so: = 1;
BC: = dbms_lob.default_csid;
LC: = dbms_lob.default_lang_ctx;
w: = dbms_lob.no_warning;
DBMS_LOB.converttoblob (xx,
l_xml_body,
DBMS_LOB.lobmaxsize,
do,
Thus,.
British Colombia,
LC,
(w);
owa_util.mime_header ("application/octet ', FALSE");
-set the size so that the browser knows how to download
HTP.p ("Content-length: ' |") DBMS_LOB.GetLength (xx));
-the name of the file will be used by the browser if users only one save as
HTP.p ('Content-Disposition: attachment; filename = "" | ") p_filename |
'.xls ' | '"');
-close the headers
owa_util.http_header_close;
-Download the BLOB
wpg_docload.download_file (XX);
END excel_get;
END pkg_excel_export;
I know it's a bit long code, but to better understand please consider...
Thank you.
I did worked putting just one extra line in my l_xml_body in the XML (Code 2 used). Now my excel generates with cells type 'Text' and there are no left falling to zero. Also the columns display not scientific format as 2.3D + 12. Current recording shows without default formatting.
'
-
Hello
I work with APEX 5.0.
I would like a report (classic) display a report of details (also classical report) using a hyperlink, but not a "text-hyperlink" like 'click here for details'.
Instead, I want to use a small icon which will occur the same result when you click on.
It works fine, when the hyperlink is defined as text like: 'click here for details'.
When I try to use an image, I don't get the desired result.
Here's what I tried to Hare:
1)
Link-> Link attributes, then filled column: src = "& WORKSPACE_IMAGES. "" #ICON_NAME # "width ="40"height = 40 ' or img src =" & WORKSPACE_IMAGES. " "" #ICON_NAME # "width ="40"height = 40.
= > no picture for the items in the column, but the link already created for each column of the remains (and works)
2)
Formatting of column-> HTML Expression, then filled: < img src = "& WORKSPACE_IMAGES. "" #ICON_NAME # "width ="40"height = 40" >
= > the image appears for each column element, but the hyperlink is gone.
Somone has idea how to use a picture/icon to have a hyperling in screens reported a detail?
Thank you in advance for sharing your experience.
Kimd cordially
Hi Patrick,
Link to the column-> then filled:
Link text = #ICON_IS #
Link attributes =.
Target = this Application Page
Page = 5
Article 1 = P5_DEPTNO
Value 1 = #DEPTNO #.
Article 2 = P5_DEPARTMENT
Value 2 = #DNAME #.
Put this in the link text not in attributes of link
Remove the code from the link attributes.
I don't have how to make it the way that describe you.
Apex. Oracle.com is a hosted version of application Express, you can build online applications.
Go to this link and the application workspace https://apex.oracle.com/en/
Hope this helps you,
Kind regards
Jitendra
-
How to change the password of a schema by using Oracle SQL Developer
Hi need to change the password of a schema by using Oracle SQL Developer, how can I do?
or maybe http://www.thatjeffsmith.com/archive/2012/11/resetting-your-oracle-user-password-with-sql-developer/
Maybe you are looking for
-
How to recover the modules?
After the recent update of FireFox, I followed the suggestion to restore the default settings. This required little personalization makeover, but everything is going well until I responded to the guests on the synchronization. Sync was automatic. I w
-
My 5s with 9.2.1 update sometimes drop the incoming call, participating in the function of the icon and the call are lost due to inoperative service. Does anyone know how to fix this?
-
What cases does the HP Pavilion Elite m9040n use?
I want to put new parts inside, because it is quite old. I want to know if all the pieces of my will enter into it. I looked around, the only thing I could find on it is that it is a medium-sized ATX. You are looking for an exact name please!
-
I have I installed the drivers from the official site for win 7 x 64, but there was only one device that the original driver is not installed: broadcom 20702. Where to get the work the drivers for my laptop? How to activate bluetooth on my laptop?
-
I'm trying to text on a 16-bit image overlay. The overlay is successful (using overlay IMAQ Text.vi), but I would like to save this file with the overlay. I have been using IMAQ Write queue 2. VI to write the image as a .png and writes the image succ