Calculated in classic report field
I'm trying to sink editable report classic and based on the values that fill the users who filed the value in another column. I saw something similar on the forum, but nothing has really worked for me.My report is based on a sql query.
SELECT column1,
Column2,
Column3 of table
I want editable Column2 and Column3 = Column1 + column2
I've updated the code in your application.
check the solution.
If you feel its helpful, mark it as useful.
If his brand has responded as a response.
Thank you
Ramesh P
Tags: Database
Similar Questions
-
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.
-
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#
-
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
-
Column width classic report apex 5.0
Hello
Using the latest version of the Apex
version: 5.0.0.00.31
Information of the database: Oracle Database Enterprise Edition Release 12.1.0.2.0 12 c - 64 bit
Theme: Universal Theme,
Models Page and the region: Standard
I wanted to know what is the correct way to set the width of a column on a classic report in the new theme.
I have two columns in the classic report and uses the form fields Stretch on model options in region I need the report to take the entire length of the region.
I want to control the width of the first column to take less bandwidth. Currently, each column is set to 50% each.
Please provide your suggestions.
Hi Madhu,
Go to the Page attribute
under CSS-> Inline-> put the code below
td[headers="JOB"] { width: 200px !important; }
Here, instead of WORK put the column heading that you want to increase the width
Kind regards
Jitendra
-
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.
-
Classic report region is not refreshing using the DA
Apex 4.2.2 on Oracle 11.2 use EPG in Linux
I have a Camembert and I want user to click on a section and refresh a report classic region under the graph on the same page. I've used various methods to try to get this working, but none succeeded. Here's what I have right now - when a pie is clicked, a value is returned to a text P19_STATUS field in the region of report using javascript in a DA:
AnyChart.getChartById ($("#chart2_chart_object").attr ("id"))
.addEventListener ("pointClick", Function {}
$s ("P19_STATUS", e.data.Name);
});
It works fine as I can see the value that corresponds to the label in the chart. I created a second DA with an event of amendment to article P19_STATUS. There is a REAL action - Refresh. Selection type:, Region: classic report (40). I put also enable partial Page Refresh Yes on the classic report and the elements on the Page to be sent to: P19_STATUS. When the user clicks on the cake the value is in P19_STATUS, but the report is not updated. FYI, I also tried $('#report_region_id') .trigger ("apexrefresh"); in the second DA but which doesn't work anymore. I want only the region refresh, not the page. Please help - I'm fairly new to Apex, so please be as detailed as possible. Thank you!
Nicolette wrote:
User12037683
The missing part was that the report is a subregion of the chart area.
Under regions have their own model of the region. Instead the use of models from the parent area area unit.
Models of the region can be specified for the sub regions as all other regions. In this case it seems to be a problem with the sub-region model as it appears in the list of model as 48560037058667637086selection.
-
Cannot save box-States in classic report
Hello
I googled this problem, but I have not found a solution.
I have a classic report with 16 box-columns. It is a part of the select statement:
Select
APEX_ITEM. Text(1,PF.ID) id,
f.Frage,
APEX_ITEM. CheckBox(2,PF.ja,,PF.ID) ja,
APEX_ITEM. CheckBox(3,PF.) Nein, NULL, PF.ID) nein.
APEX_ITEM. Neiu CheckBox(4,PF.neiu,,PFID),
[...]
of prueffragen pf,.
fragenkatalog f
where pf.frage = f.id
If the value of the column for a field of response (called here "ja", "nein", "neiu") is the value of the ID column, the box is checked. I thought: "Bravo!"
But save the values for the works dosent tables. It is a part of the procedure to save the values for the field of answer 'ja ':
BECAUSE me in 1.APEX_APPLICATION. G_F02. COUNTING LOOP
UPDATE prueffragen
JA = APEX_APPLICATION SET. G_F02 (i)
WHERE id = to_number (APEX_APPLICATION. G_F02 (i));
commit;
END LOOP;
It seems that I can't read the value of the new checkbox checked. Perhaps because the page is not submitted. As an example, that I have checked 2 ckecboxes and I checked off one more and try to save it, I see that the array has 3 entries (only the checked boxes are in the table), but the value of the new checkbox enabled is 0 and did not retain the primary key field value.
What can I do?
Kind regards
Mark
Hello
OK, sorry =)
You have defined wrongly APEX_ITEM. P_value and p_checked_values in the query parameters BOX.
Please check your example now
Kind regards
Jari
-
can a column of 'link' (classic) report trigger a dynamic action?
In order to avoid a complete package and following flicker,
can the link associated with a column of the classic report
somehow trigger a dynamic action?
Something along the lines of
- run few PL/SQL (some parameter passing along)
- refresh a page region to reflect the changes brought about by the (1)
In practice, I have a page that emerges already, master/detail
with the need to manage another set of detail records.
I can collect a bunch of fields that are not related to the db.
and generate an insert + update via a button 'Add '.
Then the report containing the details is updated
provide visual feedback that a new record has been added
Indeed, with a column 'delete '. The integrated link is
currently a javascript that saves the underlying m and
Removes the secondary details, but it involves a shipment
and refresh the entire page. It can be avoided?
(running apex 4.2.1)
You can use the onchage event to create your dynamic action. Make sure that there is a hidden page element (value not protected). From your link to classic report column, set the value of the page element hidden by using the JavaScript API $s () that will trigger the dynamic action of the onchange event.
javascript:$s('P1_HIDDEN_PKEY_ID',#ROW_PKEY#);
Thank you!
JMcG
-
Dynamic cell colors based on values - Classic report
Hello
I have a requirement where certain columns in my classic report should change the color according to the percentage.
I referred to the following code:
But my requirement is quite complicated, I already do a lot of calculations on the existing columns:SELECT e.*, CASE WHEN sal < 1000 THEN 'red' WHEN sal BETWEEN 1000 AND 2000 T wHEN 'yellow' WHEN sal > 2000 THEN 'green' END the_color FROM emp e
ex:
Can someone help me to modify this code for the column, so that cells (not lines) of my changes to report Classic color dynamically, say what percentage of the above code is > = 75 it must be green, less than 50 means red.ROUND(((COUNT(CASE WHEN class ='A' THEN 1 END)/ nullif((SUM(CASE WHEN class ='B' THEN 1 END)+ SUM(CASE WHEN class ='C' THEN 1 END)),0))*100),1) as Percentage
Thank you!Example query:
select cust.* , case when credit_limit > 5000 then 'red' else 'green' end as bg_color from ( select CUSTOMER_ID, CUST_FIRST_NAME, round(dbms_random.value(1000,9000)) as CREDIT_LIMIT from #OWNER#.DEMO_CUSTOMERS ) cust
In the definition of the column in CREDIT_LIMIT, set the HTML Expression < div style = "background-color: #BG_COLOR #" > #CREDIT_LIMIT # < / div >
See the result: http://apex.oracle.com/pls/apex/f?p=41715:3
You can also create html together in SQL but I would like to split logic (SQL) and the user interface.
Another option might be to create dynamic Action (after discounting the report area) and to create a combination of astute selector and a piece of JavaScript, but I guess it's easier. -
Bug report - classic report lov definition retained when it is no longer relevant
Hello
In January, I spotted a case where, the attributes were selected after a selection has been changed, and related fields are hidden in the dev environment.
http://www.grassroots-Oracle.com/2013/01/dynamic-action-hidden-false-actions.html
Anthony Rayner asked me on twitter for more examples, and I just found a.
Classic report - display of the column as "list of selection (query based lov).
Add sql LOV.
Replace 'report type column' or 'display as text... '. ', save.
Change to 'select list... ". '--> lov definition is displayed again.
I actually founded it after assigning the column standard report column, then copy the page - the LOV was present in the new page!
ScottScott,
Thank you for following up on that. I submitted the bug #16482841 to do this, which will be reviewed at the next major release.
Thanks again.
Kind regards
Anthony. -
Assign the value at the point of application of the classic report
I have a classic report in 4.2 Apex in which a column is bound to a different page. Now, I want to store the value on which the user clicked in a part of the application. How can I do? Help, pleaseElement and the value light on the element fields and the value for the column link.
Learn more about this error. Is that when you click on the link? The destination item is protected? That would explain the error.
-
What is the PX_REPORT_SEARCH of the classic report element?
In the past I have worked with APEX a bit - is version 3.0 and earlier and more than 2 years ago. I'm now review APEX and trying to learn all the differences between it and the version 4.0.X. I created a 'normal' report (not a report interactive') and I have this reference to an element of P2_REPORT_SEARCH that I can't find anywhere, and I'm not find anything in the documentation on this subject. I have search the Forum on "% _REPORT_SEARCH" and get loads of hits, but not seeing where someone says the gist of it. The portion of the predicate generated automatically by the report page is listed below. He seems to be searching for the existence of my newly created Research Articles. Can someone indicate any decent white papers or documentation areas that cover this concept of 'REPORT_SEARCH '?
where)
InStr (upper ("MERCHPLANNAME"), upper (nvl (: P2_REPORT_SEARCH, "MERCHPLANNAME"))) > 0 or
InStr (upper ("BRANDDESC"), upper (nvl (: P2_REPORT_SEARCH, "BRANDDESC"))) > 0 or
InStr (upper ("MKTSTYLEGROUP"), upper (nvl (: P2_REPORT_SEARCH, "MKTSTYLEGROUP"))) > 0 or
InStr (upper ("COLUMN_KEY"), upper (nvl (: P2_REPORT_SEARCH, "COLUMN_KEY"))) > 0
)
Thank you very much
David
Published by: user13293413 on February 1, 2011 13:36
Published by: user13293413 on February 1, 2011 13:53David,
When you create a classic report, there is an option to add the search. If you select Yes, APEX creates a html box above the report that contains a text field - which is what the P2_REPORT_SEARCH element must make reference to. That where clause is then added to your query so that you can filter the results.
Van
Trent -
Classic report - add the column "select box"?
I have a classic report and you want to add a column with a check box so that the user can select several lines and perform an action on all of the lines (delete selected, for example). Looks like it should be easy and maybe integrated features, but I don't find it. Is there a standard way to do this?
Steve
APEX 5.0
Hello
to add a box to your classic report using apex_item.checkbox like this API function:
select APEX_ITEM.CHECKBOX(p_idx=>1, p_value=>DEPTNO) as select_dept, DEPTNO as DEPTNO, DNAME as DNAME, LOC as LOC from DEPT
You can access the values checked (for example in a process page)
declare v_deleted_depts number := 0; begin FOR i in 1..APEX_APPLICATION.G_F01.count LOOP v_deleted_depts := v_deleted_depts + 1; delete from dept where deptno = APEX_APPLICATION.G_F01(i); END LOOP; :P1_DEPTCOUNT := v_deleted_depts; end;
P1_DEPTCOUNT (hidden) is just for later interaction with this procedure - for example, you want to present your users with a message of success and error custom as "Deleted & P1_DEPTCOUNT. departments. »
Maybe you would like to add an option to check all checkboxes at once. If so, read this blogpost Blog of Carl Backstrom: September 2007.
Kind regards
Pavel
Edit: don't forget to toggle the leak key for special characters not your column "checkbox.
-
Aliging two tables side by side on a classic report
Hello
I have three regions on my page. The first two regions are of pie charts and appear side by side.
The third area is a classic report and appears in graphic regions.
The problem is that the first chart area has the same width as the region of the classic report. This causes a gap between the two tables. How can I remove the gap between the two graphic region, ignoring all that is the width of the classic report?The page below shows an example:
https://Apex.Oracle.com/pls/Apex/f?p=76322:22
Username: forum
Password: abc123
Thank you
Zkay
ZKay wrote:
Thanks for the reply. It reminded me of the importance of mentioning the version etc.
I use 11g with Apex 4.0. and the generator 101 Blue theme.
So, please advise to what precedes.
APEX 4.0, according to me, you will need to assign property attributes of the region HTML table cells of the region report
colspan="2"
or put the report on a different display area point tables, say body Page Template (1 points below the content of the region) for maps and body Page Template (2 items below the content of the region) for the report.
Maybe you are looking for
-
I work with several (about 11) iMacs on actions delivered by a windows server. Working on these actions, instantly maps show a red ball and all rights are gone.
-
Pavilion 550-a114: turntable at the Pavilion 550-a 114
I want to record my turntable to my pc. My Pc has 3 entrances, blue, lime green and pink. Lime goes to my speakers (stereo). Blue takes the microphone of my helmet. I can't understand what is the rose. If I plug the line of my turntable into the blue
-
HelloWorld deploys in Eclipse under Simulator 8130 but not 9500 Simulator
I followed the steps of http://www.thinkingblackberry.com/archives/21 If I take the JDE 4.5.0 with 8130 Simulator, I can navigate to the HelloWorld icon, click on it, the application is running, I can hit breakpoints, etc. I turn then to the JDE 4.7.
-
I just bought a new laptop with Windows 8 is installed. When I try to install my printer, I get an error saying that there is no driver. Where can I download a driver for this printer and the OS from? Also, where can I find a list of compatible print
-
Windows 8, cellular modem and WiFi direct printing problem.
I have a Samsung ATIV Smart tablet PC running windows 8 (not RT). The Tablet contains a cellular radio. We use the tablet in an environment without Wi - Fi access so access to internet via the cell connection. We have a Samsung printer that sets its