Export as .xls. Classic report type: SQL (body of function from PL/SQL returning the SQL) query
Hey guys,.
I'm using version 4.2.6 apex. The theme is 26.
IM also using Listener Oracle APEX.
I can print my classic report in PDF or CSV format.
But I need to export it as a .xls extension.
Report type: SQL (body of function from PL/SQL returning the SQL) query
I need is like this cause my 'where' clause type is dynamic.
Look at using this method: Tom's Blog: a non-standard export excel 2010 (.xlsx)
I do something similar for downloads to excel in my projects...
Thank you
Tony Miller
Software LuvMuffin
Ruckersville, WILL
Tags: Database
Similar Questions
-
Classic report command SQL ORA-00933 not properly completed when you enable sorting
Hello
Oracle 11g r2, APEX 4.1.1.00.23.
I have a few reports of type SQL Query (PL/SQL, returning the SQL query function body), so the source is as follows:
Without no sort option, the report is made successfully.begin return points_ui.get_points_query(:P0_FILTER_TYPE); end;
But I got the following error during a test to enable the sorting option for a column:
I read about this error on the Oracle forums, and I saw it was a bug in an older version, but I thought it was fixed in 4.0.2...ORA-00933: SQL command not properly ended
Any help would be appreciated.
Thank you.
Yann.The Order By clause and the column sort is kind of mutually exclusive.
If your SQL in the report area has an Order By inside and you apply the sort order on the columns in the report attributes tab, then errors occur during execution.Concerning
-
SQL (body of function from PL/SQL returning the SQL) query when you use to_char
We are trying to build a page of Type SQL Query report (body of function from PL/SQL returning SQL query).
our request is simple, to extract the month of the column recording_date.
declare
l_query varchar2 (1000);
Start
l_query: = 'select to_char (recording_date, 'MM') of re_productive;
Return l_query;
end;
but we would like the following for this query problem
Function returning SQL query: query cannot be parsed in the generator. If you believe that your query is syntactically correct, check the box of generic columns below the source of the region without analysis.
(ORA-06550: line 4, column 42: PLS-00103: encountered the symbol "MY" what awaits one of the following values:.) (* @ % & = - +; <>/ at is mod remains not rem <>or! = or ~ = > = < = <>and or as between | multiset Member SUBMULTISET_ the symbol ".") was inserted before 'MY' to continue.)
Notes:
1 - the request is correct and it has been tested under sqlplus and toad.
2. we tried option use generic name (analysis of query runtime only) column, but we get the same problem.
any quick help please.Hello
You have not escaped your quote in the string. Try this...
DECLARE l_query VARCHAR2(32767); BEGIN l_query:= 'select to_char(recording_date,''MM'') from re_productive'; RETURN l_query; END;
See you soon
Ben
-
DA on updatable report items Sql query using the class
Request Express 4.2.5.00.08
10-11 g Oracle
I have a page, so it has a link/button when he clicks then modal region will appear. Modal region has a as a table (Type SQL Query (updateable report)). All work very well so far.
However, I've now added some complex things.
for example. My region is based on the query of SQL Type (editable report).
SELECT id, name of family, Traghetti, area, d_date, start_time, End_time, displacement, role of table where id =: P10_ID;
I can also add a new line of course.
My problem is, (point) Shift display based on the value of Start_Time point) and so I made sure the class for two items.
for example, Start_Time (' class = "st_tm" ') and Maj ('class to = "Shift_time" '). Start_Time is based on (LOV) and shift is off the point in the sql query, but change the Start_Time.
And now, I created the DA.
1. event: change
Selection type: jQuery Selector
jQuery Selector: .st_tm
Condition: No.
1. action: set value
Set type: Expression Javascript
The JavaScript Expression: $(this.triggeringElement) .val ();
The element affected: P10_X1 (it is a hidden item)
2. action: Plsql Code
Code: start to null; end;
Page items to submit: P10_X1
3. action: Plsql Code
Code: start
If: P10_X1 between '03' AND '11' then
: P10_X1: = 'EARLIES ';
elsif: P10_X1 then '12' and '18'
: P10_X1: = 'LATES ';
on the other
: P10_X1: = 'NIGHTS';
end if;
end;
Page items to submit: P10_X1
NOW another DA
Event: change
Article (s) P10_X1
Condition (in list)
value (HASTY, LATES, NIGHTS)
Action:
Set type: Expression Javascript
The JavaScript Expression: $(this.triggeringElement) .val ();
Affected item:
Selection type: jQuery Selector
jQuery Selector:. Shift_time
Well, I look forward all the above work well, but I'm having a problem.
If I have more than 1 lines on a modal region and if I change the Start_Time value for a row then MAJ (point) is changing but he effect on all lines.
I want, if I make the changes on the line line # 2 while only 2 # MAJ (point) must be not performed any other lines?
Help, please!
Kind regards
RI
I found the solution me thank you.
I removed all the DA mentioned above and created a new.
1. event: change
Selection type: jQuery Selector
jQuery Selector: .st_tm
Condition: No.
Scope of the event: dynamic and light on page load.
Action (Javascript code)
ROW_ID = $(this.triggeringElement).attr('id').substr (4);
If ($(this.triggeringElement). val() > = 03 &. val() $(this.triggeringElement))<= 11)="">=>
.Val ('EARLIES') $(«#f11_» + row_id);
}
ElseIf ($(this.triggeringElement). > 11 val() & $(this.triggeringElement). val())<= 18)="">=>
.Val ('LATES') $(«#f11_» + row_id);
}
ElseIf (. val() > $19 (this.triggeringElement)) {}
.Val ('NIGHTS') $(«#f11_» + row_id);
}
also created another DA because I have a disabled report items.
Event: before the page is sent.
$('_:_disabled').removeAttr ("disabled");
and finally created manual process of DML for tabular and everything works fine. (Insert, Update, and delete).
Kind regards.
-
Help with an Export on a classic report 4.2.5.00.08
Version: 4.2.5.00.08
Hello
I have a classic report using Break formatting (on the first column). When the report is exported, for example, if there are 3 lines that are in this group only the first cell is filled and the other 2 are NULL.
Like this:
Users than the State of export, like this:
One way to do that was to create a second report without breaking formatting set and fix the terms at a time so that when the "Download" link has been activated the second report, the report without breaking format, would go and download.
My problem is that I forgot how to set the conditions for that to happen.
Can someone help me to implement?
OR
Now is a way to get the formatting AND data in all cells?
Can what information I provide?
Thank you
Joe
Joe R wrote:
I have change the post when you have you answer. A question arose, the download can cause all the filled cells AND formatting break?
Lol you would perform the calculations super aggregate in the report of export SQL using GROUPING SETS or CUMULATIVE instead of APEX report put break in shape.
-
Type: SQL Query (updated report)
Hello
Is it possible by default a value of field in a query SQL (editable report) report region under one form of DML when the user clicks on the button "Add Row"? I want to default of some fields in the value list. It's not as simple as a box of HTML element based on a table, there is a 'Default' tab where the value of the field is going. Any help is appreciated, thanks.Hello
If you want to use fixed text, and then modify the default Type to: PL/SQL Expression or a function
Then, assign the default setting: 'TEST '.
Including the quotes around the string
Andy
-
Body of function from PL/SQL query SQL - problem with where Cluase return
Hi all
I have problem with sub PL/SQL. Where clause does not filter the values even when I change the value: P7_INVESTIGATOR. I have marked with an asterisk for where clause where I want the values to filtered.
DECLARE
v_sql varchar2 (5000);
v_inv VARCHAR2 (100);
Start
v_inv: = UPPER(:P7_INVESTIGATOR);
v_sql: = ' select TBLCASES. INVESTIGATOR as an INVESTIGATOR,';
v_sql: = v_sql | "TBLCASES. CASENUMBER as CASENUMBER,';
v_sql: = v_sql | "TBLCASES. OPENDATE as OPENDATE,';
v_sql: = v_sql | "TBLCASES. ESTCOMPLETE as DATE_CIBLE,';
v_sql: = v_sql | "TBLCASES. STATUS of STATUS ';
v_sql: = v_sql | "TBLCASES. Case CODE case CODE as,';
v_sql: = V_sql | "TBLCASES. FAIR_HOTLINE as FAIRHotline,';
v_sql: = v_sql | "TBLCASES. NYSIG as NYSIGCase,';
v_sql: = v_sql | "TBLCASES. The REGION';
v_sql: = v_sql | "TBLCASES. PROGAREA as PROGArea ';
v_sql: = v_sql | ' from TBLCASES where 1 = 1';
**************************************************************
If v_inv <>null then
v_sql
: = v_sql | "and UPPER (trim (tblcases.investigator)) = UPPER (trim (v_inv))';
END IF;
***************************************************************
v_sql: = v_sql | "order by tblcases.investigator";
Return v_sql;
end;
Thank youwrote:
Or it is possible to write it this way:if v_inv is not null then v_sql := v_sql ||' and UPPER(trim(tblcases.investigator)) = UPPER(trim(:P7_INVESTIGATOR))'; END IF ;
In this case we will use bind variables and we all know that it is very important.
Lev
Of cause, it is the best option. and I strongly suggest the OP to use.
But it depends on how the sql is used later.
Without knowing that, we cannot be sure if the item is available here. -
Top of page justify/format vertical on a region of SQL query report
I have a simple region report, type = SQL query. One of the selected columns is an address in the format which the syntax is shown below:
RTRIM (address_line1| ) "< BR >" || address_line2 || "< BR >" ||
address_line3 || "< BR >" || address_line4 || "< BR >" , "< BR >" )||
"< BR >" || City || ', ' || State || ' ' || Zip_code
It works very well, but he's justifying the vertical center, as is the title of the column. I need both the selected value and the title of the column to be justified high vertical. All the other selected columns are the only line, but it is the only multiline select.
Suggestions on how to achieve this?
Apex v4.2.1.00.08.
Uncle Buck says:
The theme used is "dark blue - 16.
Not a good thing. Very outdated and buggy. Is it a legacy application or one that is (somehow) must take in charge users who use IE6 (or compatibility modes it)? If this isn't the case, strongly recommend that you spend a theme of APEX 4.x standards mode as soon as POSSIBLE.
It would be hard to create a new model, because this model is used by a lot of pages in this application, and they need to all be like.
To get cells aligned at the top using inheritance default: vertical report, watch 1 (exclude null columns) model report in the page CSS Inline property, use the following:
.vertical1 td { vertical-align: top; }
However, I would recommend moving away from using inherited as 'Dark blue - 16' themes and models of integrated by default report. Standards mode APEX 4.x themes and thematic reports patterns will give best results with current browsers.
-
Column classic report - export - not visable (APEX 4.1)
I have a problem with export to excel classic report file.
I can't do a single column to export, only that one does not work, all the other columns in the report are exported.
In the column definition value include in exports is set to Yes.
SQL query is defined as pl/slq body return the sql query.
It's report
http://www.deviantpics.com/images/2013/08/14/report.jpg
It comes to excell
http://www.deviantpics.com/images/2013/08/14/Excel.jpg
No, there is no condition on the column, I have reproduced report on the same page with the same set upward and it works on this report.
I was not able to understand why it does not work on trees report so I recreated all the columns in this report and now it works.
In addition, there is problem when I get to this site, I can not export the values. I see values in the report, but when I export them in they are not excel file.
I solved that with refresing region and submit all items that I use in this query, then all values are excellent file.
-
Classic report SQL question.
Hello
Can I use Snap on command in a classic report using SQL? If so, how?
I use APEX 3.2.1 with Oracle database 10g.
Thank you
Mary
Published by: Gabriel on July 23, 2010 11:20Hello Mary,.
WE BREAK is a SQL * more order thus is not allowed in the SQL of a usual report.
To do this is to use the Break formatting attributes report section. He limited to the break at first, & second or first, second & third columns rows retrieved, but it may be enough for what you're trying to accomplish.
Hope this helps,
John -
(Updated report) SQL query - may not know how to make one
Hi people,
Can someone tell me how to make a report where the data can be updated? Not an interactive report, SQL report that selects a single row. The only options in the menu dropdown I see are "SQL query" and 'SQL Query (body of function from PL/SQL returning SQL query)', but I have a report elsewhere that says: this type are "SQL Query (updated report)", but I do not remember how :(
Thank you very much
-AdamHi Adam,.
An updated report is a 'tabular form' - see: http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/frm_tabular.htm#CHDFBHDB
Andy
-
Replace a string in a classic report
Hello
I have a standard report on a page. Some data in this report must be formatted for display. For example, one of the fields, a CLOB, may contain zero, one or several line feeds [Chr (10)]. I would like the report to start a new line and display a line empty each time as a CHRI10) is encountered.
In a stored procedure, I use the following and it works fine:
Select references1 in l_reading1 from myTable;
l_reading1: = Replace (l_reading1, Chr (10), "< br / > < br / > '");
How would incorporate this substitute in a statement select Classic report?
Thanks for looking at this.
PhilMan2 wrote:
I have a standard report on a page. Some data in this report must be formatted for display. For example, one of the fields, a CLOB, may contain zero, one or several line feeds [Chr (10)]. I would like the report to start a new line and display a line empty each time as a CHRI10) is encountered.
In a stored procedure, I use the following and it works fine:
Select references1 in l_reading1 from myTable;
l_reading1: = Replace (l_reading1, Chr (10),")
');How would incorporate this substitute in a statement select Classic report?
Using this method, just include replace in the report query:
select replace(reading, chr(10), '
') reading from mytableSet the attribute to text to display as column column of Standard report (or Type as plain text and escape special characters No. in APEX 5.0).
However, the double break is an improper use of the
br
element and according to the nature of the data a single break can be as well. If the data consists of text paragraphs, use:select '
' || regexp_replace(reading, chr(10) || '+', '
') reading from mytable
in the source report and add a style sheet to the page Inline CSS attribute:
td[headers="READING"] p { margin: 1em 0; }
Another possibility is to mark the data as a pre-formatted text so that line breaks are rendered as breaks:
select reading from mytable
with an Expression of HTML in the column attributes:
#READING#
-
I work in APEX 4.0 using Oracle 11 g. I've created a classic report, but I'm unable to search on more than one column of the report. Is there a way to define columns in a classic report so that they are available When I created the report, I was invited to select the columns that would be searchable, but the column that it was essential to have available was not in the list. Help, please.
Doug wrote:
I work in APEX 4.0 using Oracle 11 g. I've created a classic report, but I'm unable to search on more than one column of the report. Is there a way to define columns in a classic report so that they are available? When I created the report, I was invited to select the columns that would be searchable, but the column that it was essential to have available was not in the list. Help, please.
Post the source of the report query and the definitions of the report columns. How is the column without research capacity differs from the columns where they were provided. (Tip: search code is visible in the report source query.)
Note that the 'Search' function created by the report wizard is very basic, and the implementation is ineffective when it is used with large data sets. Why it is essential that this particular column is available? Is what data in? How it will be sought?
-
Hello
I have a test_table (col1, col2, col3) on apex.oracle.com.
First of all:
I would like to create report as the type of SQL query:
Select col1, col2, col3 from test_table;
I want to change the properties of the col2 for example the font or color during the generation.
I have to write in the report source code (this is only an example?):
Select col1,
"< span style =" ' make-weight: bold; ' > ' col2 "</span >", "
COL3
from test_table;
I think it's wrong, but I would like to know what are the first principles of the connection between sql and html.
Second:
I create the report in the body of type SQL query return PLSQL function:
Start
return "select col1.
|| "< span style =" ' make-weight: bold; ">" | 'col2' | ' </span >', "
||' COL3
from test_table;';
end;
What is the problem in the two examples? I can't find it in the documentation. Could you tell me something about the principles.
Concerning
Ziut
Hello
One way is to query as
select col1, col2, col3, case when col1 = 'XXX' then 'bold' else 'normal' end as fontweight from test_table;
Column of FONTWEIGHT set as hidden.
Then place the COL2 HTML expression
#COL2#
Kind regards
Jari
-
date picker default value appears only not in the sql query
Hello
I have a page as a table with a query similar to the following:
Select emp_name, salary of emp_table where (hire_date) trunc = trunc (to_date (:P42_START_DATE))
where P42_START_DATE is the name of a date picker.
I put the date picker, "only when the current value in session state is null" and the value of being "select trunc (next_day(sysdate,'MON')-7) from dual;"-essentially the Monday of the current week, the type of source. I updated the date to 5 selector and the sequence of the region 10. Now, when I opened this page, no data gets pulled. I checked the source of the page and the value of the entry date picker is used to "November 17, 2008", but is not somehow reflected in the sql query.
Data get retrieved if I put manually the date in the date picker, but I would like that it by default on Monday of this week. What I am doing wrong?
Thank youHello
>
"Article 1 of the Expression value is NULL" where is expression 1
P42_START_DATE
>Yes, that's correct - No. colon is required here as we don't not using the item as a variable binding, just name for the condition. In my tests, I put the calculation for:
Name of article: P31_HIREDATE (put your P42_START_DATE here instead)
Type: SQL query
Point calculation: before header
Calculation: SELECT TO_CHAR (TRUNC (SYSDATE, 'DAY'), 'DD-MON-RR') FROM DUALMy report SQL statement is:
SELECT EMPNO, ENAME, HIREDATE FROM EMP WHERE NVL(HIREDATE, TRUNC(SYSDATE)) < TO_DATE(:P31_HIREDATE,'DD-MON-RR')
My datepicker object has no special parameters - so:
Name: P31_HIREDATE
Display: Date Picker (DD-MON-RR)
Source: Only when...
Source type: static...
The source value or expression: (empty)
Default: (empty)And that's what I did to get: http://htmldb.oracle.com/pls/otn/f?p=55041:31
Change the date that you like or click Reset to clear the cache (the calculation will be then reset the date to the current date and refiltrer the report)
Andy
Maybe you are looking for
-
How ACTUALLY work Exceptions in cookies?
I normally have to "Accept cookies from site" off (off) and I use the list of Exceptions for the sites I want to then allow cookies. However, when I add a site to the Exceptions list and place cookies 'Allow' for this, the site still tells me that co
-
Alu Canvio 1 TB not recognized
Just bought the Canvio aluminum HDD and plugged. The computer has downloaded the software but I'm not good. It's in "Devices", but there again it is said that the name, shows no free space, etc. Someone at - it ideas?Thank you
-
Can I go by Satellite Pro A200-1YK?
Hello I have the Satellite Pro A200-1YK with the following features1 Intel® Pentium® Dual - Core T2330 1.6 GHz processor2 2048 (1024 + 1024) MB of RAM DDR2 (667 MHz)3. 200 GB hard drive Can I upgrade the RAM to 4 GB (2048 + 2048)? If so, should it be
-
I need motherboard for Satellite A100-599
I need a motherboard (V000068860) to Toshiba A100-599. I can't find any MB on ebay. Where can I find this item? You know of any sites with toshiba parts?
-
LJ Ent m601: LJ Ent m601 PCA connect internal.
Does anyone know if connector J2002 (top of the Exchequer, just under the USB connector) should be something related to it? My service manual says 5 connectors to disconnect to change the Board but I saw 4. And in most cases (as for the DC controller