Bug in the classic report based on the function?
A simple example, suppose I want a classic report in which I can change the sort field by selecting in the P1_SORTFIELD element. Apex 4.2, I was able to implement the report using the PL/SQL function
return "select ENAME, SAL from EMP by | : P1_SORTFIELD;
I can't do that in Apex 5 on my workspace apex.oracle.com. I either get a runtime error "SQL command not completed property" if I use generic column names, or 'not all variables' if parse error I do not have.
My real application use generic column names, so I am more interested in a solution to this. For example, I tried to create a report with the source
return "select ENAME from EMP by ENAME;
If I run using the generic column names I always get the runtime error "command SQL not successfully completed.
Is this a bug?
Ed Sciore
Hi Ed,
I ran your application in debug mode and displays the following error output.
show report determine column headings ...Execute Statement: select ENAME, SAL from EMP order by ename order by 1 nulls last Logging exception: Sqlerrm: ORA-00933: SQL command not properly ended Backtrace: ORA-06512: at "SYS.DBMS_SYS_SQL", line 1445 ORA-06512: at "SYS.WWV_DBMS_SQL", line 464 ORA-06512: at "SYS.WWV_DBMS_SQL", line 475 ORA-06512: at "APEX_050000.WWV_FLOW_DYNAMIC_EXEC", line 411
See the other "order by null 1 last" that is added to your statement. This is what the origin of the problem. The additional order by is caused by the "Sortable" indicator enabled for your columns. If you disable the sort, because will work you who control in your SQL statement in the report well.
I'll take a look tomorrow, if we had a different behavior in 4.2 to automatically disable these flags and how it is actually easy to determine safe at the time of the design that your pl/sql function returns a SQL statement with an ORDER BY clause.
Concerning
Patrick
Member of the APEX development team
Tags: Database
Similar Questions
-
Highlight a line in the classic report based on condition
HI all the gurus
Apex 4.1.1 using oracle 11g linux oc4j
I want to emphasize a line where #column_value #= 'Y' to keep gray others like normal report parameters.
I have a simple sql query
SELECT PK_ID, FIRST_NAME, LAST_NAME, INITIAL_REG_DATE, MAIL_DATE, BEGIN_DATE, END_DATE, END_DATE-BEGIN_DATE as "#days", BEGIN_STATUS, END_STATUS, COMMENTS, DELETE_FLAG, case when DELETE_FLAG='Y' then 'GREY' else '#f0f0f0' end DELETE_FLAG , INITIAL_REG_DATE+(END_DATE-BEGIN_DATE) "New Reg end date" FROM SOR_TRACKING_DEL where pk2_id =:P216_Detail order by mail_Date desc
I created a dynamic action
who will be the tree on load, LINK on this classic report
$("input[name=f29]").each (function () {}
var lThis = $(this);
{if (lThis.is("Y"))}
lThis.parents("tr:eq(0)").children("td").css({"background-color":"GREY"});)
} else {}
lThis.parents("tr:eq(0)").children("td").css({"background-color":"#f0f0f0"});)
}
});
But it doesn't change color as expected...
Kindly help me!
Thank you
Scott and Tom
Thank you guys for looking into this.
Pls ignore my incorrect explanation and my inexperience with jquery.
I read some blog and trying to do the same on the classic report, but all blogs, I found to this day called interactive report or tabular report, that none of them mentions classic report.
I assume that using the classic report will not be a good idea to start with. :/
I don't know if this is the proper syntax and logic to highlight the line
$(
function
(){
var
DELETE_FLAG = $(this);
If DELETE_FLAG.is("Y"))
{
DELETE_FLAG.parents("tr
").children("td").css({"background-color":"GREY"});).}});
I also created app here
http://Apex.Oracle.com/pls/Apex/f?p=35155
get out of the workspace
Tester/testing
request 35155
Thanks again.
-
I think that there is a bug in the function RT Set CPU pool assignments (SMP)
I'm trying to configure Symmetric multi Processing on a PXI controller which has 2 CPUs. I check the number of processors using RT get number of processors (it gives me 2). I have a constant matrix of wire to the RT Set CPU pool allocations function and create an array of 2 elements with system and reserved as the two values (to assign a single processor for my timed loop and the other for "everything else").
It works, which means it seems to do the assignment. But if I look at the assignments of Pool Set CPU error line, it returns-2231, "invalid CPU pool settings. Each pool must contain at least 1 CPU. »
I do not know what that means, or why I am getting the error (I might just "ignore it", but if the error is 'real', which is not supposed to do). The entrance to the Pool Set CPU assignment is described in the documentation as "an array of enumerations, with an entry for each CPU. For me, this means 2 entries, which is what I have.
Does anyone have a rational explanation of what's going on? Is this a bug? The documentation is the problem? I have attached the front (showing the number of processors and the error output) and the (very simple) block diagram.
Bob Schor
Thank you, Bobby.
I reread carefully the Note help "Specifies the Set of processors available for automatic load balancing". Now that I know the 'right answer', I can interpret what is written as planned, but it's not easy!
It is also curious that, although the previous example has generated error-2231, if we deleted the error (or wired never error line), function has, in fact, affect the system and Timed Structures pool to CPU0 (I have a few 'real' testing code that shows CPU0 with Structures Timed cycles). Given that the function "does the right thing" even if you specify parameters of 'bad', perhaps it should be treated as a warning, not an error (or otherwise make a mistake of 'real' not assigned to a pool - it also wouldn't hurt to have a less obscure the Error Message, or more explicit "be sure to have at least a CPU explicitly assigned to each system and Timed Structures pools") , maybe in "BOLD".
This code has no error:
Hereby I give you credit for the 'Solution', but I'll mark my answer as the Solution because it has a photo to help readers who are intrigued by the question and our responses.
-
Functionality of the classic report checkbox column.
My requirement is
I have a classic report based on sql query in this 1st column is checkbox.
When I click on this check box, the value of the 2nd column is copied in the 4th column of the same rank.
Assume that the 2nd column value is 100 after you have clicked on the box of 100 control is copied into reports even line 4 column.
How can I do this?
You want to just copy the value of the of the sal to the text box column. Its simple javascript.
Looking at your page source I see that you call a function called spCheckChange. You use an application process in this function. Is this really necessary? The result is a heavy AJAX call.
You can simply use jQuery, if you create your report the right way i.e. add attributes to the checkbox and textbox which serve to identify which box would copy a value in what text box.
Here is a demo that I put in place.
https://Apex.Oracle.com/pls/Apex/f?p=53154:3:108154269628013:no
username: public_user
password: demo
You can take a look on how javascript code and attributes of the text box/box using your browser tools.
Kind regards
Aalami
Please check the response as helpful or correct if you find it then. Thank you!
-
Classic report - "BOLD" of the 1st line of detail of each break
I have a classic report based on an sql:
Select
'LOCATION ',.
"DEPTNAME",.
"MODEL_NUMBER,"
"FIRSTNAME."
"LASTNAME."
Sum (decode("category",'CAD',1)) CAD,
Sum (decode("category",'Desktop',1)) desktop computer,.
Sum (decode("category",'Portable',1)) Portable
from 'table1 '.
Group
'LOCATION', "DEPTNAME", 'CATEGORY', 'MODEL_NUMBER', 'FIRSTNAME ',.
'LASTNAME '.
Union
Select
'LOCATION ',.
"DEPTNAME",.
"" as "MODEL_NUMBER."
"" as "FIRSTNAME."
"" as "LASTNAME."
Sum (decode("category",'CAD',1)) CAD,
Sum (decode("category",'Desktop',1)) desktop computer,.
Sum (decode("category",'Portable',1)) Portable
from 'table1 '.
Group
"LOCATION',"DEPTNAME","CATEGORY"," "
order by 1 ASC, ASC 2, CSA 3
while I have the total of break on the 1st line and the details below.
For example,.
Human resources New York 2 1 0
Model a Joe Smith 1 0 0
Model B John Wayne 1 0 0
Model B Jim Jones 0 1 0
I want the 1st line (i.e., total of break) to be bold and normal detail lines. How can I easily do that. I looked at the model and I couldn't understand how to differentiate the two types of lines.
Can someone please help.
Thank you in advance,
Robert
Published by: sect55 on September 29, 2009 02:32Hi Robert,.
In the two parts you select statement, you could add in a dummy flag - 1 for the first statement and 2 for the second. Then create a new report based on your existing model. You must define at least two models of row and Conditions - each having the same content, but with a bold style. The condition for the "BOLD" would be ' #FLAG #' = '1' and the second one would be ' #FLAG #' = '2' - you should probably add a third party unconditionally, just in case the use of the model not fat
Andy
-
Interactive report based on a Collection
Hi guys
Using Apex 3.2
I have a classic report based on a collection, which works very well.
I am now trying to create an interactive report based on the same query (collection), but no data is returned.
I there something special I need to do an interactive report.
See you soon
GusHello Gus,
First time when you create a report based on the collection ir, it does not include the columns in the display (don't know why)
pls select the correct answer to help others
Thank you
-
change the color of line based on the value of column 5 Apex in the classic report
Version of the apex 5.0.0.00.31
Standard universal theme
Page theme default template
Classic report
Foldable report template
Hello
I know this question has been asked several times here, but I'm working on 5 Apex and need to know the correct way to do it in this version.
I need to change the color of the text of the entire line (no background color) based on the value in one of the columns of the classic report. I have just two conditions, if the value of column = Yes, color should be red, otherwise it must be green.
I am new to jscript and css, so appreciate if someone can tell me the solution with steps.
I have already checked this link that changes the value of the column, need to do something similar to the whole line.
https://tylermuth.WordPress.com/2007/12/01/conditional-column-formatting-in-apex/
Hi coolmaddy007-Oracle,.
Here's an example set up on the apex.oracle.com according to the specifications you gave: https://apex.oracle.com/pls/apex/f?p=35467:1
Version of the apex 5.0.0.00.31
Standard universal theme
Page theme default template
Classic report
Foldable report template
Here is how it is done:
Create a dynamic action with the following specifications:
Name: Give the appropriate name
Event: After refresh
Selection type: region
Region: select your region classic report
Condition: No strings attached
Action: Run the JavaScript Code
Fire on loading the Page: Yes
Code:
$('td[headers="JOB"]').each(function() { if ( $(this).text() === 'MANAGER' ) { $(this).closest('tr').find('td').css({"color":"red"}); } if ( $(this).text() === 'SALESMAN' ) { $(this).closest('tr').find('td').css({"color":"green"}); } if ( $(this).text() === 'CLERK' ) { $(this).closest('tr').find('td').css({"color":"blue"}); } });
NOTE: Download the selector appropriate for your knowledge $('td[headers="JOB"]') case using firebug/browser development tools.
Items concerned: leave blank.
PS: Changed the example to change the color of text instead of the background color.
I hope this helps!
Kind regards
Kiran
-
Bug report? WITH the statement contained in the classic report LOV
I've defined a "list of selection with query based lov' in a column of the classic report, and if I try a clause
I get this errorwith data as (Select 4 qty from dual) select round(100/qty*(level-1)) perc, round(100/qty*(level-1)) c from data connect by level <= qty +1
WWV_FLOW_UTILITIES. ERR_LOV
ORA-06550: line 1, column 45: PLS-00428: an INTO clause in this SELECT statement
ORA-06512: at "SYS." DBMS_SYS_SQL", line 1249
ORA-06512: at "SYS." WWV_DBMS_SQL', line 930
ORA-06512: at "SYS." WWV_DBMS_SQL', line 999
ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_EXEC", line 695
ORA-06512: at "APEX_040200.WWV_FLOW_UTILITIES", line 927 >
It is fine when I remove the WITH and put my value inside the rest of the query.
Wait?
Request Express 4.2.1.00.08I think you just need to make it clearer to the 'engine '. :)
Try this:
select perc d, c r from ( with data as (Select 4 qty from dual) select round(100/qty*(level-1)) perc, round(100/qty*(level-1)) c from data connect by level <= qty +1 )
I found that LOV analysis can be picky sometimes.
Thank you
-Jorge -
Smartphones blackBerry how to report a bug in the operating system or HW?
Hi all
I would like to know how to report a bug in the operating system or a bug of the HW? Post a message here looks like post it anywhere... If there is a serious bug in the operating system, how can I report on BOARD?
Boris
borisporosin wrote:
I would like to know how to report a bug in the operating system or a bug of the HW?
borisporosin wrote:
Post a message here looks like post it anywhere...
Correct - this forum is a support system-based user community. ON-BOARD staff rarely participate and check no reports of bugs here.
-
Classic report that spans the page loading
THM:2
4.2.1
Hi all
I have two classic reports side by side, based on a somewhat expensive query that returns a number of lines (500) also, we have a box of research and other filters to work on this report. However, the problem is that when the page loads, since the reports run sequentially, the first report on the left side, extends all the way to the right for a few seconds before returning to the right size. I guess this happens because then the second report query (right) runs and pushes the left up. Is there a way to fix the two classic reports width such that it does not stretch on page load?
Thank you!
Ryan
Hi Ryan,
Ryansun-Oracle wrote:
THM:2
4.2.1
Hi all
I have two classic reports side by side, based on a somewhat expensive query that returns a number of lines (500) also, we have a box of research and other filters to work on this report. However, the problem is that when the page loads, since the reports run sequentially, the first report on the left side, extends all the way to the right for a few seconds before returning to the right size. I guess this happens because then the second report query (right) runs and pushes the left up. Is there a way to fix the two classic reports width such that it does not stretch on page load?
Thank you!
Ryan
Region change and put css in the attributes of the region to set the size of the region
style="height:300px;width:500px;"
or you want scrolling of fixed size, if your report has no more. columns fit more in the size
style="height:300px;width:500px;overflow-y:auto;"
Kind regards
Jitendra
-
Sort a hyperlink column in the classic report
4.2.1
THM2:
Hi I have a classic report with a hyperlink column. And I need enable sorting on this. What I did is
Select '< a href = "somelink" >' | party_name | "< /a > ' party_name party_name table.
However, I just need to show the hyperlink column in the report. Couple of questions
1. How can I create party_name-based sorting logic using the updated classic sorting standard? Given that all a hyperlink names begin with < - sorting is random. I added the second party_name column an active by default sort on it, but given that the column can not be shown, is not a good way.
2. I was wondering if there is another way to sort this classic report hyperlink column as shown in the hyperlink and sorting is enabled on the report?
Thank you!
ryansun wrote:
Hi Fac586 - Yes, the requirements are not of the same report. We have several pages with the same type of aspect, however, some of them have a different feature. In this case, Yes, I too simplified it so that easier to understand. I use the hyperlinks on query sql rather that the link of the column is because we have about 5 unions in this query from different sources and each of those interviewing him, having a hypertext link and additional formatting like "BOLD", color etc, under certain conditions. Query1 will return only the party_name, the second query United would have hypertext links, the third would fat etc. The union of the request is not made to take into account this feature, but because of the nature of the data. While the apex feature works very well, the only question I hit is the hyperlink column sorting in a classic report. Where the simplified question. Individual responses, I've had have been very useful and have been applied successfully.
In this case, the request for a classic report that has column link, how to sort would work it would be on a regular character column.
Option 1 (deeply inelegant): Generate an HTML comment containing the sort at the beginning of the column value. The value must be sortable using the character comparison semantics, so dates must follow the format YYYYMMDD, numbers padded to the same length with zeros etc: Re: problem with the Date command
Option 2A: Expand the Expression HTML technique described in your previous thread (marking dynamically of columns in a "BOLD" for the highest value report) to include the tags.
Option 2b: Use the HTML Expression technique described in the previous thread to include custom data attributes and use these to add links to dynamic actions.
If this is done on several pages, and then create a view all the necessary logic and the columns which you can keep it in one place.
-
Default sort of the classic report does not seem to work
4.2.1
THM 2
I have a classic report consisting of an underlying sql with 3 unions. The columns include a party_name (varchar) and two numeric fields.
for example only select total_cost, cost_to_company, party_name, apex_item.checkbox2(1,party_id)
(
Select a.party_id, a.party_name party_name, a.cost_to_company, table a.total_cost when certain conditions
Union
Select a.party_id, a.party_name party_name, a.cost_to_company, table a.total_cost when certain conditions
Union
Select a.party_id, a.party_name party_name, a.cost_to_company, table a.total_cost when certain conditions
)
In our real-world scenario, these three applications are on different tables and different even if some elements are all the same (including the type of data, etc.), where the union
Because I need activate sorting using the report attributes. I put the tri reporting attributes such as 1 - total_cost desc, 2 - Party_name growing.
However, when we run the report, if the total_cost for different parts is 0, the sorting should be based on party_name. That does not seem to happen. It still sorts out randomly. I'm wonderingm if it's because there are trade unions and no order of in the query.
No idea how to solve this problem?
Nothing to do with unions.
It looks like it is connected to your thread previous marking dynamically of columns in a "BOLD" for the highest value report. Is it? If so, where are the links generated to conditionally and other HTML elements? They are more likely to cause sorting problems. Instead of posting question after question about one aspect of the problem after another, you get a solution much faster together by creating an example on apex.oracle.com and specifying the complete requirements.
-
Hi all
APEX 4.2.5
XE 11.2
Report Header fixed
(25 and 26 theme)
I have a classic report, and I use the fixed header template.
If I set the width of a column unless the width of the text in the column, then the data encapsulates as it should, but instead to increase the height of the cell in the row to greet him, he bleeds into the rank and writes on the following lines.
If I change the report to the standard model, it wraps correctly and increases the size of the cell to accommodate the text. Not sure if it is a bug, or Im definition something wrong.
If anyone can help to give advice on how to solve this Id be grateful.
Ive set the maximum width of the CSS report report. and set the width of the column in the column report.
I have reproduced it on APEX...
workspace: VRS
user: test/test
Application: 291
Page: 1
Thank you very much
Richard
Richard Legge wrote:
Hi all
APEX 4.2.5
XE 11.2
Report Header fixed
(25 and 26 theme)
I have a classic report, and I use the fixed header template.
If I set the width of a column unless the width of the text in the column, then the data encapsulates as it should, but instead to increase the height of the cell in the row to greet him, he bleeds into the rank and writes on the following lines.
If I change the report to the standard model, it wraps correctly and increases the size of the cell to accommodate the text. Not sure if it is a bug, or Im definition something wrong.
This is because of rules CSS theme on cells and rows in the report fixed header table:
{table.uReportFixedHeaders > tbody > tr}
display: block;
height: 28px;
}
{table.uReportFixedHeaders > tbody > tr > td}
padding: 4px 8px;
border-top: 1px solid #DDD;
border-bottom: none;
line-height: 20px;
}
I wouldn't really classify it as a bug, more as a hypothesis that the model would be used with data that will not be returned on multiple lines in a cell.
It is easily fixed by substituting equal to line of table and the row height of the cells in the Inline CSS page, as indicated at page 586:
{table.uReportFixedHeaders > tbody > tr}
height: auto! important;
}
{table.uReportFixedHeaders > tbody > tr > td}
line-height: inherit! important;
}
-
I have the classic report in oracle apex
with query below
Select EMPNO, ENAME, HIREDATE, ADDRESS of emp COMM;
If the ENAME = "John".
so, I want to do any "BOLD" line and readonly/inactive. (set of rank who name John)
Thanks in advance...
Simple answer: see this blog: reports APEX: color line based on column value
Thank you
Tony Miller
Software LuvMuffin
Ruckersville, WILL -
Hello
I am migrating an application from 3 APEX APEX 4.2 on a thing I noticed with the classic reports when I put them in the model 23, it's that the first section break has break notch under the headings of columns for this section of line while the remaining lines properly have it display above the headers on the subsequent sections of group.
When I look at firebug code I saw that all the tables but the first, the break line is included in the last line of the previous table, so I can see how it did not work for the holidays since.I have tow questions.
1. is it really intentional because it seems not terribly elegant and my users to zero immediately above as a perceived bug.
2. is there a reasonable job around always use headers repeat on break? I have multiple reports on the same page in places so switch to interactive reports is not a quick fix for me in this case.
Example of a question can be seen at apex.oracle.com at home
Thank you
Brad
Roadling wrote:
Hello
I am migrating an application from 3 APEX APEX 4.2 on a thing I noticed with the classic reports when I put them in the model 23, it's that the first section break has break notch under the headings of columns for this section of line while the remaining lines properly have it display above the headers on the subsequent sections of group.
1. is it really intentional because it seems not terribly elegant and my users to zero immediately above as a perceived bug.
The Standard report template definition in issue 23 contains
thead
andtbody
elements:Before the column header
Column title template
#COLUMN_HEADER# After the title column
After the lines
#EXTERNAL_LINK##CSV_LINK#This is intentional, the best practice for marking up HTML tables. What is not expected is the problem that arises when this model is used with the break of repeat titles on break formatting option. The repeated headings result table consisting of soup of tags containing several poorly constructed tbody and thead, which is not valid elements.
2. is there a reasonable job around always use headers repeat on break? I have multiple reports on the same page in places so switch to interactive reports is not a quick fix for me in this case.
Create a copy of the report model Standard in Standard (break formatting) for use with reports of the break, remove the
thead
andtbody
definitions of template tags and the breakdown of the reports to use the new model of change. (Or, if you use mainly break reports using the Standard template, keep the tags in the copy and remove them from the original in order to minimize the number of reports, you need to change.)Personally, I would create a report model of line custom to break complex reports in order to be able to have complete control over the structure and presentation.
Maybe you are looking for
-
Satellite L50 - B - 1DV Win8.1 - Windows Update error 0 x 80070057
Hello Toshilba Satellite L50-B-1DV my son has not run successfully a Windows Update since last October - I only discovered this yesterday. When I had a look at the updates and pretty nearly any type of troubleshooting, I try, fails with the error mes
-
Yester night I tried to improve my S5 iphone for a new virsion so at the end he asked me my icloud and the password I remember my password but not my icloud so I need your help please.
-
conversion to dynamic issue in 2003
Server 2003, we have trouble converting a RAID drive in Dynamics. Gets an error message on the 'operation could not be completed' and then there is nothing in the event log. Any ideas?
-
Update for Windows XP (KB979306) refuses to install. ___
In the last 3 days, I got repeated automatic update messages that "updates are ready for your computer...". "When I click on download (and then do the install, I tried both Express and Custom) - I get the message some updates could not be installed:
-
all of the icons the desktop or default in the same program
Help, I used 'open with' for a single program and now all the desktops icons show the same default program icon. I can't open any program of my desktop icons. I have to go the the program directory and click on the appropriate icon. How can I get