Use of Checkboxes on reports
Hi
I am using the HTMLDB_ITEM.CHECKBOX function. It works fine in the report, as below;
SELECT
"POOL_CARS"."ID" "ID",
"POOL_CARS"."REG_NUM" "REG_NUM",
"POOL_CARS"."MAKE" "MAKE",
"POOL_CARS"."BHP" "BHP",
"POOL_CARS"."PURCHASE_DATE" "PURCHASE_DATE",
"POOL_CARS"."MODEL" "MODEL",
"POOL_CARS"."COLOUR" "COLOUR",
"POOL_CARS"."STYLE" "STYLE",
"POOL_CARS"."PRICE" "PRICE",
"POOL_CARS"."AVAILABLE" "AVAILABLE",
HTMLDB_ITEM.CHECKBOX(1,"AVAILABLE",
DECODE(AVAILABLE,'Y','CHECKED',null)) "Av ",
"POOL_CARS"."DEPT" "DEPT"
FROM
"#OWNER#"."POOL_CARS" "POOL_CARS"
I want to use the checkbox to cause an update to the table (set Avail to Y where the box is checked, and to N for all other rows). So I have then created a submit button and a process to be run as follows
FOR I in 1.. HTMLDB_APPLICATION.G_F01.COUNT LOOP
UPDATE POOL_CARS
SET available = 'Y'
WHERE ID = to_number(HTMLDB_APPLICATION.G_F01(i));
htp.p('debug' || HTMLDB_APPLICATION.G_F01(i));
END LOOP;
I have a few problems here.
1. When the page is run the check boxes show up fine. When submit is pressed I get
ORA-01722: invalid number.
2. The line 'htp.p('debug' || HTMLDB_APPLICATION.G_F01(i));' does not seem to do anything !
3. I do not understand how to connect the current line within the loop to an actual row as the where clause is not realistic.
Can anyone help.? .
Jelane,
You have to reference the "ID" in your htmldb_item.chekbox api:
htmldb_checkbox(1,"ID",.....
Hope this helps,
Jos
Similar Messages
-
Use of Checkbox in Report for calculation and determine checked records
Dear All,
Application Express 4.0.1.00.03
I have a Report based on Invoice table which displays unpaid Invoices.
Also I have added one check box (Not a column in Invoice field) to each row of the report query, the user will be check to pay the Invoice, on checking of the Invoices I need to
1. Calculate the total of Invoice Amount for selected Invoices.
2. After selection of Invoices User will click on a Button which will open the Payment Form (New Page or Same Page Region),
but some way I need to know the Invoice No. of each Invoice row selected so that I can use all the selected Invoice No's for creating the Payment.
3. Any way to add a button on each row of the Invoice that will be used for the Payment of that Invoice only.
One way can be to create a column to save the check box value which I am aware of, but am looking for other alternate if possible.
Hoping for some good solution.
Thanks & Regards
Arif Khadasvee wrote:
You would need to make the amount column(the one which is used for total) editable so that its value can be accessed easily from JS. You can made it read-only if required ( apex_item.text(2,INV_RENT_VALUE + INV_OTHER_VALUE ) ?? ) .
How can I make it read only, there is no such attribute which can be set for report column as it exists for Items.
Also Now I have the following report query:
SELECT INV_LSE_NUM "Contract No.",
INV_FROM_DATE "Collection Date",
INV_FROM_DATE "From Date",
INV_TO_DATE "To Date",
INV_RENT_VALUE + INV_OTHER_VALUE "Invoice Amount",
INV_AMOUNT_PAID "Amount Paid",
INV_RENT_VALUE + INV_OTHER_VALUE
- INV_AMOUNT_PAID "Balance",
INV_NUM "Invoice No.",
'Pay' "Pay",
APEX_ITEM.CHECKBOX (1, INV_NUM) "CB_PAY",
APEX_ITEM.TEXT (2, INV_RENT_VALUE + INV_OTHER_VALUE - INV_AMOUNT_PAID)
"BAL"
FROM RE_INVOICE
WHERE INV_COM_NUM = :P0_COM_NUM
AND INV_RENT_VALUE + INV_OTHER_VALUE > INV_AMOUNT_PAID
AND INV_LSE_NUM =(SELECT TO_NUMBER (C001)
FROM APEX_COLLECTIONS
WHERE COLLECTION_NAME = 'LEASE'
AND SEQ_ID = TO_NUMBER (:P24_SR_NO))The Next thing is the HTML Header for the Page:
<script language = "JavaScript" type="text/javascript">
total = 0;
$('input[name=f01]:checked').each( function(){
parent_row = $(this).parents('tr:first');
amt = ( parent_row.find('input[name=f02]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f02]').val() );
total += amt;
$s('TEST',total); -- Test is an Item on the Page.
</script>Also I checked from the Page source "CB_PAY" and "BAL" have names f01 and f02 respectively.
Even now when I check or un-check the Value in TEST item is not displayed as required.
Anything more is required, what am I missing.
Thanks & Regards
Arif Khadas -
Hi ,
I have a requirement to show a check box to each row in a report and delete the rows which has enabled .
Here am using apex_item.check box(1,empno,'UNCHECKED') " ", in a query ,but i am unable to see check box in output.
instead of check box it showing like*<input_type value=empno>*
Please help me to solve a problem..
Thanks in advance
Regards
Narender BHi ,
As you said i used apex_item.checkbox(1,empno,null) " " then in output it is showing like this
*<input type="checkbox" name="f01" value="3478505606638632" />*.
please help me on this issue
Regards
Narender B -
Change Value of HTMLDB_ITEM using HTMLDB_ITEM.CHECKbox
Hello,
I've got a region with a 'pl/sql function returning sql query'
declare
q varchar2(4000);
begin
q:=' select htmldb_item.checkbox(1,t.jedi_ean_id) as Auswahl, ';
q:=q||' t.ean, j.artikelbezeichnung, ';
q:=q||' t.artikelmengeneinheit, ';
q:=q||' htmldb_item.text(2,t.iln) as ILN, ';
q:=q||' from malus.jedi_ean t; ';
return q;
end;
My Query return for example 10 rows. Now I want to check 5 of this 10 rows using the checkbox.
With the following PROCESS i am able to save the new values of the field ILN to the Database.
for i in 1..HTMLDB_APPLICATION.G_F01.COUNT
loop
update jedi_ean j
set j.iln = HTMLDB_APPLICATION.G_F02(i),
where j.jedi_ean_id = HTMLDB_APPLICATION.G_F01(i);
end loop;
Now to my Problem:
I want to have an input field outside of this report where the user can manually set the value of the field ILN.
Afterwards the user checks 5 of the 10 rows and then he should have the possibility to click on a button
to assign these values to the 5 checked rows in the report, not in the database.
After this step the user should click on a submit button an start the existing process above.
Is this possible??Hi,
I do not know can you do that with dynamic action or is there of of box solution.
But see this example
https://apex.oracle.com/pls/apex/f?p=40323:30
You can bind onchange event to text field, and call Ajax to get emp name.
Then use sample JavaScript to set value to display only item
Regards,
Jari -
Error when trying to use this query in report region
Hi ,
I am getting "1 error has occurred
Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00933: SQL command not properly ended"
while trying to use this query in reports region .
Pls help.
Thanks ,
Madhuri
declare
x varchar2(32000);
begin
x := q'!select (first_name||' '|| last_name)a ,
count(distinct(session_id)),manager_name
from cappap_log,
MIS_CDR_HR_EMPLOYEES_MV
where DECODE(instr(upper(userid),'@ORACLE.COM',1),0,upper(userid)||'@ORACLE.COM',upper(userid)) = upper(email_address)!';
if :P1_ALL = 'N' then
x:= x||q'!and initcap(first_name ||' '|| last_name)=:P1_USERNAME!';
else
x:= x||q'!and initcap(first_name ||' '|| last_name)like '%'|| :P1_USERNAME||'%'!';
end if;
if :P1_APP_NAME = '%' then
x:= x||q'! and flow_id like '%'!';
else
x:= x||'flow_id = :P1_APP_NAME';
end if;
x:= x||q'! group by first_name||' '|| last_name , manager_name!';
return x;
end;Hi, I am actually stuck here. Can you please let me know which among these is the higher version.
1) Final Release 3.50
Version 3500.3.016
2) Final Release 3.50
Version (Revision 481)
Because it is working fine in the 1st one whereas its throwing that error pop-up in 2nd one(as soon as we select the Change query global definition option) . -
H ow we use check boxes in report
how we use check boxes in report(alv,intrective)
Hi,
In the basic list we will display the Check box, once the check box is clicked then the recrod information should be displayed in the secondary list. so we will give the Check box for every reocrd then what ever we select the checkboxes. then we shoild provide the info of those records
Reports with checkbox
Regards
Sudheer -
How do I use the Oracle Developer Reporting Control in Visual Basic 6.0?
I was wondering how to use the Oracle Developer Reporting Control componant in Visual Basic 6.0 to generate reports in Oracle Reports? Any help would be appreciated.
Hi Rohit,
Would like to ask you some questions about the oracle report with Visual Basic.
1. I have a report built in oracle report. Currently there is a Visual Basic program want to pass some parameter to this report. Can Visual Basic program pass the parameter to this oracel report?
2. Based on yr answer, do i have to installed the oracle report? or just copy and register the Rwsxa60.ocx (i'm using oracle report 6i) in the PC? So can i use this activeX control.
3. Is this activeX control similar to Crystal report object which can found in VB?
4. Is there an example/guide on how the Visual Basic pass the parameter to oracel form?
Your answer will be much appreciated.
Thanks.
Regards,
Hock Leong -
What are the main tables using in vendor performance report.
what are the main tables using in vendor performance report.
how many select statements are in ABAP reports.Refer the links -
vendor performance report !!!
vendor performance report
vendor performance report
I need standard vendor performance report
Regards,
Amit
Reward all helpful replies. -
Query Stripping not working properly when using variable in the report
We have issue with WEBI document that have query stripping enable.
Once the query stripping enabled there is no data return in the report.
We have investigate on the problem, the query stripping function are notable to retrieve objects that indirectly used in the report
as we have
many variable in the reports.
Ex.
Var1 = object1 + object2
Var2 = Object3 + Object4
Var3 = Var1 + Var2
Var4 = Object1 + Object2 + Object3 + Object4
If we use only Var3 in the report, the object1,2,3,and 4 will not be
retrieve.
But if we are using Var4 in the report, the object1,2,3,and 4 will be
retrieve properly.
Please let me know is it a by-design behavior, if yes please share points on itHi Amit,
Thank you for response, however i already had alook on that VIdeo and it tells us about the basic enabling of query stripping.
But my question is when we have a Variable in a report which is dependent on the other two variables it gives me #error so is it by design or not.
Regards,
Abhinav -
Attention!!-don't use OLE object in Reports
If you are planning to use or is currently using OLE objects in Reports-please don't use it as the object maynot reload in future and your report may not even open in Report Builder.I got this message when opening the report containing OLE object:
REP-4004: Error occurred while restoring OLE object
and it refused to open up crashing my days of work.
The pity is I can't open my report even to remove the OLE object.I know that is weird.I placed the object in the same directory-but in vain.Afterall, what's the logic of putting it in the same directory after embedding it?
-
How to use lexical parameter in report
i want to use lexical parameter in report and pass parameter from form how it is possible in detail
A.RHi,
typically you fill your lexical paramter in the after-paramform-trigger out of the values of your bind-parameters (giving end users directly control over lexical parameters might not be a good idea). Inside PL/SQL a lexical parameter is referenced like bind parameters with ":". In the query it's referenced via "&" and represents a part of the query.
A simple example.
- p_deptno as bind parameter
- p_where as lexical paramter
- end user choose value for p_deptno (10,20,... or nothing)
- Trigger: if :p_deptno is not null then
:p_where := 'WHERE deptno = :p_deptno'
else
:p_where := null;
end if;
- Query select ... from emp &p_where
Regards
Rainer -
To read all the database fields used in a Crystal report 10 file using Vb 6 Code
Hi
Iam in development of an Application in Visual basic which lists all the
database fields used in a particular report (crystal 10)
In simple i need to show all the checked fields in the database fields section in field explorer section of the crystal report file.
regards
venkateshGPlease re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly
-
Use a checkbox to hide/show (toggle) another field
I have a form I am creating in Adobe Acrobat X. The form will ultimately be used as a data entry interface on iPads. I need to keep the form very simple but there is a lot of technical information the end users may need to help fill out the forms. I would like to be able to have a button, checkbox or other object enable the user to display additional information.
I have played with making links to attached documents, using the article tool and finally trying to use a checkbox to drive the hidden/visible property of a text field. Admittedly, I am a horrific programmer so I need some spoon fed help.
My check box is called: GMR1_1_Details_Select
The text field is called: GMR1_1_Details
I have been trying this and that with JavaScript in both the Actions tab and Calculate tab and am unsuccessful.
Can anyone solve this puzzle for me? I want to code this into my form:
// so when the check box named "GMR1_1_Details_Select" is checked, my text box field ("GMR1_1_Details") is visible. If the user unchecks the box, it would be hidden. By default, the text box should be hidden and the checkbox shouldbe unchecked.
If GMR1_1_Details_Select = yes
Then GMR1_1_Details = visible
else
GMR1_1_Details = hidden
I have tried codes similar to:
if (event.target.value!="On") This.getfield(“GMR1_1_Details”).display = display.hidden;
and other code similar to:
Var GMR1_1 = this.getField(“GMR1_1_Details”);
If(GMR1_1==="yes");
This.getfield(“text10”).display = display.hidden;
else
This.getfield(“text10”).display = display.visible;
In both cases I am getting nothing. I have realized that I have at least 2 problems:
1) I don't know how to write the right code and,
2) I don't know where to put it.
Please and thank youYes, here is a link to the documentation: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.135.html
There are a number of examples that demonstrate various options. You can add a title, but to make the JavaScript warning go away the document would have to be certified and the user would have to trust it to execute JavaScript, or each user would have to install a JavaScript file in a particular location on their system. If this might be feasible for your situation, post again for more details.
If you want to get really fancy, it's possible to create custom dialogs that include things like images as well as text, and you have more control over the layout. This is one of the more complicated things in Acrobat JavaScript though, so you have to really want it if you plan on learning more. -
Can I put a SQL query into a bind variable and then use it to output report
Hi,
Can I put a SQL query into a bind variable and then use it to output report?
I want to create a report and an item "text area" (say P1_TEXT) which can let user to input a SQL query(they are all technical users and knows SQL very well). Then, I use a bind variable (that text area) to store the SQL statement. Then, I add a submit button and I want to use the following to output the report:
select * from (:P1_TEXT);
Do you think it is possible to do that? Any known limitations for APEX in this area?
Thanks a lot,
AngelaYou can, but make sure it's what you really want to do. Make sure you are VERY familiar with SQL Injection. Most people who know what it is, go out of their way to prevent SQL Injection. You're going out of your way to allow it.
You can try using &P1_TEXT. instead of bind variable syntax. Bind variables are one of the best ways to prevent SQL Injection, which is why it's not working for you.
Once again, I strongly urge you to consider the implications of your app, but this suggestion should get it working.
Tyler -
Hi,
We have a requirement to create a BI report based on plant maintenance report. The plant maintenance report is based on a ABAP program with complex logic. My question is i want create a Generic Datasource using Function module and can I include the logic(Abap Program) that is used for plant maintenance report in the function module? Please share your thoughts.
Thanks,
RaviHi,
Step1-Create a table structure which you need to create same as the fields you require in you data source.
Step 2-create a custom abap program and inside that call the Client abap program with the selections as required and save the result data in some table
Step 3-create infoset query.In the infoset query give your table structure name and program name which you developed.
Step4-create data source on top of that query
Maybe you are looking for
-
How to set up open&close posting period to process year-end at April
Hi FICO GURUs, I m a new student in FICO, here i have a question as following, ask for help, For the open period. If we need to clearing till April, how do we do for that? How to set up in open and close posting period? Any responses will be awarded.
-
MIGO Unable to store information without posting items.
MIGO The delivery note cannot be added and saved in the MIGO transaction without posting one of the items. I just want to store te delivery note and someone else is responsible for posting the items. How can I solve this problem? Regards, Jochen
-
Dear Experts How you are maintaining stock (Material) against job number(Sale order). Pls explain with configuration details Thanks Rajakumar.K
-
How to exceute a stored procedure thorugh sqlplus without using a file ?? I can use.. say d:\sqlplus user/pwd@db @file.sql... I dont want to keep a file.... the stored procedure is thr in db....
-
I have upgraded iphone from 4 to 5s inserted the sim followed the screen instructions BUT I have no service can you help?