Interactive report with checkbox and editable field
HelloFor a project I'm working on, I need to create an interactive report in Apex 3.2 with the ability to select rows and change one of the columns in the report.
To do this, I started by adding these two fields at the request of my IR selection:
CB apex_item. CheckBox (1, product_number)
and
apex_item. Text (2, QTY_TO_ORDER) QTY_TO_ORDER
CB is the files checkbox and QTY_TO_ORDER is the editable field.
It worked like a charm and I had my two fields in the report.
To process the values, I've added this page process, which currently must store only the "product number" and the "QTY_TO_ORDER" fields in a table.
BEGIN
BECAUSE me in 1.APEX_APPLICATION. G_F01. Count LOOP
insert into mytmptable values (APEX_APPLICATION. G_F01 (i), APEX_APPLICATION. G_F02 (i));
END LOOP;
commit;
end;
However, this does not work as I want it to work. When I check the boxes of the two rows, it will store two numbers of good product lines, but it will take the field QTY_TO_ORDER two albums from the table, regardless of who those are checked. I was able to solve this problem, by adding a rownum in the query and using the rownum as the value for the checkbox control. Because I still need that the areas of product_number and qty_to order I made them two text fields.
I changed my page process of:
BEGIN
BECAUSE me in 1.APEX_APPLICATION. G_F01. Count LOOP
insert into mytmptable values (APEX_APPLICATION. G_F02 (APEX_APPLICATION. G_F01 (i)),
APEX_APPLICATION. G_F03 (APEX_APPLICATION. G_F01 (i)));
END LOOP;
commit;
end;
This seemed to solve the problem, and I have now received the good values in the table, unless I used in the report to sort... As soon as I've sorted the report in a different way from that of rownum, I had bad values in the table. The reason is of course that my insert simply selects the nth line in the table, and my rownums are not dynamic.
I found a lot of examples on the internet using "#ROWNUM #" in the selection, which is expected to spawn a rownum in the report. It seems to work in normal report, but in interactive reports, literal values "#ROWNUM #" appears.
Is it possible to fix this?
Hello
Try with 3 fields:
CB apex_item. CheckBox (1, product_number).
apex_item. Text (2, QTY_TO_ORDER) QTY_TO_ORDER,.
prod_no apex_item. Hidden (3, product_number)
The hidden field should be view as a hidden column.
Then your process can be:
BEGIN
BECAUSE me in 1.APEX_APPLICATION. G_F01. Count LOOP
J in 1.APEX_APPLICATION. G_F03. Count LOOP
IF APEX_APPLICATION. G_F01 (i) = APEX_APPLICATION. G_F03 (j)) THEN
insert into mytmptable values (APEX_APPLICATION. G_F01 (i), APEX_APPLICATION. G_F02 (j));
"exit";
END IF;
END LOOP;
END LOOP;
Tags: Database
Similar Questions
-
More than 1 SQL query with checkbox and error invalid number report
Hi all
I have two SQL query reports that each has an apex_item.checkbox and two processes for each report. A report/process works very well. It gives me an error of invalid number.
In addition, another query SQL (editable report) gives me the following error when using the Multi line process, delete.
ORA-06502: PL/SQL: digital or value error: character number conversion
error ORA-06502: PL/SQL: digital or value error: character number conversion
errorOk When I got a report from SQL query (with box and a process) and the query SQL (editable report) everything worked. It stopped working when I added another SQL query report (with box and a process).
A SQL query has the following in my query: apex_item.checkbox(3,email_id,'UNCHECKED') ""
The other SQL query has the following: apex_item.checkbox(2,b.file_id,'UNCHECKED') ""
Any help will be greatly appreciated,
Sylvia
Hi Reema,
I've recreated the region and now it works!
Thank you for this, looking at
Sylvia
-
Interactive report with Null columns
I have a user who wants to export an interactive report, and there need to some columns will appear on export so that he can fill the data later (there is an intermediate step, while we work on getting all the data they need in the database). I created the report query, and there are a handful of columns null or empty (to keep the correct order for export). When I try to add this query to the APEX, in an interactive report, I get an "ORA-00001: unique constraint (APEX_040000.WWV_FLOW_WORKSHEET_COLUMNS_UK2) violated" error.
Googling autour shows me that this happens because of the columns the same name, and the solution is to provide aliases for all columns. My report has alias on all columns, but I can't yet create an interactive report. I tried to change the columns null of empty strings, as well as encompassing the alias in double - quotes, but nothing works. However, I can use my original query to create a standard report, but due to export, this is not ideal.
I was able to create the interactive report with a null and then edited the source column of the report to add to the others. This had to be done one at a time, given that you are trying to add several null columns at the same time gives the same error even once. Unfortunately, when I try and you run the page, I get a ' ORA-20001: get_dbms_sql_cursor error ORA-00918: column ambiguously defined "error.
My original query:
Can someone tell me a way to create an interactive report with multiple null columns?select customer.customer_name as customer, project.name as project_name, trunc(project.estimated_end_dt) as due_date, project_status.project_status_desc as status, null as revenue, project.baseline_effort as baseline_hours, null as projected_cost, null as est_gain_loss, project.actual_hours as actual_hours, project.estimated_hours as projected_hours, null as projected_cost, null as projected_gain_loss, null as roi from project, customer where customer.customer_id = project.customer_id and project.inactive_ind = 0 and project.customer_id is not null and project.estimated_end_dt >= :DTP_P50_STARTDT and project.estimated_end_dt <= :DTP_P50_ENDDT order by customer.customer_name, project.estimated_end_dt;
Hi shimmoril,
The problem is probably that you have two columns aliased as 'projected_cost' (columns 7 and 11).
Hope this helps,
JohnIf you find this information useful, please indicate the 'useful' or 'correct' post so that others benefit. *
-
Interactive report with alternating lines - 5 APEX
Heyho guys.
I got a task to set alternating line colors in my interactive report.
IM using Oracle 11 g Database XE with APEX 5.0.0.00.31 2.
I searched current debates and following this thread:
https://community.Oracle.com/thread/912414?TSTART=0
I followed the comments written there and I tried with javascript, they spoke aboud (I'm a newbie using javascript)
I pasted the following in my page header:
< script type = "text/javascript" >
IT IS THE INTERLACING
function decorateDataGrids (strClass) {}
var tables = document.getElementsByTagName ("table");
for (var i = tables.length; i-;)) {
If (tables.className == strClass) {}
var gridRows = tables [i] .getElementsByTagName ("tr");
for (var j = gridRows.length; j-;)) {If (j %2) {gridRows [j] .className = "even" ;}}
}
}
}
< /script >
< style >
/ * THIS REPLACES THE DEFAULT STYLES OF THE APEX * /.
table.apexir_WORKSHEET_DATA tr.even td {}
background-color: #F1F5FA! important;
}
table.apexir_WORKSHEET_DATA td {}
background-color: #FFFFFF! important;
border: 1px solid #B3B3A7! important;
padding: 4px 8px! important;
}
< / style >And called in my link to my column ID text field via:
"< img src =" "#IMAGE_PREFIX #edit.gif" alt = "" onload = "decorateDataGrids ('apexir_WORKSHEET_DATA'); ">
If I start the page now, nothing happens.
In the thread, we talk about bad SEO of the IR:
"OK here's why the code does not work." When you use getElementsByTagName, you get a collection, not a single item.
So when you make the comparison to see if the class of the table is an ApEx IR type, you need to reference the current table, not the entire collection. As follows... »
But I don't understand how I'm doing the right reference.
Someone at - it an idea to get this race?
Thank you
pleNn
pleNn wrote:
Heyho guys.
I got a task to set alternating line colors in my interactive report.
IM using Oracle 11 g Database XE with APEX 5.0.0.00.31 2.
I searched current debates and following this thread:
https://community.Oracle.com/thread/912414?TSTART=0
I followed the comments written there and I tried with javascript, they spoke aboud (I'm a newbie using javascript)
I pasted the following in my page header:
for (var j = gridRows.length; j-;)) {If (j %2) {gridRows [j] .className = "even" ;}}
}
}
}
And called in my link to my column ID text field via:
If I start the page now, nothing happens.
In the thread, we talk about bad SEO of the IR:
"OK here's why the code does not work." When you use getElementsByTagName, you get a collection, not a single item.
So when you make the comparison to see if the class of the table is an ApEx IR type, you need to reference the current table, not the entire collection. As follows... »
But I don't understand how I'm doing the right reference.
Someone at - it an idea to get this race?
It's all totally obsolete with respect to the 5.0 APEX where interactive reports have been completely redesigned and rebuilt.
To complete the full version number of APEX, always indicate what theme and browser (s) / version (s) you use when asking questions of shape/layout visual layout.
To go from rank (Zebra) when you use the universal theme distribution in interactive reports, see Re: interactive report - no line scratched?
-
Interactive report with the hierarchy
In Apex Oracle 5.1, I tried to use an interactive report to view details of employee based on a hierarchy. I used the query to display data below:
SELECT last_name, employe_id, manager_id, LEVEL
Employees
START WITH employee_id = 100
CONNECT BY PRIOR employee_id = manager_id
Brothers and SŒURS of ORDER BY last_name;
The output was as below:
LAST_NAME EMPLOYEE_ID MANAGER_ID LEVEL
------------------------- ----------- ---------- ----------
King 100 1
Cambrault 148 100 2
Bates 172 148 3
Bloom 169 148 3
Fox 170 148 3
Kumar 173 148 3
Ozer 168 148 3
Smith 171 148 3
De Haan 102 100 2
Hunold 103 102 3
Austin 105 103 4
Ernst 104 103 4
Lorentz 107 103 4
Pataballa 106 103 4
Errazuriz 147 100 2
Ande 166 147 3
Banda 167 147 3
...
Now, I would like to display data based on the connection of employees.
For example (based on above request): If an employee named - Cambrault is the login, only employees under him (Bates, Bloom, Fox, Kumar, Smith, Ozer) and its own contact information should appear in the report.
Please advise.
Kind regards
mebu
Mebu wrote:
Please take a look on the underside of the employees table, employee_id here will be used as a unique identifier for each lines and names of the connection will be with these employe_id. single sign on Option will be used for login purposes.
Really?
SQL > SELECT last_name, employe_id, manager_id, LEVEL
2 FROM employees
3 START WITH employee_id = to_number(:app_user)
4 CONNECT BY PRIOR employee_id = manager_id
5 brothers and SŒURS of ORDER BY last_name;
LAST_NAME EMPLOYEE_ID MANAGER_ID LEVEL
------------------------- ----------- ---------- ----------
Cambrault 148 100 1
Bates 172 148 2
Flowers 2 148 169
Fox 170 148 2
Kumar 173 148 2
Ozer 168 148 2
Smith, 2 148 171
-
Interactive report with display of the icon to set the page element
Hi all
I am currently using Apex 4.2.4, I have an interactive report using icons, each icon has a link to another page but a few I want to set a value in a page hidden in the same page element which is then used as a variable for a classic report.
I have this work via link href in the icon as f? p ='|| FA.page |': 1 :'|| : app_session |': P10_ID_ITEM :'|| FA.link_name without error.
My problem is that I wanted to put the value of the element without using a link href that I could handle the clicked icon to change the background color so that the user can have a Visual representation, where it was clicked, then using the value of the page item appears the classic report in another region with a partial refresh.
Any help is appreciated, thanks.
Can you provide a detailed explanation of the purpose of this report and the logic used in the report query? What are the rules to control which icons appear in the IR, what icons link to the second report on the page of IR, and icons to link to separate pages?
For me, the report query seems too complicated and inefficient by returning the data it does, and if another level of data is added to the hierarchy or more data is added to the second level, it fails with:
ORA-01427: einreihig subquery returns multiple rows
I'm guessing that the intent is that the IR displays only the icons at the top level of the hierarchy and icons for posting a link to a different page when they have no descendants, or to display the related lines in the secondary report below the IR when they do. I created a new page with the report query modified to a route of tree and keep the upper level lines. It is much more effective than the original query and simplifies the logic necessary for the verification of end-nodes. Instead of generating a URL link (which violates the separation of concerns), the query returns of the discrete values that can be used to implement the HTML link in the Icon View link Custom property:
with icon_tree as ( select ic.id_icon , ic.icon_name , ic.link_name , nullif(connect_by_isleaf, 1) is_parent , level depth from icons ic connect by prior ic.link_name = ic.id_parent start with ic.id_parent is null) select id_icon , icon_name , link_name , apex_util.get_blob_file_src('P10_ICON_IMAGE', id_icon) img_src , nvl2(is_parent, '586', link_name) target , nvl2(is_parent, 'P586_ID_PARENT', null) parent_item , nvl2(is_parent, link_name, null) parent_id , :app_id app_id , :app_session app_session , :debug debug from icon_tree where depth = 1
In the interactive report, Use Custom Icon Link is set to Yes, and the custom link is:
#ICON_NAME#Public static ID
icons
andresults
are applied to the IR and the regions second report respectively for use as selectors in action dynamics and CSS. The protected value property for the page P586_ID_PARENT element must be set to No for the value can be defined by a dynamic action.Dynamic action with several real actions is needed to bind alternatives click behavior to the links on the icons that have descendants (i.e. where the
data-parent-id
attribute has a value):Event: Click
Selection type: jQuery Selector
jQuery Selector:
.apexir_WORKSHEET_ICONS a:not([data-parent-id=""])
Real Actions
Seq: 10
Action: Delete the class
Class:
selected
Selection type: jQuery Selector
jQuery Selector:
.apexir_WORKSHEET_ICONS a
Seq: 20
Action: Add the class
Class:
selected
Selection type: trigger element
Seq: 30
Action: Set value
Wait for result: Yes
Type of value: Expression of JavaScript
JavaScript expression:
$(this.triggeringElement).attr('data-parent-id')
Selection type: Agenda
Point: P586_ID_PARENT
Seq: 40
Action: Discount
Selection type: Region
Region: results
Seq:50
Action: Show
Selection type: Region
Region: results
Seq: 60
Action: Cancel event
Finally, add a style sheet to the Inline CSS property page. Initially, this hides the secondary report and select the parent clicked icon:
#results { display: none; } #icons .apexir_WORKSHEET_ICONS a { border: 1px solid transparent; border-radius: 3px; padding: 0.8em 0 0.5em; } #icons .apexir_WORKSHEET_ICONS a.selected { border-color: #6a9cda; background-color: #bbd1ec; transition: 0.6s; }
However, after all it is the question of why you use an interactive report here if you turned off all the features of the IR? A dynamic list with a custom template box seems to be more applicable?
-
Column header in the interactive report with special characters
Interactive column heading in the report sorting and filtering is broken when I used special characters in it.
Column sorting options appear in the wrong place and the page becomes unresponsive.
Cause: I use a slash "/" in my query and who broke it. I tried ampersand and the same problem exists.
Query: Select project name, status ' Open/closed' projects;
This problem does not exist in the classical report, but only in interactive report
Version: Apex 4.2.4
Here's a demo app with the problem I'm talking about. Trying to sort the column entitled ' open/closed '.
http://Apex.Oracle.com/pls/Apex/f?p=12289
U:testuser
P:test
The issue is identical to an another forumn.
However, I have just created this new discussion with the hope that this minor bug might be fixed in the next version of the apex.
During this time, no workaround or suggestions are welcome.
I tried to make the column "Remove HTML and special characters", but that did not help. I think I have a header of column with some special characters is a pretty basic requirement apex should support.
Hello
I guess simple fix is that not not to use the query column aliases where is /.
But you can use ' Open/closed' as an attribute of the column header.
Kind regards
Jari
-
Interactive report - with different colors column header
Hi all
I use the Application Express 4.0.2.00.07.
Theme: 2 blue Builder
I have the zoom before interactive reports in a page, in do I have to display each header of reports with different colors instead of having the same blue color given by theme for all reports.
Also I need this color change of header for this page only, not for the entire application.
can someone offer me please how to do this?
Thank you for your help in advance.
Kind regards
Santini.
Add a static region ID in each region report and include a stylesheet like the following in the HTML Header page:
When the report 1, report 2, etc. are the static region ID.
-
Interactive report with no column header
Is it possible to show a column with no title (label) in an interactive report?
I tried to delete the column header and save, but when I run the report.
It's still there
See you soon
GusGus,
Try a space character or
Vikram
-
Interactive report with filter Date
Hi out there,.
I've created an interactive report that contains a date column. Default filtering options only work very well. But my users need to filter the data contained in the report, for example if a line contains 21.06.2000 they want to see the value in this column to date filter list and not the default predefined (five years, last day and so on).
I already tried to specify the date string and made a select... wanted my users to_char (date_column, 'dd.mm.yyyy') who beat the sorting, but gave me the filter options. Specifying the date as yyyy.mm.dd is not an option for my users.
Is it possible to get a filter that displays the 'real' data and maintains the right sort order?
Best regards and thank you
MarkusReplace with a greater - than sign and which functions as expected maceyah.
Make sure that the screen - with respect to the column is 'delete the HTML code... '. ».
Kind regards
Malcolm. -
Interactive report with the subreport Details on the same page
Hi all
I am fairly new to APEX, sorry if my question is too obvious. I use Apex 4.0.2 on top of Oracle 11.2.
I have an interactive report that lists the contents of a table. Since there are a lot of columns in this table I would like the report to only show that some identifier columns and all of the currently selected folder is displayed using another report in a separate area on the same page.
The 'link' on the interactive report column is almost that, except that he jumps on another page; I would just like to have a subreport, updated with the data that is selected instead of a new page is displayed. Does anyone know how to do?
Thanks for your help,
ChrisChris,
This looks like what I usually do in my referential data.
I use the wizard to create the "report."
I make sure that the two regions (the form and report) will be created on the same page number
so I check/change the order of regions (second report in the first place, form)
then I put in the form to display in the column 2
Kind regards
RichardP.S., the report shows only enough columns to recognize records. the screen displays all records
-
Hello
I have a report with the box where I can select a record and then add to the database. I want to known how I will know if the user has clicked on one of the box for a particular process will be executed.
Only if the user choose a record of the report, he can call the process to be called with the click of a button.
How can I do this?
Thank youHello
Create a validation page (function returning a Boolean) level and write code similar to the
DECLARE v_count NUMBER := 0; BEGIN FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP IF APEX_APPLICATION.G_F01(i) IS NOT NULL THEN v_count := v_count + 1; END IF; END LOOP; IF v_count = 0 THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END;
Consider your report query is similar to the following
select apex_item.checkbox(1,"PK_CLMN") Tick, col2, col3 FROM tbl_name
See you soon,.
Hari -
Interactive report with 2 links
I have an interactive report that was built of the application wizard when I import an excel spreadsheet.
The report has a link change already who works. The information for this link seem to be in the attributes tab of report under the link column section. I need to add another link and found the code on the forum that I put below.
The problem is the new column of link watch, but does not show the button, just all the code seen starting with the a href. Is there a syntax problem that anyone can see? Any contribution is appreciated. Thanks - Shelly.
SELECT CASE WHEN (: A_ROLE = 'MASTER') THEN
"" < a href = ""
|| ' f ? p = & APP_ID.:3: & SESSION. : & DEBUG. ::'
|| "P3_ID:
|| ID
|| ' > '.
|| "" "< img src =" #IMAGE_PREFIX #show.gif ' border = '0' > "
|| "< /a >."
OF OTHER LINK_COL OF NULL TERMINATOR.
"ID."
"REFERENCE."
"DESCRIPTION."
"SPI"
"HTS"
"ECCN"
"GRI"
"SOURCEOTHER_INFORMATION,"
'COUNTRY ', HE SAID.
"INITIALS."
'CHANGE_DATE '.
of 'PARTS_CLASSIFICATION '.
where
NVL(PARTNUMBER,'@') AS (: P10_PARTNUMBER |) '%') escape ' @'
and NVL(DESCRIPTION,'@') (: P10_DESCRIPTION |) '%') escape ' @'
and NVL(SPI,'@') (: P10_SPI |) '%') escape ' @'
and NVL(HTS,'@') (: P10_HTS |) '%') escape ' @'
and NVL(ECCN,'@') (: P10_ECCN |) '%') escape ' @'
and NVL(GRI,'@') (: P10_GRI |) '%') escape ' @'
and NVL(SOURCEOTHER_INFORMATION,'@') (: P10_SOURCEOTHER_INFORMATION |) '%') escape ' @'
and NVL(COUNTRY,'@') (: P10_COUNTRY |) '%') escape ' @'
and NVL(INITIALS,'@') (: P10_INITIALS |) '%') escape ' @'Hello Shelly,
The post does not show the code you used, so I can't say if there is a syntax error.
However, you must first check on report of the attributes, the LINK column shows like the "Standard report column" instead of "show as text (escape special characters).
Andy
-
Interactive report with named lov
Hello
Is it possible to use a lov named (a static in my case) in an interactive report?
When you use is not an interactive report, it is possible and I can't understand why oracle would not allow it in an interactive report.Hello
It would appear that you can do that (I don't know why, sorry!). You can try using an APEX_ITEM function and make it readonly.
My suggestion, however, would be to create a join with APEX_APPLICATION_LOV_ENTRIES to convert your codes in the display LOV values.
Andy
-
Link to the interactive report with comma
Hello
Anyone know how to create a link that will go to an interactive report and add a filter when the filter value contains a comma?
The URL I have looks like this...
f? p = & APP_ID.:40: & APP_SESSION.:CIR:IREQ_Name:Guy, some:
The problem is considers the value past the comma is for another article. I tried %2C with no luck.
Kind regards
Dan
http://danielmcghan.us
http://sourceforge.NET/projects/tapigenWith javaScript, you need to escape the backslashes. Put two slashes return each place that you are currently using one.
Scott
Maybe you are looking for
-
Serious CD - r media player won't play in my CD player
The CD I burned media player will not play in my CDR compatible CD player. I had success in the past with my CD player, but now they will not play in my CD player. Yes, the CD drive is compatible with the CD - Rs. I use this system to work much as
-
X 301: GTA IV game help, run?
Hello people IM thinking to buy a GTA IV but I don't know if you really run, at least in the minimum to my thinkpad... I have a X 301 GT with windows XP PRO all updates (the only problem is the offset for a video card yet) 2 GB of ram and an INTEL MH
-
Flight Simulator X not would allow me to get it because it says I need to update the video card. I think the problem was that I finally erase all memory of the computer using a special cd, because once I have done this and downloaded the software aga
-
Why it says this when I know for sure I'm connected, why it wont allow me to play the games
-
How fees are there for audio conferencing in microsoft live meeting
how much should I pay for audio conferencing in microsoft live meeting. Waiting for your response. ConcerningShonan systems