Classic report column sorting
Hello to the forum of the APEXMy Apex version is 4.2.1
version of database is Oracle 10 g XE on Windows 7 Pro
After upgrading from version 3.2 to 4.2.1 report columns sorting does not work when 'Enable partial Refresh of Page' is on 'yes '.
When 'Enable partial Refresh of Page' is 'No' sort is OK.
Help, please
Concerning
Mark
Hi Mark,
Looks like your json.js causes unrest. It extends to each "object" in JavaScript with two methods called parseJSON and toJSONString. I did a quick debugging and it seems that when we build our AJAX request to sort, AJAX jQuery handling trying to serialize these two functions, because he thinks it of regular data and fails with a JavaScript error.
Looking at the original source of your library to https://github.com/douglascrockford/JSON-js even the creators had some doubts in using this version of the library
JSON.js: this file does everything what json2.js done. It also adds a toJSONString method and a parseJSON method to Object.prototype. Use of this file is not recommended.
Are you sure you have the parseJSON and toJSONString methods? Maybe you're good with json2.js, as well.
Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf
Tags: Database
Similar Questions
-
How to extract values of classic report column in the text element
Hi all
I've created a classic report (select id, name,' < input type = "button" value = "add" id = "add" name = "add" > "as" add details "details ;) with a single column as column values want link.i in the text element when I click on the link of that particular record of the report)
(1) in the link this link column property I've specified the URL as [javascript:insert_in_table(#ID#,#NAME#)]
(2) text two article P_ID, P_NAME
(3) in the header of the page, I've specified as javascript
< script type = "text/javascript" >
function insert_in_table (id, name) {}
var regId = ' #detail #'.substr (1);
var req = new htmldb_Get (not null, $v ('pFlowId'), 'APPLICATION_PROCESS = add', $v('pFlowStepId'));
Req.Add ('P_ID', ID);
Req.Add ('P_NAME', Name);
forced. GetAsync (function () {}
If {(p.readyState is 4)
$a_report (regId);
}
});
}
< /script >
(4) created a (add) process whose point: on demand, run this process when requested by ajax
pl/sql: insert into name_detail (id, name) values (: P_ID,: P_NAME)
now the problem is I m not getting the values of column in the report in the text element, it only shows white.
Kind regards
Ketan
Hello Ketan,
Assuming that you want to insert the values into the table, this is why you want to set values for the element,
If this is the case, then no need to define values for the element to insert.
Follow the steps below, it is one of the embodiment of your condition.
Step 1: Put the code below in your classic report query
assuming that the id is of type number and the name is of type varchar, that's why I am attaching the name to apostrophe, see line 3
select id , name , '' as "Add to detail" from detail
Edit 'Add details' column-> column attributes-> view-> column of Standard report
Step 2: Create a process in the processing of the Page
Name: INSERT_DATA
Address the point: on demand, run this process when requested by ajax
Process: putting the code below
Declare P_ID number ; P_NAME varchar2(50); Begin P_ID := apex_application.g_x01; P_NAME := apex_application.g_x02; insert into name_detail(id,name) values (P_ID,P_NAME); End;
Step 3: Create a java script function to call your insert ajax process.
Change the Page-> the function and the global variable declaration-> put the code below
function insert_in_table(id,name) { apex.server.process ( "INSERT_DATA", { x01: id,x02: name }, { success: function( pData ) { } }); }
Hope this helps you,
Kind regards
Jitendra
-
We can pass values when links between a classic report column?
Version 4.2.1 (blue generator)
Hello
I have a classic report in which I have a hyperlink column, using standard link in the report parameters. Because we can also pass on values to the page that opens the linked report. However, I noticed when I display the window for the value to pass, it lists only the #XY # content of the report. Lets say, I created the link on page 1 which, once clicked Open Page 2.
I want to change the value of: P1_PERIOD to: P2_PERIOD
We cannot only via the link? If I just put the value in Item1 as P2_PERIOD and fill it with: P1_PERIOD, that wouldn't work?
Thank you
Ryanryansun wrote:
Version 4.2.1 (blue generator)Hello
I have a classic report in which I have a hyperlink column, using standard link in the report parameters. Because we can also pass on values to the page that opens the linked report. However, I noticed when I display the window for the value to pass, it lists only the #XY # content of the report. Lets say, I created the link on page 1 which, once clicked Open Page 2.
I want to change the value of: P1_PERIOD to: P2_PERIOD
We cannot only via the link?
Yes, you can, but not by using this syntax.
If I just put the value in Item1 as P2_PERIOD and fill it with: P1_PERIOD, that wouldn't work?
No, : P1_PERIOD refers to the item using the notation variable bind. It is only for use in SQL and PL/SQL within the APEX contexts. Elsewhere in the APEX (HTML source, the links and the branches etc.) you refer to element values using the static text substitution:
&P1_PERIOD.
(Note the end point).
Put P2_PERIOD in the item 1 name and & P1_PERIOD. in value.
-
Ascendant and descendant of the images in the report columns sort...
Hi guys,.
Have you ever tried to change the sorting of images in the most personalized? I tried with no results... replace the images of the theme does not work... Have no idea what to do... Help, please.
With respect,
PsmakRKonrad,
In my demo application, it works. I took a subfolder in the image folder and it shows the picture. I think that you must type
/Custom/example.gif
Instead of
Custom/example.gif
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------- -
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
-
I'm on version 4.1.1.00.23 of the APEX. I've created a classic report and I am trying to sort. Here's how I'm trying to sort by column name. I have TotPGPV with sorting sequence 1 desc and NewTOTPGPV with sorting sequence 2 desc. I have Count1, Count5 with the sort column. What I'm asking is when the report is run can column sorting to default Count1 and Count5 descending instead of the ascendant. I don't see anywhere to set the default value for the sort column.
Hi - on the report of the page attributes - that you show in your attached screenshot - you can select the columns to sort on the sort sequence as well as the direction of the sort, i.e. for a given column, you can choose to allow sorting on this column, what position this column must be in the sort sequence and whether to sort Ascending or descending by default (i.e. '1' means sort this column first and bottom-up and "1 desc") sort this column first and downhill). Don't forget that once you click on one of the headings of column during execution, it changes your sort settings and these settings are stored in your preferences, that is, they are used again the next time you log in your application and rerun the report.
Kind regards
Marc -
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.
-
Custom classic report sorting of columns
I have a classic report in version 4.2.5 which displays the following values in a column:
9 (4)
33 (17)
When I click on the column header and make a descending sort of the 9 just before the 33 because it deals is a string. JQuery Data Tables can correctly sort numbers with $, (, commas, etc...) Do the same with a classic report of APEX is anyway?
https://DataTables.NET/examples/basic_init/table_sorting.html
Please update your forum profile with a real handle instead of 'user10730448 '.
-
Need help to sort a column in the classic report
Hi I'm creating and classic report and I need to sort on the columns. I also use a selection list to filter the records in the column. When I do not use the list selection sorting works but when I'm on the selcet list and select the sort option, then it is showing error. If anyone can help...
Thnaks,
RikHello
Is it possible see the source code?
If you create the developer user to your workspace and post login information.
Or you can send information to connect to me by e-mail. My email is in my profileKind regards
Jari -
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.
-
Reset the sort sequence in classic reports.
I have a classic report with two sortable columns, product number (sequence 1 type) and the name of the product. If the sort order is changed by a user, subsequent executions or the report tracks appear with the last sort order of the report.
For example;
The user runs the report and change the descending sort of the product name.
B the user running the report for the first time and sees the report in the product name descending sort order.
I gave the name of the product a sort sequence 2, but it made no difference.
The sort order can be reset or updated?
Thanks for any help,
DaveHello Dave,
> How the sort order can be reset or updated?
You use the APEX_UTIL. Procedure REMOVE_SORT_PREFERENCES - http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/apex_util.htm#CHDHDFHB.
Kind regards
Arie.-------------------------------------------------------
Be sure to mark the appropriate fix/useful messages. For the long term, it will benefit us all. -
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.
-
Classic report with column LOV
I have simple classic report (Apex 4.2.4) with two columns. One is to main table and shows the ID; another column is LOV that contains detail table names, which must FK main table.
Table structure:
master_table (id NUMBER);
detail_table (detail_name VARCHAR2 (50), master_id NUMBER);
Source report looks like:
Select
ID,
lov_column null
of master_table;
lov_column is defined as a query in function LOV and query looks like:
Select detail_name from detail_table
where master_id = #ID #.
But the application does not recognize the values #ID #? Can I use it without the WHERE statement, but in this case in LOV, I got all the records, and that I want in a folder have values only for this ID.
What can I do?
Thanks in advance.
Kiran I thank you for your care, I finally found the solution.
Apex.Oracle.com cloud works with Apex5, it is not possible to obtain a classical column LOV relation, but it is possible to do this by using APEX_ITEM. SELECT_LIST_FROM_QUERY. And so I did in my application.
in the statement I wrote:
Select
Mt.ID,
apex_item.select_list_from_query (1, null, "select dt.detail_code d, dt.detail_code r detail_table dt where dt.master_id = ' |") Mt.ID) retail
of master_table TM;
And it works!
-
Classic generic column report - update the list column
Consider a dynamic pivot statement as follows (as described by the AMIS) which
select * from table( pivot( 'select deptno, job, count(*) c from scott.emp group by deptno,job' ) )
I used this as a SQL source for the classic report, by selecting "use generic column names.
The report looks like
I can set up the data displayed with a selection list and including a clause where clause
where job =v(''P39_JOB'') or v(''P39_JOB'') is null
List select not PPR on the region,demonstrated here:
https://Apex.Oracle.com/pls/Apex/f?p=73000:39:
Note: , and all swivel jobs are still visible in the form of columns, data is limited
-other jobs are empty
-departments with no clerks are not shown
Let's say you have another list of selection than the work of groups, say the "Présidents" and "close".
How can you update the region to exclude certain jobs?
Reload the page with the value of P39_JOB already set will not affect the result, while including a literal string made.
It seems maybe ODCI function analyzes the query on Lees null, and then fills with actual results.
Does anyone have any suggestions?
Update: it seems a workaround is to inject the value as a substitution string, for example:
and employment as ' & P39_CEO. »
where P39_CEO is lacking in session state %
I've only had this concept works in my client application (4.2, 11 2 GR), not my demo (5.0, 12 c), to even try to meet the relevant quotes and when null. I kept getting
error report: ORA-1403: no data found
I could not work how to correctly apply sys.dbms_assert.enquote_literal)
Scott
Hi Scott
What approach I described in this post: matrix report?
It eliminates the need for any dynamic SQL and I think filtering options might be implemented using SQL/XML features.
-
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
Maybe you are looking for
-
Satellite L750 - audio service of Windows 7 crashes at random
Hello I have 1 laptop Satellite L750 and windows service audio crash randomly.I have two install of windows 7, reinstall the driver of everything her several times, but the same problems. Any ideas? Thank you!
-
Table of cleavage according to its index
Hi all I want to have a 'demux' block which, having a table (2Nx1) as input, splits the data into two tables (Nx1) as output the first array index is even or odd... At first, I tried to implement this with a structure matter in a while loop: But this
-
Updates configuration Windows 0% complete at the start of Windows 7.
Original title: WINDOWS 7 UPDATES do NOT DO. 1.I swich pc suite and... "Configuring updates of Windows 0% complete - no not tun OFF... takes 5 minutes each time then..." 2. the... returning default configuration changes... 3. When you turn off... "if
-
HP Office Jet Pro 8610: Security critical Bulletin applicability
Following message received from HP: Critical security bulletins - 26/06/2015HPSBPI03360 rev.2 - HP LaserJet printers and multifunction, HP OfficeJet printers and multifunction and management network HP JetDirect cards using OpenSSL, remote informatio
-
My profile as an administrator as been deleted or lost. When Itry to connect it does not overlay my log in details. I can connect as a user. How to restore my log in details of the administrator.