Format the total value in the column of the graph table
Hello all,
I have a graph table and I need to format the total value in the column of the table.
I am trying to find my table bean with the code below but it's not working in the processRequest. Is there anything else that should be done?
// Get the graph
OAGraphTableBean graphBean = (OAGraphTableBean)webBean.findChildRecursive("MyGraph");
// Get the table
OATableBean tblBean = (OATableBean)graphBean.findChildRecursive("MyTable");
The tblBean is null in the processRequest. In the processFormRequest the tblBean is not null.
Thanks and Regards,
Andrea
Hi,
The code OAGraphTableBean graphBean = (OAGraphTableBean)webBean.findChildRecursive("MyTable"); does not work because in this case I am getting the table but casting to a graph.
The MyTable bean is a child of MyGraph.
When creating a graph bean we have the option to create a table as a child (select your graphTable region in the Structure pane, and choose New > tabularFormat - to create the table).
The table bean child I can get just in the processFormRequest, but the graph I can get in both processRequest and processFormRequest.
I need to get the table bean in the processRequest to format the total value column.
Do you know if is there anything else that should be done to format the total column?
Thanks and Regards,
Andrea
Similar Messages
-
How to fetch the junk values of a column and the column name in oracle
Hello,
Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..
Thanks in advance..Try this, I'm not sure if it'll help... and get some idea...
try to modify it as per your requirement -
select * from junk_vals;
1 ranit1
2# ranit2
3 ranit3
4$ ranit@4
5 ranit5
6 r^anit6
select 'ID', id, val from junk_vals
where regexp_like(id,'[^a-zA-Z0-9]')
UNION
select 'VALUE', id, val from junk_vals
where regexp_like(val,'[^a-zA-Z0-9]');
-- "Output :"
ID 2# ranit2
ID 4$ ranit@4
VALUE 4$ ranit@4
VALUE 6 r^anit6
NOTE - I've considered anything other than Alphabets and Numbers as a Junk Value
Edited by: ranit B on Jan 4, 2013 5:07 PM
-- o/p added -
Is it possible to get the total value for column and assign to other field
hi,
Is it possible to get the total value of particular column and assign that value to another field?
How to do this?
Thanks in advance,
SANAfridi,
My extended controller class code:
package xxhr.oracle.apps.per.selfservice.appraisals.webui;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
import oracle.apps.per.selfservice.appraisals.webui.OverviewPageCO;
import oracle.jbo.Row;
public class XXOverviewPageCO extends OverviewPageCO {
public XXOverviewPageCO() {
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
if(pageContext.getParameter("XXCalcAvgButton")!=null){
throw new OAException("welcome",OAException.INFORMATION);
//getSum(pageContext, webBean);
private String getSum(OAPageContext pageContext, OAWebBean webBean) {
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject ratvo = (OAViewObject)am.findViewObject("CompetenceElementsVO");
OAViewObject valuevo = (OAViewObject)am.findViewObject("PerRatingLevelsVO");
Integer Sum = new Integer("0");
int numofRows = ratvo.getRowCount();
for (int x = 0; x < numofRows; x++) {
Object Rating =
ratvo.getRowAtRangeIndex(x).getAttribute("ProficiencyLevelId");
if(Rating!=null) {
int numofRowsforvalue = valuevo.getRowCount();
for(int i=0;i<numofRowsforvalue;i++){
if(valuevo.getRowAtRangeIndex(i).getAttribute("RatingLevelId").equals(Rating)){
Object StepValue=valuevo.getRowAtRangeIndex(i).getAttribute("StepValue");
Sum = new Integer(StepValue.toString()) + Sum;
OAMessageStyledTextBean displayCompAvg=(OAMessageStyledTextBean)webBean.findChildRecursive("XXCompAvgText");
displayCompAvg.setValue(pageContext,Sum);
return null;
But it is not affecting in the page.
Can you please tell me what is the problem. -
Unable to read the total value.
Hi guys,
I am able to get the total for alv table column.. but i want to display the total value in some other text view field.
In order to do that... first i have to read the total value, and have to set the same to text view field,
total value is of type ( DATA: LV_AGGR_RULE TYPE REF TO CL_SALV_WD_AGGR_RULE. )
but my text view field attribute is of STRING TYPE.
So am getting conversion error. Pleas help me in this.
Regards
Farooq
Edited by: farooq basha on Jun 13, 2011 12:52 PMHi ,
Try to loop your internal table on the column "Amount" and make a sum for that particular column, u will get the required sum Amount..
Thanks
Aisurya -
How to Check the total value of a field
Hi,
I want to check the total value of a field (this total is obtain by using property of that field thru personalization).
that means , in a table 3 columns are there (col 1, col2 & col3). I personalized the total property as true for col3.
now i'm getting the total for that field.
I want to check that total whether it crossed 100 or not.
How to do this?
Thanks in advance,
SANHi San,
You can achieve by using OATotalRowBean, search for OATotalRowBean in this forum you should be able to get some sample code.
public class OATotalRowBean
extends TotalRowBean
implements OAWebBean, OAWebBeanConstants
A special row rendered at the bottom of a table which lets users see totals for columns which are designated for summing.
Note The total is calculated and displayed only for visible rows.
When you indicate that you want to total one or more columns, the OA Framework creates an OATotalRowBean and designates it as the columnFooter named child of the OATableBean. If the OATableBean is also configured to insert rows (so it has an "Add Another Row" button), then the total bean becomes an indexed child of the add table row bean (see OAAddTableRowBean), which the OA Framework in turn designates as the table's columnFooter object.
If you need to access the table's column footer object for any reason, call the OATableBean's getColumnFooter() method. If row insertions are enabled, this method returns an OAAddTableRowBean; otherwise it returns an OATableRowBean.
For detailed information about creating and working with tables, see OA Framework Developer Guide: Tables.
With regards,
Kali.
OSSi. -
Lines above and below the total values
Hi All,
This is for an invoice. I display line items and then the totals. I want to draw lines above and below the total values. i am able to underline the total values using the paragraph formats but that will give only lines below the values. how can I get the lines above and below the values in correct proportions? Please give me some ideas on how to do this.
Thank you,
Prathima.Prathima,
You should not be using ULINE and VLINE commands here. Instead you have to declare boxes.
/: BOX FRAME 10 TW
/: BOX XPOS '3.0' CM WIDTH 0 TW FRAME 10 TW
/: BOX XPOS '6.0' CM WIDTH 0 TW FRAME 10 TW
/: BOX XPOS '9.0' CM WIDTH 0 TW FRAME 10 TW
/: BOX XPOS '12.0' CM WIDTH 0 TW FRAME 10 TW
Using boxes is advantageous in a lot of ways as you can specify the x and y positions exactly.
Thanks
Aneesh. -
How find out the duplicate value from each columns.
I have below four columns,
How can i find out the duplicate value from each columns.
with All_files as (
select '1000' as INVOICE,'2000' AS DELIVERYNOTE,'3000' CANDELINVOICE,'4000' CANDELIVERYNOTE from dual union all
select '5000','6000','7000','8000' from dual union all
select '9000','1000','1100','1200' from dual union all
select '1200','3400','6700','8790' from dual union all
select '1000','2000','3000','9000' from dual union all
select '1230','2340','3450','4560' from dual
SELECT * FROM All_files
Output should be as per below.
1000 2000 3000 4000
9000 1000 1100 1200
1200 3400 6700 8790
1000 2000 3000 9000
Required to check uniqueness in cross columns.
Thanks.Try this (sorry about the formatting)...
WITH all_files AS (SELECT '1000' AS INVOICE,
'2000' AS DELIVERYNOTE,
'3000' CANDELINVOICE,
'4000' CANDELIVERYNOTE
FROM DUAL
UNION ALL
SELECT '5000',
'6000',
'7000',
'8000'
FROM DUAL
UNION ALL
SELECT '9000',
'1000',
'1100',
'1200'
FROM DUAL
UNION ALL
SELECT '1200',
'3400',
'6700',
'8790'
FROM DUAL
UNION ALL
SELECT '1000',
'2000',
'3000',
'9000'
FROM DUAL
UNION ALL
SELECT '1230',
'2340',
'3450',
'4560'
FROM DUAL),
t_base
AS (SELECT invoice
|| ','
|| deliverynote
|| ','
|| candelinvoice
|| ','
|| candeliverynote
str
FROM all_files),
t_str
AS (SELECT str || ',' AS str,
(LENGTH (str) - LENGTH (REPLACE (str, ','))) + 1
AS no_of_elements
FROM t_base),
t_n_rows
AS ( SELECT LEVEL AS i
FROM DUAL
CONNECT BY LEVEL <=
( SELECT SUM (no_of_elements) FROM t_str)),
t_build AS (SELECT t_str.str,
nt.i AS element_no,
INSTR (t_str.str,
DECODE (nt.i, 1, 0, 1),
DECODE (nt.i, 1, 1, nt.i - 1))
+ 1
AS start_pos,
INSTR (t_str.str,
1,
DECODE (nt.i, 1, 1, nt.i))
AS next_pos
FROM t_str
JOIN
t_n_rows nt
ON nt.i <= t_str.no_of_elements),
t_build2
AS (SELECT RTRIM (str, ',') AS original_string,
SUBSTR (str, start_pos, (next_pos - start_pos))
AS single_element,
element_no
FROM t_build),
t_build3
AS (SELECT single_element,
COUNT( * )
OVER (PARTITION BY single_element
ORDER BY single_element)
ele_count
FROM t_build2)
SELECT DISTINCT INVOICE,
DELIVERYNOTE,
CANDELINVOICE,
CANDELIVERYNOTE
FROM all_files, t_build3
WHERE ele_count > 1
AND ( INVOICE = single_element
OR DELIVERYNOTE = single_element
OR CANDELINVOICE = single_element
OR CANDELIVERYNOTE = single_element)I think this will be faster than the previous solution?
Cheers
Ben
Edited by: Munky on Feb 17, 2011 2:11 PM - "I think this will be faster than the previous solution?", nope - it's not :( -
How can I get the total "values" in a hashtable ?
i know that i can get the total values in a hashtable by hash.elements() method. It returns an
enumeration with all the values present in this hashtable. this is fine upto here.
Now the preoblem is:
According to what rule this enumeration will be returned. I mean..
If i added in key A with value a,
then key B with value b;
then key C with value c;
then key D with value d;
(They all are objects of type String)
now i call ... hash.elements(); Suppose it returns Enumeration enum;.
Now in what order they all are present in this hashtable.
Meaning is that if i move arond this enum in what sequence they all will be returned.
option A ) In the same order as they were inserted in hashtable.
option B ) According to LIFO;
option C) There is no fix rules , simply it return all the elements and u cannot judge that the first element in enum was really the first element inserted in the hashtable and the second element of enum was really the second element inserted in the hashtable.
What do u think..which option is correct ?
Ny idea will highly appreciated.
Thanks in advance.
Sanjeev Dhimanhi, i am again..
boss ! this is not true..u just change the order and or change the keys and something like ...
"Sanjeev", "hello"
"Dhiman", "hi"
"Technosys" ,"Services"
u will find that its not LIFO..really i was thinking before coding my project that option A is correct and with knowledge i wrote 3 - 4 classes but when i run the programm its starts throwing errors.
so, i posted this question. I think "apppu" is right.
I think , firstly hash is calculated for each value and that value is returned which can be received in a fastest way and hence not necessarily in LIFO and FIFO..
Thanks to u also as u gave ur precious time for me.
Once again.
Thank you very much.
Sanjeev Dhiman -
How can I reference the last value in a column?
How can I reference the last value in a column? For example, today I want the value of A1 to appear in another cell. Tomorrow, I will add a row and want to reference A2, next day A3, and so forth.
Now I got it:
=OFFSET(A1,COUNT(A)-1,0) -
T.Code for checking the total value of a material
Hi Experts,
Can anybody tel me the T.code for checking the total value of a material which is procured in a specified period?
Thanks in advance
ChannaRefer Tcode ME80FN click on Change Veiw & select Purchase Order History with this you can get PO-GRN-INVOICE Qty & Value details
Last button on Application tool Bar it is in line of filter, total etc icons
Also check below reports :
MC$G - PURCHIS: Material PurchVal Selection
MC$0 - PURCHIS: PurchGrp PurchVal Selection
MC$< - PURCHIS: MatGrp PurchVal Selection
MC$4 - PURCHIS: Vendor PurchVal Selection -
How to fix the value of first column in the JTable in java swing for every
Hi ,
I have a swing page that have table panel in which there is a table of size 7x4 now when I click on the perticulat row then that row data will displayin the table like that the selected row become the second column in the new table and the fist column of this table will remain constant for all the entry but the second column update according to the roe which is selected .How it is possible .
Thanks in Advace,
anuOne thing you can do is to prevent the user from editing that column and programatically supply the values of that column yourself.
JTable table = new JTable() {
public boolean isCellEditable(int row, int col) {
if(col == 0) {
return false;
return super.isCellEditable(row, col);
};This allows you to prevent the user from editing the column information so you can supply some sort of a default value for the column always
ICE -
How to figure out if the bottom 2 lines in each group has the same value in specific columns?
Hi, I need help to finish my project ASAP. My task is to figure out defects in this Loan_Status_Tbl.
When Current_Principal= 0, Loan_status should be populated from previous records. For example, when Loan_Nbr 00001's current_Principal=0, it's loan_status is not populated from it's 2010-12-30 record, and 00002 is good. I want to know which items are not
good, and report the results to engineer to modify the wrong record in DW.
ID LOAN_NBR CURRENT_PRINCIPAL LOAD_DT LOAN_STATUS
1 00001 1000 2010-12-5 APPROVED
2 00001 800 2010-12-30 APPROVED
3 00001 0 2011-3-1 NULL
4 00002 500 2012-5-1 APPROVED
5 00002 0 2012-6-12 APPROVEDHi,
If I understand correctly, you want to highlight the records that have incorrect Loan_status values.
To achieve this requirement, we can create a table with the table data, then add a column with correct Loan_status value in a report. Compare the Loan_status column and new column to find out the incorrect values, then highlight it. The following detail
steps are for your references:
Create a report in a SQL Server Reporting Services Project.
Create a dataset with the sample data.
Drag a Table with the dataset to design surface.
Add a group grouped by LOAN_NBR, then insert all the fields to the table.
Right-click the LOAN_STATUS column to add a new column with Right option, then insert the expression as below:
=iif(Fields!CURRENT_PRINCIPAL.Value="0",previous(Fields!LOAN_STATUS.Value),Fields!LOAN_STATUS.Value)
Click second row to change its BackgroundColor property as below, then the incorrect Loan_status value row will be highlighted:
=iif(Fields!LOAN_STATUS.Value=iif(Fields!CURRENT_PRINCIPAL.Value="0",previous(Fields!LOAN_STATUS.Value),Fields!LOAN_STATUS.Value),"Transparent","Red")
The following screenshot is for your reference:
Reference:
Create a Basic Table Report (SSRS Tutorial)
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to fetch the maximum values of 2 columns
Hi All,
I need to fetch the maximum value of 2 columns. For example I need to fetch the latest record for which i have to fetch the latest date and time. Date and time fields are 2 different columns. As of now am doing it the crude fetching the latest date records and then fetching the latest time record.
Is there any other smarter way to do it. The one am doing rite now is turning out to be very performance intensive at the moment for me. Also I could not apply max condition for two fields together.
Please guide.
Thanks,
NagrajHi Jaspreet,
Thanks for your response. But the problem am facing with this approach is I have to do this for n number of records in another internal table which is making it to cumbersome and affecting performance.
Please suggest is there any better way to do it.
Thanks,
Nagraj -
How to find the total value of the Production order
HI ,
I am developing one report in which , custumer have a req. to show the total value (in Dollar) of all open production order as well as the past production order ( not DELEvered & teco ) for the selected plant . for that i need BAPI or table name .
Regards
SatishHi,
For production order nos. - AUFK or AFKO
For production order status - JEST & to know the status eg REL etc, refer TJ02
For costs - COSS & COEP (Pass order nos. to the field OBJNR as OR followed by 12 digit order number)
Hope the above helps.
Regards,
Vivek -
How to restrict the duplicate values in lov column of VO based Adv Table
Hi Gurus,
I want to restrict the duplicate values at lov which is a colunm in an Adv Table.
If user enters duplicate values then first it should show an error msg that Duplicate values have been entered.
After the duplicate values have been removed, then the user can save all the values in the table.
My Adv Table is based on a VO.
The link how to restrict the duplicate values at form level
talks about Adv Table based on a EoVO, which doesnot work in my case.
My Approach,
I am iterating through RowSetIterator and committing through PROCEDURE.
I am able to avoid duplicate entry through a function checkRespId. (given below)
Below code is for iterating and committing.
public void saveline(String reqid,String userid)
System.out.println("RequestId/saveline"+reqid);
System.out.println("UserId/saveline"+userid);
OAViewObject vo = (OAViewObject)getRespLineVO1();
RespLineVORowImpl row = null;
int fetchedRowCount = vo.getFetchedRowCount();
RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
if (fetchedRowCount > 0)
deleteIter.setRangeStart(0);
deleteIter.setRangeSize(fetchedRowCount);
for (int i = 0; i < fetchedRowCount; i++)
System.out.println("Inside the for LOOP");
row = (RespLineVORowImpl)deleteIter.getRowAtRangeIndex(i);
String respoidid = row.getAttribute("ResponsibilityId")+"";
String respname = row.getAttribute("ResponsibilityName")+"";
String stdate = row.getAttribute("StartDate")+"";
String enddate = row.getAttribute("EndDate")+"";
String linestatus ="A";
if(userid!=null)
if(!(respoidid.equals("null")) && respoidid!=null)
String checkingrespid=null;
checkingrespid = checkRespId(userid,respoidid);+contains no if not duplicate and yes if its duplicate+
System.out.println("checkingrespid for Resp with ID :"+respoidid+"exists or not "+checkingrespid);
if(checkingrespid.equals("No"))
String message, result = null;
Connection txn = getOADBTransaction().getJdbcConnection();
try
calling PROC ...
catch(Exception e)
message = "Error in Inserting into line" + e;
throw new OAException(message, OAException.ERROR);
else
throw new OAException("You have entered duplicate no. of values", OAException.ERROR);
else
System.out.println("respoidid is null");
break;
deleteIter.closeRowSetIterator();
public String checkRespId(String userid,String respoidid)
String createRow="No";
OAViewObject vo = (OAViewObject)findViewObject("CheckRespVO1");
if (vo != null)
vo.setWhereClauseParams(null);
vo.setWhereClauseParam(0, userid);
vo.setWhereClauseParam(1, respoidid);
vo.executeQuery();
System.out.println("ROW COUNT IS "+vo.getRowCount());
if(vo.getRowCount()>0)
createRow="Yes";
else
createRow="No";
return createRow;
Problem:
I remove the duplicate entries and click on save and get this error.
Unable to perform transaction on the record. \nCause: The record contains stale data. The record has been modified by another user.
\nAction: Cancel the transaction and re-query the record to get the new data.
Thanks,
SombitHi Anil,
I am trying out your code but stuck in inserting the rows
using your code in URL: http://oracleanil.blogspot.com/2010/09/oaf-passing-table-type-object-to-oracle.html
I am always getting the same exception i.e COde blast in when I run.
My modified code is:
String[] as = null;
Number[] vNumber = null;
Number[] vNumberrespid = null;
Number reqidnumber = null;
reqidnumber = new Number(Integer.parseInt(reqid));
Connection txn = getOADBTransaction().getJdbcConnection();
String mCreateSearchRequestStatement = null;
OAViewObject vo = (OAViewObject)findViewObject("RespLineVO1");
int j = vo.getFetchedRowCount();
try
System.out.println("abouce try");
vo.reset();
if (vo.getFetchedRowCount() > 0)
System.out.println(String.valueOf("Fetched row count ").concat(String.valueOf(vo.getFetchedRowCount())));
int i = 0;
as = new String[j];
vNumber = new Number[j];
vNumberrespid = new Number[j];
while (vo.hasNext())
vo.next();
System.out.println(String.valueOf("Inisde the do while loop").concat(String.valueOf(i)));
vNumber[i] = (reqidnumber);
vNumberrespid = ((Number)vo.getCurrentRow().getAttribute("ResponsibilityId"));
as[i] = String.valueOf(vo.getCurrentRow().getAttribute("ResponsibilityName")).concat(String.valueOf(""));
System.out.println("Request ID "+reqidnumber[i]);//getting null even there is some value selected
System.out.println("ResponsibilityId "+vNumberrespid[i]);//getting null even there is some value selected
System.out.println("Resp Name "+as[i] );//getting null even there is some value selected
i++;
CallableStatement cs = txn.prepareCall("{call XX_PassTableType.XX_PassTableType_prc(:1, :2,:3)}");
ARRAY array = new ARRAY(new ArrayDescriptor("APPS.JTF_NUMBER_TABLE", txn), txn, vNumber);
ARRAY arraynew = new ARRAY(new ArrayDescriptor("APPS.JTF_NUMBER_TABLE", txn), txn, vNumberrespid);
ARRAY array1 = new ARRAY(new ArrayDescriptor("APPS.JTF_VARCHAR2_TABLE_100", txn), txn, as);
cs.setArray(1, array);
cs.setArray(2, arraynew);
cs.setArray(3, array1);
cs.registerOutParameter(3, 2003, "JTF_VARCHAR2_TABLE_100");
cs.execute();
ARRAY error = null;
error = (ARRAY)cs.getArray(2);
if ((error != null) && (error.length() > 0))
System.out.println(String.valueOf("Error is ").concat(String.valueOf(error.getArray())));
String[] retError = new String[j];
retError = (String[])error.getArray();
System.out.println(String.valueOf("Error in saving data").concat(String.valueOf(retError[0])));
cs.close();
catch (Exception exception)
throw new OAException("code blast", OAException.ERROR);
Thanks,
Sombit
Maybe you are looking for
-
Change GL Account from PL Item to Balasheet Item
Hi , one of our user Stock GL Account was created as a PL Item and in this GL Accounts Tranaction also posted . Now i want change from PL Item to Balancesheet Item and i dont want transfer this amount to another GL Account how i can change the Exitin
-
Anyone use hypersonic 2 and logic express 9?
anyone use hypersonic 2 and logic express 9? Message was edited by: Kajun Muzik
-
Dear Expert, I have one company code (A) and want to make new company codes (B) and (C). Is it possible to extend all G/L account in company code (A) to company code (B) and (C) ? Is it possible to use same Customer Master, Vendor Master, Chart Of Ac
-
IDOC to WS Synchronous Scenario Without BPM
Hi Experts, I am dealing with Idoc to WS synchronous scenario. Can this be done without BPM?? ALEAUD can make IDOC to handle WS response?? Please suggest. Regards, Sushama
-
Every time I open up Photoshop CC it tells me that my Graphic Card is out of date. How do I fix this? I'm on a macbook pro purchase in 2011.