Creating a Crosstab/Pivot report in Oracle Apex
Hello,
I want to create a matrix view of a report in the following format. tried a lot of ways llike data pivoting, etc. but most of the ways use aggregate functions.
format in which i require data is:
ID NAME LEVEL PROJECT LOCATION ORACLE FORMS ORACLE REPORTS JAVA C++
AAA123 ABC 2 AB AC Expert Aware Expert
AAA124 DEF 3 BC AD Expert Proficient Aware
The data in the table/view is in the format:
ID NAME LEVEL PROJECT LOCATION Description Proficiency_ID
AAA123 ABC 2 AB AC ORACLE FORMS Expert
AAA123 ABC 2 AB AC ORACLE REPORTS Aware
AAA123 ABC 2 AB AC JAVA Expert
and similarly for other ID's.
Since i need character values, aggregate functions would not be of much use.
Thanks
Varun
Can anyone help me with this????
Hi Arnaud,
Saw the documentation that you had added and thanks for that..........but it is using sum(decode(...................
which is an aggregate function but when i want to print character values for a certain distinct column value, that is where i am facing a problem..
Hope you understood what i am saying:
the id, name, level, prject, location will remain uniques and then i want proficiency to be put against each technology in a single row with al the technologies being disitnct columns..
Thanks
Varun
Similar Messages
-
How to pass a value to a bind variable in a query report in oracle apex
Hi Guys,
I have requirement to send weekly reports via email to some users. The users should receive their own records in the report. The user details is stored in a table. What I am planning to do is to create a report query in oracle apex to generate the report and then run a function/procedure via a scheduler to email the report to respective users. Now my query is ............. is it possible to pass a value (user name) to the report query to pull records of only that user? I know we can have bind variables in the report query but I have no idea how to pass a value for bind variables from a function/procedure.
Can anyone help me on this issue or suggest a better approach?
Thanks,
SanYou need to use dynamic sql
But please keep in mind that since you're using Oracle you may be better off posting this in some Oracle forums
This forum is specifically for SQL Server
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to Create Websheet in database application in Oracle Apex
I'm making a database to my new web site and now I'm developing a site with Oracle Apex.
The aim of my website provide free Oracle, Java, Unix education (videos, tutorials, articles, step-by-step instructions. etc).
My questions
- I created a database Application and I want create page as Oracle OBE where I will write/Save Subject name in database filed and all Subject Details Write/save in page as websheet Application(where I can add new section with all Document and image and save in page not in database)
i mean i want to make page as this
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r41/inst_pkgapp/inst_pkgapp.htmHi Prasad,
You can write normal JDBC code in your controller.
Check this Web Dynpro Java
You can use the tool for generating the classes from your DB.Check this too
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/dfad6017-0301-0010-bdb8-a8b7d2006f36
Best Regards, Anilkumar -
Creating vertical drop down list in oracle apex.
Hi All,
Am using Oracle Apex 4.2 version. I want to create a vertical drop down menu.So, for that I have created a list with parent and child entries. But I dont know what to do after that.
Kindly help me in doing this.
Thanks,
Sravanthi.refer following link
Grassroots Oracle: CSS pull down menu using APEX List
or use enkitec plugin
Enkitec : Products : Plug-ins : Details : Help -
Really working Crosstab / Pivot Report example
try it here:
http://apex.oracle.com/pls/otn/f?p=20819:2
Details:
Create Report - based on PL/SQL ************************************
DECLARE
l_return_value VARCHAR2(32000) DEFAULT NULL;
BEGIN
l_return_value := PK_PIVOT.PivotSQL('SELECT * FROM TESTDATA', 'country,city,product','FDate', 'SUM', 'amount', nvl(:P2_PAGENUMBER,1) );
--:P2_PAGENUMBER - Textbox above the report
RETURN l_return_value;
END;
Create Supporting PACKAGE PK_PIVOT ************************************
create or replace
PACKAGE PK_PIVOT
--AUTHID CURRENT_USER
as
--code based on famous Tom Kyte's books examples
--but not copy-pasted from there
type refcursor is ref cursor;
type array is table of varchar2(30);
type array_varchar2 is table of varchar2(255);
Function PivotSQL (
p_query in varchar2, --query string which returns data you want to make crosstab on
p_rowfields in varchar2, --row fields separated by comma
p_columnfield in varchar2, --one column field
p_function in varchar2,--aggregate function ('SUM','AVG','COUNT','MIN','MAX')
p_functionfield in varchar2 --field for aggregate function
, p_page in number default 1--page from right to left (not all columns can be shown on one page)
) return varchar2; --returns query text for crosstab
example:
SELECT PK_CROSSTAB.PivotSQL('SELECT * FROM scott.emp','empno','job','sum','sal') FROM SYS.DUAL
SELECT deptno
,sum(DECODE(job,'BOSS',sal,null)) as BOSS
,sum(DECODE(job,'FIN',sal,null)) as FIN
,sum(DECODE(job,'HR',sal,null)) as HR
,sum(DECODE(job,'Sales',sal,null)) as Sales
FROM (SELECT * FROM scott.emp)
GROUP BY deptno
ORDER BY deptno
end;
create or replace PACKAGE BODY PK_PIVOT as
Procedure FormatParam (var_data in varchar2, var_type in number, out_decode in out varchar2, out_col in out varchar2);
Function PivotSQL (
p_query in varchar2,--
p_rowfields in varchar2,
p_columnfield in varchar2,
p_function in varchar2,
p_functionfield in varchar2,
p_page in number default 1
) return varchar2
as
l_max_cols number;
l_query long;
l_columnnames array_varchar2 :=array_varchar2();
l_cursor refcursor;
tmp long;
--dbms_sql types:
l_theCursor integer default dbms_sql.open_cursor;--get col types
l_colCnt number default 0;
l_descTbl dbms_sql.desc_tab;
col_num number;
l_columnfieldtype number;
--decode names
o_decode varchar2(50);
o_col varchar2(50);
l_cols_per_page number := 50;
l_begcol number;
l_endcol number;
begin
--check params
IF instr(p_columnfield,',')>0 THEN
raise_application_error (-20001, 'Can use only 1 columnfield');
ELSIF upper(p_function) not in ('SUM','AVG','COUNT','MIN','MAX') THEN
raise_application_error (-20001, 'Can use only standard aggregate functions');
END IF;
/* analyse query */
dbms_sql.parse(l_theCursor, p_query, dbms_sql.native);
/* get described columns for analysed query */
dbms_sql.describe_columns(l_theCursor, l_colCnt, l_descTbl);
/* Tom Kyte:
* Following loop could simply be for j in 1..col_cnt loop.
* Here we are simply illustrating some of the PL/SQL table
* features.
col_num := l_descTbl.first;
loop
exit when (col_num is null);
--find column field type
if l_descTbl(col_num).col_name=upper(p_columnfield) then
l_columnfieldtype:=l_descTbl(col_num).col_type;
--dbms_output.put_line('Col#:'||col_num||' Name:'||l_descTbl(col_num).col_name||' Type:'||l_descTbl(col_num).col_type);
end if;
col_num := l_descTbl.next(col_num);
end loop;
--return 'test ok';
-- figure out the column names we must support for horizontal cross
if (p_columnfield is not null) then
tmp:='SELECT DISTINCT ' || p_columnfield || ' FROM (' || p_query || ') ORDER BY ' || p_columnfield;
-- dbms_output.put_line('columns cursor:'||tmp);
OPEN l_cursor for tmp;
LOOP
l_columnnames.EXTEND;
FETCH l_cursor into l_columnnames(l_columnnames.COUNT);
--dbms_output.put_line('l_columnnames:'||l_columnnames(l_columnnames.COUNT));
EXIT WHEN l_cursor%NOTFOUND;
END LOOP;
CLOSE l_cursor;
-- execute immediate 'SELECT DISTINCT ' || p_columnfield || ' FROM (' || p_query || ')' bulk collect into l_columnnames ;
else
raise_application_error (-20001, 'Cannot figure out max cols');
end if;
-- Now, construct the query that can answer the question for us...
l_query := 'SELECT ' || p_rowfields ;
l_begcol:=l_cols_per_page*(p_page-1)+1;
l_endcol:=l_cols_per_page*p_page;
if l_begcol>l_columnnames.count-1 then
l_begcol := l_columnnames.count-1;
end if;
if l_endcol>l_columnnames.count-1 then
l_endcol := l_columnnames.count-1;
end if;
--for i in 1 .. l_columnnames.count-1 loop
for i in l_begcol..l_endcol loop
FormatParam(l_columnnames(i),l_columnfieldtype, o_decode, o_col);--format params
l_query := l_query || ',' || p_function || '(DECODE(' || p_columnfield || ',' || o_decode || ','|| p_functionfield ||',null)) as "'|| o_col ||'" ' ; --" для строк с пробелами
end loop;
l_query := l_query || ' FROM (' || p_query || ')';
l_query := l_query || ' GROUP BY ' || p_rowfields || ' ORDER BY ' || p_rowfields;
/* close cursor */
dbms_sql.close_cursor(l_theCursor);
return l_query;
EXCEPTION
WHEN OTHERS THEN
/* close cursor */
dbms_sql.close_cursor(l_theCursor);
raise_application_error (-20001,'Error in PivotSQL:' || SQLERRM);
end;
--=========================
Procedure FormatParam (var_data in varchar2, var_type in number, out_decode in out varchar2, out_col in out varchar2)
--format parameter based on its type - for PivotSQL
--get parameter and its type
-- return strings for decode function and column name
/* dbms_sql.describe_columns types:
DATE Type:12
Varchar2 Type:1
Number Type:2
IS
BEGIN
IF var_data is null THEN
out_decode:='NULL';
out_col:='==NULL==';
ELSIF var_type = 1 THEN -- Varchar2
out_decode:=''''||var_data||'''';--add quotes
out_col:=substr(var_data,1,30);
ELSIF var_type = 2 THEN --Number
out_decode:=var_data;--do nothing
out_col:=substr(var_data,1,30);
ELSIF var_type = 12 THEN --DATE
out_decode:='to_date('''||var_data||''')';--format as internal date
out_col:=to_char(to_date(var_data),'YYYY-MM-DD');
ELSE
out_decode:='== UNDEFINED TYPE:'||var_type;
out_col:='== UNDEFINED TYPE';
END IF;
EXCEPTION
WHEN OTHERS THEN
raise_application_error (-20001,'Error in FormatParam:' || SQLERRM);
END;
end;Hi,
Thank you for providing such an excellent piece of code. I have used it and it works like a charm. However I faced a problem today and needed your help.
I am executing this code using the following code :
SELECT PK_PIVOT.PivotSQL('SELECT sfid.bill_date ,cust.customer_name FROM split_file_detail sfd,customer cust,split_file_invoice_details sfid where sfd.CUSTOMER_SYS_ID=cust.CUSTOMER_SYS_ID and sfid.SPLIT_FILE_DETAIL_SYS_ID = sfd.SPLIT_FILE_DETAIL_SYS_ID'
,'cust.customer_name','bill_date','count','cust.customer_name') FROM SYS.DUAL
Now when I do so I get the following error :
ORA -20001 : Error in PivotSQL: ORA-06502 and ORA-06512.
Now I guess the error maybe because:
1. The p_query parameter is huge and the tmp long type is not able to hold the value.
2. bill_date holds 200+ values and the ref_cursor is not able to handle it.
I have tried breaking p_query down to some more bits but I face the problem when I concatenate them back together.
Can you help me please? -
Does creating Excel,Word,PDF reports & printing in Apex need licensing ?
I am new to this Apex 4.0
I have installed the Apex 4.0 with Oracle 10g database.
Now using Apex if I create any web application, and develop some reports in the web application.
1) Now to do the printing of the reports in Excel,Word,PDF does Apex need some other components to be installed ?
2) Does those components needs licensing ? or are they free like Apex 4.0 ?Hi,
Yes you need other components
http://www.oracle.com/technetwork/developer-tools/apex/configure-printing-093060.html
Some of solutions need license, like BI Publisher.
There is also free solutions using e.g. Cocoon, Jasper reports ...
http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html
http://www.poveravoce.net/blog/?p=85
http://ubuntuforums.org/showthread.php?t=1004742
http://daust.blogspot.com/2010/09/jasper-reports-integration-v1100.html
ANNOUNCE:JAPEX Open Source PDF reporting & Blob Download/Flash upload
Regards,
Jari -
How to print a BLOB (image) on a PDF report using Oracle APEX Listener as Print Server
Hi,
I use APEX 4.2.
I have the following query as SQL text for a Report Queries in Shared Components:
select
customer_id,
cust_first_name,
cust_last_name,
cust_street_address1,
cust_street_address2,
cust_city,
cust_state,
cust_postal_code,
phone_number1,
phone_number2,
credit_limit,
cust_email,
filename,
company_profile,
-- customer_image,
decode(nvl(dbms_lob.getlength(customer_image),0),0,null,
'<img style="border: 4px solid #CCC; -moz-border-radius: 4px; -webkit-border-radius: 4px;" '||
'src="' ||
apex_util.get_blob_file_src('P22_CUSTOMER_IMAGE', customer_id) ||
'" height="75" width="75" alt="Photo Customer" title="Photo Customer" />') customer_image,
mimetype,
image_last_update
from
demo_customers;
I am unable to have the image printed on the PDF report. Even when the P22_CUSTOMER_IMAGE is defined as session state item.
Does someone knows how to print such image/BLOB in a PDF report?
Thanks by advance.
Kind Regards.Hi,
Indeed, I would need a custom layout.
Unfortunately, it seems (according to this white paper) not possible with the APEX listener only. I would need a third pary tool. A pity...
For me strange, that I cannot generate such a report having images or pictures in a pre-definied report layout... Maybe a future enahancement for Oracle.
Kind Regards. -
Display Interactive BI Publisher report on Oracle APEX
Hi Gurus,
I am struggling a log in order to display my current Interactive BI Publisher report along with LOVs to be displayed in APEX. I am getting an error.
The report cannot be rendered because of an error, please contact the administrator.
Error Detail
oracle.xdo.XDOException: oracle.xdo.servlet.CreateException: Report definition not found:%2F~weblogic%2FEnergy%20Balance%20Reports%2FEnergy%20Balance%20Global%20Monthly%20Analytics.xdo [username=weblogic]
I selected "share report link" => No header from BI Publisher Interactive report. It does have "Year" and "Month" as LOV which I choose the value from drop down list. I want same to be displayed under APEX for selection.
At the end of the link, I have tried providing username and password also like - &id=weblogic&passwd=password, but still receiving above error.
I am very much stuck at this point, so any help is very much appreciated.
I am using APEX ver 4.1, oracle database 11g R2 and Oracle Bi Publisher 11g Enterprise edition.
URL Which I tried in APEX, I tried running from browser and it works well along with LOV selection drop down list.
Please help gurus
thanksI also have this same question. The publisher report parameters are not modeled in the rpd, they are from a BIP jdbc conneciton to a transactional database.
Any response is appreciated - Thank you Michelle -
Require assistance and suggestion on Report in Oracle APEX 3.2
Hi all,
Thanks in advance
We have made Tabular report form based on table . Requirement is to have % in front of data
View_cal
=====
2.0 %
We tried to modified the query by concatenating but when we are trying to update the column name we are getting error . Is there any other way around So that we can implement
Cheers
Sachinhi,
i think you want something like this:
http://dbaforums.org/oracle/index.php?showtopic=8657
regards,
jR -
Dynamic query to produce crosstab/pivot report
Hello,
I've not been able to find any examples similar to my situation but perhaps I'm using the wrong search phrases...
I'm basically trying to create a cross-tab type report based on a dynamic query (since I do not know how many accounts a person has):
select ' SELECT x.name, x.type, ' from dual
union
select ' max(decode(x.account,'''||m.account||''',x.amount,null)) as "'||substr(s.proj||' '||m.account,1,30)||'",'
from db1.manager m, db1.person p, pi.charges c, db1.status s
where m.manager_id = p.id
and M.ACCOUNT_ID = C.ACCT_ID
and M.ACCOUNT_STRING = S.project
and C.JNL = (select max(id) from db1.journ j where j.TYPE ='M')
and p.username = :username
and nvl(M.END_DATE, sysdate +1) >= sysdate
group by m.account, s.proj
union
select 'sum(x.amount) grand_total from (select m.account, c.name, c.type, c.amount '
||'from db1.manager m, db1.person p, pi.charges c '
||'where m.manager_id = p.id '
||'and p.username = :P68_PRINC '
||'and c.acct_id = m.account_id '
||'and c.jnl = (select max(id) '
||'from db1.journ j where j.TYPE =''M'')) x '
||' group by type, name' from dualThe output from this query for the particular manager I selected is:
SELECT x.name, x.type,
max(decode(x.account,'12012',x.amount,null)) as "Internal 12012",
max(decode(x.account,'17929',x.amount,null)) as "Staged 17929",
max(decode(x.account,'18054',x.amount,null)) as "Help Software 18054",
max(decode(x.account,'3428',x.amount,null)) as "Mow 3428",
max(decode(x.account,'3428',x.amount,null)) as "Mow 3428_1",
max(decode(x.account,'3508',x.amount,null)) as "Stampede 3508",
max(decode(x.account,'9102',x.amount,null)) as "Open Collaborative 9102",
sum(x.amount) grand_total
from (select m.account, c.name, c.type, c.amount
from db1.manager m, db1.person p, pi.charges c
where m.manager_id = p.id
and p.username = :P68_PRINC
and c.acct_id = m.account_id
and c.jnl = (select max(id)
from db1.journ j where j.TYPE ='M')) x
group by type, nameThis query generates another query that ultimately produces the report below (please pardon the alignment) that I want to see on a report page.
NAME TYPE Internal 12012 Staged 17929 Help Software 18054 Mow 3428 Mow 3428_1 Stampede 3508 Open Collaborative 9102 GRAND_TOTAL
#EXAM1221 M 22 22
#EXAM1222 M 14.83 14.77 12.56 2.22 44.38
#EXAM1223 M 6.73 6.7 5.7 1 20.13
THOEORY M 106.5 106.5Should I be using the report type that is based on a 'PL/SQL function body returning SQL query' for this type of report??? If so, how does that get set up?
Thanks in advance!
~JakeThis solution works in that it generates the proper query. I can copy the query (from debug mode) and paste it in TOAD and it works perfectly. However, in the report page it tells me: "report error:ORA-01403: no data found".
I found this thread: report error: ORA-01403: no data found when SUM columns
I did have a couple other regions on the page (previous attempts) that were hidden so I deleted them completely. Still no luck.
I am also summing up several columns...if that has anything to do with it.
Does anyone have any suggestions?
Thanks again!!!
~Jake
Edited by: jhammer on Jul 27, 2010 11:02 AM -
Ora-06502 pl/sql numeric or value error in Report Query in oracle apex
Hello all,
I need your help...
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
I am using bi publisher to generate PDF reports in oracle apex.
We were using APEX 4.0 and migrated to 4.2 just a week ago.
Now we have apex 4.2.
When I try to Create report query,
Shared Components >> Report Queries then create.
and test a report in a create wizard I am getting a error "ORA-06502: PL/SQL: numeric or value error: character string buffer too small".
I have also applied a patch "16760897".
This issue is because of number of columns in a query is more then 26.
If I run a report with 26 or less number of columns then the is working fine, otherwise getting this error.
My before migration report queries working perfectly even now, but not new queries.
This issue is also in apex.oracle.com.
You can see
Not working - http://apex.oracle.com/pls/apex/f?p=619:4
Working - http://apex.oracle.com/pls/apex/f?p=619:2:
Please give a solution.
Thanks you.check the DB version compatibility with apex 4 or your DB version to apex 4.0 support for upgrade!
Oracle Application Express Installation Requirements for 4.0 -
Create Simple Printable SQL Reports in APEX 3.2 Without a Print Server
Oracle Apex 3.2
Oracle 11g
OHS
I thought I'd post an answer on how to get a printable SQL report in Oracle Apex without having to configure a print server. I'm sure that similar things have been posted in various other places, but I found the documentation for using custom row templates (to create a printable report) to be incomplete at best. For my needs, I was not looking for an awe inspiring report printout, but rather simple directory information printouts. For example, if you wanted a printable report to look like this:
=================================
CURRENT ACTIVE EMPLOYEES REPORT
=================================
First Name: Bob Employee ID: 0000000000
Last Name: Swarts Company Credit Card Number: 0000-0000-0000-0000
Middle Initial: F Social Security Number: 000-00-0000
First Name: Sue Employee ID: 1111111111
Last Name: Johnson Company Credit Card Number: 1111-1111-1111-1111
Middle Initial: G Social Security Number: 111-11-1111
etc.....In MS Access, doing this is very easy. From what I understand, this is also very easy to do this using PDF software with a print server. However, if you are like me, you don't want to waste time and money by obtaining and configuring a print server (even if it is free). However, never fear because you can create simple reports like this with relatively minimalistic effort; and you can do so without having to configure a print server.
1.) Create a new page
2.) Create a new sql query report region on the page
3.) Make your query just as you would normally.
For this example the query would be:
select first_name, employee_id, last_name, company_credit_card_number, middle_initial, social_security_number from employee_table4.) Go to "Shared Components"
5.) Under "User Interface" click on "Templates"
6.) Click on the "Create" button
7.) Select "Report"
8.) Select "From Scratch"
9.) For the "Template Class," choose one of the "custom" classes. For the "Template Type," choose "Named Column"
10.) Click the "Create" button
11.) Now that you created a custom row template, go back to "Shared Components" and then to "Templates"
12.) Find your custom template and click on it
CUSTOM TEMPLATE HOW TO
1.) In the "Row Template 1" textbox, you are going to create some custom css that will display the data on the page. The css to make the report look like the report above would be:
<div style = text-align: justify">
<table>
<tr>
<td style = "width: 200px"><b>First Name: #1#</b></td>
<td style = "width: 225px"> </td>
<td style = "width: 215px"><b>Employee Id: #2#</b></td>
<tr>
<td style = "width: 200px">Last Name: #3#</td>
<td style = "width: 225px"> </td>
<td style = "width: 215px">Company Credit Card Number: #4#</td>
<tr>
<td style = "width: 200px">MI: #5#</td>
<td style = "width: 225px"> </td>
<td style = "width: 215px">Social Security Number: <b>#6#</b></td>
</tr>
</table>
<p style = "page-break-after: always">----------------------------------------------------------------</p>
</div>
{code}
As you probably figured out, the numbers between the two pound signs ("#") are substitution strings for the variables in your select query in the SQL report. As you have also probably noticed, the "page-break-after: always" line will always make it so that only one report is shown on a page. To fix this, we will need to use logic and row template 2.
2.) For the "Row Template 1 Condition," select "Use Based on PL/SQL Expression" from the select list.
3.) In the textbox for the row template 1 expression enter in the following: {code}substr('#rownum#',-1) = 0 or substr('#rownum#',-1) = 5{code}
***** This condition will make sure that this template is applied when the last digit in the row number is either a "0" or a "5." So, only 5 reports will be displayed per page.
4.) Now go down to "Row Template 2" and enter in the following in the textbox:
{code}
<div style = text-align: justify">
<table>
<tr>
<td style = "width: 200px"><b>First Name: #1#</b></td>
<td style = "width: 225px"> </td>
<td style = "width: 215px"><b>Employee Id: #2#</b></td>
<tr>
<td style = "width: 200px">Last Name: #3#</td>
<td style = "width: 225px"> </td>
<td style = "width: 215px">Company Credit Card Number: #4#</td>
<tr>
<td style = "width: 200px">MI: #5#</td>
<td style = "width: 225px"> </td>
<td style = "width: 215px">Social Security Number: <b>#6#</b></td>
</tr>
</table>
<p>----------------------------------------------------------------</p>
</div>look familiar? that is because it exactly the same code as above, except without the page-break-after piece.
5.) For the "Row Template 2 Condition," select "Use Based on PL/SQL Expression" from the select list.
6.) In the textbox for the row template 2 expression enter in the following: substr('#rownum#',-1) != 0 or substr('#rownum#',-1) != 5***** This condition will make sure that this template is applied when the last digit in the row number IS NOT a "0" or a "5."
7.) Scroll down to column headings and enter this in the textbox for the "Column Heading Template": OMIT
8.) Click the "Apply Changes" button
9.) Now go back to your application and the page you want to apply the custom report to
10.) On the report, click on the report tab
11.) Scroll down to "Layout and Pagination"
12.) Click on the "Report Template" select list
13.) Select your custom template
14.) Click the "Apply Changes" button and run the page
Try printing the report, if it does not print correctly, try it in Opera, Safari, Internet Explorer, Firefox, and Google Chrome. Please note that it is my understanding that only Firefox does not understand the css "page-break-after: always"
If needed, add some css to the page to hide tabs and other items when you print.
~Andrew SchulltzDOH. Too much copy/paste.
In my code, I was setting an application variable to contain the email address I was retrieving from AD. Once commented out, it worked fine.
IF l_attr_name = 'mail' THEN
APEX_UTIL.SET_SESSION_STATE('F111_USER_EMAIL',l_vals(i));
END IF; -
Oracle APEX PL/SQL reports
Hello
I was wondering if someone can help me with the syntax error, or if someone can give an example how to implement dynamic query based on a select list item.
Last night I was looking how to implement simple PL/SQL report using Oracle Apex source region, but every time I try to run the page I'm getting an error "Flow=128 page=10 ORA-20001: wwv_flow_flash_chart.func_ret_sql_qry_err"
IF I put the same query into SQL developer and replace :P10_STATUS into string 'open', query returns correct results.
It works fine for single table, but not for inner joint.
Any help would be appreciated.
======================================================
declare
v_return varchar2(3000);
begin
IF :P10_STATUS is not null THEN
v_return := 'select p.priority, p.status, i.departments
from help_details p, help_department i
where status = :P10_STATUS';
END IF;
return v_return;
END;
=========================================================Hi ATD,
Thanks for the suggestions.
Now i have replaced the code as
Declare
v_return varchar2(3000);
begin
:P1_ITEM1:=:P1_DEPTLOV;
IF :P1_DEPTLOV IS NOT NULL
THEN
v_return:='select dname,deptno from dept ';
return v_return;
ELSE
V_RETURN:='SELECT ename,deptno FROM EMP ';
return v_return;
END IF;
plsql reportEdit
report error:
ORA-20001: Error fetching column value: ORA-01403: no data found
DEPTNO Ename
and in case i change
select dname from dept ; for select dname ,deptno from dept ;
then i m able to see only the col deptno , but in query i never used dept...
I am unable to get where is the mistake ..
Kindly to a favour by using the above link & checking the application .
Regards,
Nandini Thakur.
Edited by: Nandini thakur on Nov 25, 2010 3:59 AM -
Oracle APEX 4.0 - Interactive Report - Table Column Filter Issue
Environment: Oracle APEX 4.0 - Interactive Report - Table Column header Filter Issue
We have developed an interactive report using Oracle APEX 4.0, which contains a record count of around 3,000 Rows. All the rows values are unique in nature. When we try to filter the same with the help of column header filter option available in the interactive report,We get only 1000 records.
Could some one help us, why this behaviour under APEX Table Column Header Filter as if it does not display beyond 1000 distinct values.
Is there a way or workaround on how to get all the records in the column header filter?
Thanks in advance.
KrishHi
Thanks for the advice and this issue has been moved to the below URL
Oracle APEX 4.0 - Interactive Report - Table Column Filter Issue Posted: No
Krish -
Oracle APEX 4.0 - Interactive Report - Table Column Filter Issue Posted: No
Environment: Oracle APEX 4.0 - Interactive Report - Table Column header Filter Issue
We have developed an interactive report using Oracle APEX 4.0, which contains a record count of around 3,000 Rows. All the rows values are unique in nature. When we try to filter the same with the help of column header filter option available in the interactive report,We get only 1000 records.
Could some one help us, why this behaviour under APEX Table Column Header Filter as if it does not display beyond 1000 distinct values.
Is there a way or workaround on how to get all the records in the column header filter?
Thanks in advance.
KrishKrish,
Interactive report has hard coded limit to display 1000 rows of column filter LOV for performance. Unfortunately, the limit cannot be changed. The workaround is to define a Column Filter LOV for the column instead of using "Default Based on Column Type".
Regards,
Christina
Maybe you are looking for
-
Can't Export Video from Final Cut Pro
After updated to OS Maverick, I can no longer export video from Final Cut Pro. It pops up "The operation couldn't be completed. (com.apple.Compressor.CompressorKit.ErrorDomain error -1.)" ANYONE CAN HELP??
-
Intracompany stock transfer-value stock transfer by adding freight charges?
Hi We want to setup an intracompany stock transfer using purch.doc type UD - with delivery processing. By standard configuration when I post the goods issue in the delivering plant it value the material movement by using the price from the delivering
-
What application should i use to create the xml data as the input data for XFA template
HI, I need to generate pdf or html document form from existing XDP with the given xml formatted data set. We usually use word to generate content for those XFA template, as the data should be in xml format content in word document should be able to c
-
How to quit all open applications/windows?
I have had Leopard since Halloween. How can I quit/close all open windows/applications in one fell swoop rather than go through the Dock and quit/close each one separately? ~Lorna http://web.mac.com/lorna6
-
Macbook won't let me backup iphone
I wasn syncing my iphone to my macbook and for backing up it said I have not enough space for backing up, I have 170 Gigabytes free, not sure why it wont backup.