How to Output Totals to one Row?
Post Author: robertr
CA Forum: General
Hi - I have a giant report that contains basic info such as name, employee id, check date, check hours and check earnings. The problem is that I need only the totals for each employee and not the entire check earnings for each date. Can someone please advise on how I can create a report with the output I would like. Here is a sample of the data that I would like to summarize:
Pay Grp
EMPID
Name
Title
F/P
Status
Chk Date
ERNCD
EARNINGS
HOURS
YOU
123456
Doe, John
Accounting Assistant
F
A
2/29/2008
HOL
131.84
8.00
YOU
123456
Doe, John
Accounting Assistant
F
A
2/29/2008
SIK
329.60
20.00
YOU
123456
Doe, John
Accounting Assistant
F
A
2/29/2008
972.32
59.00
YOU
4235
Young, Neil
Booker
F
A
2/29/2008
5,008.33
87.00
YOU
99999
Allen,Daniel J
Director
F
A
2/29/2008
3,750.00
87.00
YOU
88888
Allen,Jeanine
Manager
F
A
2/29/2008
2,500.00
87.00
WYL
565656
Allen,Larita
Sales and Service Representati
F
A
2/29/2008
RTA
400.00
40.00
WYL
565656
Allen,Larita
Sales and Service Representati
F
A
2/29/2008
870.00
87.00
PREFERRED OUTPUT - SUMMARIZED - YOU CAN SEE THAT THE HOURS AND EARNINGS HAVE BEEN TOTALED
Pay Grp
EMPID
Name
Title
F/P
Status
EARNINGS
HOURS
YOU
123456
Doe, John
Accounting Assistant
F
A
1,433.76
87.00
YOU
4235
Young, Neil
Booker
F
A
5,008.33
87.00
YOU
99999
Allen,Daniel J
Director
F
A
3,750.00
87.00
YOU
88888
Allen,Jeanine
Manager
F
A
2,500.00
87.00
WYL
565656
Allen,Larita
Sales and Service Representati
F
A
1,270.00
127.00
Post Author: SKodidine
CA Forum: General
Easy enough at first glance. I am assuming that each employee can only belong to one pay group.
Group on EmpID
Suppress Group Header and Detail Section
Place the fields Pay Group, EmpID, Name, Title, F/P and Status on the group footer
Create a running total for the field Earnings and choose SUM for type of summary, Evaluate for each record and RESET on change of group and choose the EmpID group you created in step 1.
Repeat step 4 but this time choose the field HOURS.
Place both running totals in the group footer.
The report should now show only summary totals. This is the simplest scenario. If one employee can belong to more than one pay group or status etc, then you will have to group by those fields and perform steps 3 u2013 6 on the innermost grouping.
Similar Messages
-
How to select more than one row in a JTable swing adf adf?
how to select more than one row in a JTable swing adf adf?
// Allow selection to span one contiguous set of rows, visible columns, or block of cells
table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
// Allow multiple selections of rows, visible columns, or cell blocks
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); -
How save data from the one row of db to the one cell of excel sheet
hi
how to save data from one row of db to the one cell of excel sheet and so on..............hi,
see this link
http://poi.apache.org/hssf/quick-guide.html
Regards,
Ram -
How to insert more than one row in an Oracle table in one go
Hi All,
I am working on a file-XI(BPM)-Oracle scenario.
I am sending an xml file to XI via a file adapter. On the receiver end i am using a jdbc adapter to insert the row in the database. There is a transformation step within the BPM which is converting the file to a format understood by the JDBC adapter.
The problem i am facing is that, even if my input xml file contains more than one recordset, only one row is created in the database with the first recordset.
How can i insert all the other recordsets in the database at the same time.
Pls guide
Thanks in advance.
Regards
NeetuHi,
As asked by Bhavesh, i set the occurence of the STATEMENT tab 1 to UB. But still only one row is getting updated in the database at a time.
As asked by Udo, i even tried the same by changing the occrence of ACCESS tab 1 to UB. But still same thing happened.
Can there be some other problem.
The transformation is being dane in the BPM.
As seen in SXMB_MONI, the input xml to the BPM has two RECORDSET tags but the output generated xml in the format understood by jdbc adapter has a single STATEMENT tag.
The two formats are given below
<b>Input:</b>
<?xml version="1.0" encoding="utf-8"?>
<ns:MT_Test_File xmlns:ns="http://namespace-EmpNumberGen">
<EmpGenRecord>
<APPLICANT_NO>20</APPLICANT_NO>
<FIRST_NAME>abc</FIRST_NAME>
<LAST_NAME>xyz</LAST_NAME>
<FUNCTION>ADMIN</FUNCTION>
<DESIGNATION>ZA</DESIGNATION>
<RESPONSIBILITY_LEVEL>dd</RESPONSIBILITY_LEVEL>
<RECRUITMENT_TYPE>dd</RECRUITMENT_TYPE>
<EMPLOYEE_TYPE>p</EMPLOYEE_TYPE>
<STATUS>A</STATUS>
<***>M</***>
</EmpGenRecord>
<EmpGenRecord>
<APPLICANT_NO>14</APPLICANT_NO>
<FIRST_NAME>abc</FIRST_NAME>
<LAST_NAME>xyz</LAST_NAME>
<FUNCTION>ADMIN</FUNCTION>
<DESIGNATION>ZA</DESIGNATION>
<RESPONSIBILITY_LEVEL>dd</RESPONSIBILITY_LEVEL>
<RECRUITMENT_TYPE>dd</RECRUITMENT_TYPE>
<EMPLOYEE_TYPE>p</EMPLOYEE_TYPE>
<STATUS>A</STATUS>
<***>M</***>
</EmpGenRecord>
</ns:MT_Test_File>
<b>Output</b>
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Emp_No_Generation xmlns:ns0="http://namespace-EmpNumberGen">
<Statement>
<SAP_EMPGEN action="INSERT">
<access>
<APPLICANT_NO>20</APPLICANT_NO>
<FIRST_NAME>abc</FIRST_NAME>
<LAST_NAME>xyz</LAST_NAME>
<FUNCTION>ADMIN</FUNCTION>
<DESIGNATION>ZA</DESIGNATION>
<RESPONSIBILITY_LEVEL>dd</RESPONSIBILITY_LEVEL>
<RECRUITMENT_TYPE>dd</RECRUITMENT_TYPE>
<EMPLOYEE_TYPE>p</EMPLOYEE_TYPE>
<STATUS>A</STATUS>
<***>M</***>
</access>
</SAP_EMPGEN>
</Statement>
</ns0:MT_Emp_No_Generation>
This is a bit urgent.
Pls help
Regards
Neetu -
Select statement problem. how to get data in one row
SELECT
razm.datum_sklenitve,
razm.datum_prenehanja,
FROM
zket_zaposlenci zap,
zket_delovna_razmerja razm,
zket_delovne_razporeditve razp,
zket_sistemizacije_dm sistdm,
zket_organizacijske_enote oe,
zket_delovna_mesta delm
WHERE
zap.iid_zaposlenca = razm.iid_zaposlenca and
razm.iid_delovno_razmerje = razp.iid_delovno_razmerje and
sistdm.iid_sistemizacija_dm(+) = razp.iid_sistemizacija_dm and
nvl(sistdm.iid_organizacijske_enote, razp.iid_organizacijske_enote) = oe.iid_organizacijske_enote and
sistdm.iid_delovno_mesto = delm.iid_delovno_mesto and
razm.datum_sklenitve <= to_date('31.12.'||:v_datum, 'dd.mm.yyyy') and
nvl(razm.datum_prenehanja, to_date('31.12.'||:v_datum, 'dd.mm.yyyy')) >= to_date('01.01.'||:v_datum, 'dd.mm.yyyy') and
razp.datum_nastopa_dela <= to_date('31.12.'||:v_datum, 'dd.mm.yyyy') and
nvl(razp.datum_prenehanja_dela, to_date('31.12.'||:v_datum, 'dd.mm.yyyy')) >= to_date('01.01.'||:v_datum, 'dd.mm.yyyy') and
zkep_splosno.zkep_hierarh_oe_n(nvl(sistdm.iid_organizacijske_enote, razp.iid_organizacijske_enote), :v_oe, to_date('31.12.'||:v_datum, 'dd.mm.yyyy')) = 1 and
to_char(zkep_splosno.zkep_vrni_prvi_dr(razm.iid_delovno_razmerje, to_date('31.12.'||:v_datum, 'dd.mm.yyyy')), 'yyyy') = :v_datum
and zap.iid_zaposlenca = 1093507
order by razm.datum_sklenitve DESC
return this rows:
datum_sklenitve datum_prenehanja
1: 01.10.2010 00:00:00 | 31.12.2010 00:00:00
2: 01.10.2010 00:00:00 | 31.12.2010 00:00:00
3: 01.04.2010 00:00:00 | 31.08.2010 00:00:00
4: 01.02.2010 00:00:00 | 31.02.2010 00:00:00
how can i get in one select just this result.
1: : 01.10.2010 00:00:00 | 31.08.2010 00:00:00 (first of A and then the next one of B which is not the same as top of B)
I try everything but i do not know how. If anyone know how to do this.
regards,
MBSimma wrote:
But the above is not documented.Not only that, but it's string aggregation which isn't meeting the OP's requirements.
Though you could be easily forgiven as the OP hasn't clearly stated the logic behind the requirements.
It could be something like wrapping the original SQL with something like the following...
SQL> ed
Wrote file afiedt.buf
1 with t as (select date '2010-10-01' as ds, date '2010-12-31' as dp from dual union all
2 select date '2010-10-01', date '2010-12-31' from dual union all
3 select date '2010-04-01', date '2010-08-31' from dual union all
4 select date '2010-02-01', date '2010-02-28' from dual)
5 --
6 -- END OF TEST DATA
7 --
8 select max(case when rn = 1 then ds else null end) as ds
9 ,max(case when rn = 2 then dp else null end) as dp
10 from (
11 select ds, dp, row_number() over (order by ds desc nulls last) rn
12 from (
13 select case when lag(ds) over (order by ds desc) = ds and lag(dp) over (order by ds desc) = dp then null else ds end as ds
14 ,case when lag(ds) over (order by ds desc) = ds and lag(dp) over (order by ds desc) = dp then null else dp end as dp
15 from t
16 order by t.ds
17 )
18* )
SQL> /
DS DP
01/10/2010 00:00:00 31/08/2010 00:00:00
SQL>but who knows? -
How do I make a one row table across several pages?
Hi,
I would like to create a one row two columns table, but to have this table with text flow on several pages.
But I don't know how to do this. If I enter many lines of text, the table will not go on next page, and the extra lines are lost somewhere in the void.
I can do this in NeoOffice though, and in MS Office too.
ThanksHello Julien,
yes, I believe I can help your brother with a solution. First set your document to a two column layout in the layout inspector in the "Layout" tab panel. It's good to see the layout guides and hidden signs for better layout creation, so make them visible (menus: "View/Show Layout" and "View/Show Invisibles". To have an appropriate distance between the the rows of text, set the number field "After" at the bottom of the same panel to a value so the distance is ca. 1,5 line spacing or whatever your brother like to have.
Now write the text you want to have in the left column. To place the translation in the right column, choose the menu item "Insert/Column Break". Now the text cursor jumps into the right column and you can write the translation. To type the new text in the left column, choose the menu item "Insert/Layout Break". The text cursor jumps from the end of the right text under the text in the left column, and you can go on.
I know that the use of the menu items is not good for the workflow, so do the following:
Open the Sytem Preferences and choose the panel "Keyboard & Mouse". There click the tab button "Keyboard Shortcuts". Press the "+" button at the bottom of the list field. In the appearing sheed select the Pages app in the pull-down menu "Application:". If you can't find it there, use the last menu item "Other..." to search for it. Now type the EXACT menu item title in the text field "Menu Title:". Here it is "Column Break". Than activate the field "Keyboard Shortcut" and press the key combo you want to have for this function like "optionshiftc" or whatever. Press the "Add" button and repeat this steps for the menu item "Layout Break".
Close the System Preferences and start Pages. Now you can use the key combos for the break insertions.
I hope whith this your brother gets the document he wants to have. But if there are more questions, feel free to post them here. -
Outputing Total Numbers of Rows Returned in query using a CTE
The query below is not being parsed by SQL Server and I can understand that the column name needs to be aliased which I have equally done. The idea behind the query is to output the count of rows using a CTE.
USE AdventureWorks2012
DECLARE @TotalRows INT = 0 -- OUTPUT
WITH Invoice AS (
SELECT @TotalRows = COUNT(CustomerID)
, SalesOrderID
, CustomerID
, OrderDate
FROM Sales.SalesOrderHeader
WHERE OrderDate = '2007/07/01'
GROUP BY SalesOrderID
, CustomerID
, OrderDate
SELECT c.CustomerID
, Invoice.SalesOrderID
, Invoice.OrderDate
FROM Sales.Customer AS c
INNER JOIN Invoice
ON c.CustomerID = Invoice.CustomerID
ORDER BY Invoice.OrderDate DESC;
How do I modify the query to produce the desired retult?
Thank you.
ZionliteZionlite,
check this>?
DECLARE @TotalRows INT = 0 -- OUTPUT
;WITH Invoice AS
SELECT COUNT(CustomerID) over()
as customer_count
, SalesOrderID
, CustomerID
, OrderDate
FROM Sales.SalesOrderHeader
WHERE OrderDate = '2001/07/01'
GROUP BY SalesOrderID
, CustomerID
, OrderDate
SELECT c.CustomerID
, Invoice.SalesOrderID
, Invoice.OrderDate
, customer_count
FROM Invoice
LEFT JOIN Sales.Customer AS c
ON c.CustomerID = Invoice.CustomerID
ORDER BY Invoice.OrderDate DESC;
So the above query, gives you the rows_count as a seprate column itself. Now you may use this to update the variable by pushing the results to a temp table and selecting the column value.
Method 2:
Another method can be using the rowcount method..
DECLARE @TotalRows INT = 0 -- OUTPUT
;WITH Invoice AS
SELECT SalesOrderID
, CustomerID
, OrderDate
FROM Sales.SalesOrderHeader
WHERE OrderDate = '2001/07/01'
GROUP BY SalesOrderID
, CustomerID
, OrderDate
SELECT c.CustomerID
, Invoice.SalesOrderID
, Invoice.OrderDate
FROM Invoice
LEFT JOIN Sales.Customer AS c
ON c.CustomerID = Invoice.CustomerID
ORDER BY Invoice.OrderDate DESC;
select @totalrows=@@rowcount
select @TotalRows
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'> -
How to retrive more than one row value from table
hi,
I had create one table if i entered value in more than one row, the second row override the first row value and while printing it in flat file i am getting the second value entered twice.
i created one context for each column.
plz provide me a solution..........
very urgent..........
Regards,
KiruthikaHi,
Create seperate element for each row and then set values.
for(int i=0;i<4;i++)
IPrivate<view name>.I<node name>Element element = wdContext.node<node name>().create<node name>Element();
wdContext.node<node name>().addElement(element);
element.set<Att>();
to retrive:
int s=wdContext.node<node name>.size();
for(int j=0;j<s;J++){
wdcontext.node<nodename>.getnodeelementAt(j).getAttribute();
Check this link about tables
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4
Regards,
Vijayakhanna Raman -
How to set total number of rows of table control
Hi All,
I want to set the total number of rows of table control. I don't want to display the blank rows in table.
Regards,
ShrinivasNeed some fine tuning regarding the scrollbar height but it's a start
Unless this isn't what you asked for
Small number of rows
Large number of rows
Attachments:
PlayingWithTable.vi 17 KB -
How to add more than one rows to form, without submitting to database
Hi!
I have an updatable report similar to this http://htmldb.oracle.com/pls/otn/f?p=31517:163:3149788972931514::NO
Now, as much as I'm aware the standard thing is that when I add a row, put in data and then add a nother row, previous data is commited and another row is added.
I, on the other hand, would like to add as much rows as I need and populate them with data and then submitt all the changes in the end. So the user nows, that when he SAVES data it's submited to db, not in between.
My form is not standard, it uses SQL, and APEX_ITEM, I even have more updatable reports on one page etc, so I presume, processes like AddRowToTabularForm don't come handy.
Thanx for any suggestions,
N.user10824271 wrote:
I, on the other hand, would like to add as much rows as I need and populate them with data and then submitt all the changes in the end. So the user nows, that when he SAVES data it's submited to db, not in between.So you would have a select list for the number of rows?
Add that X(select list) number of rows, populate rows, then insert?
Is that how you vision it?
Did you try this? [Tabular Form Add Rows Using Item | http://htmldb.oracle.com/pls/otn/f?p=31517:209:3291656615866862:ADD:NO:::]
Edited by: MHolley on Mar 11, 2009 8:53 AM -
How to calculate total in multi-row block
How can I calculate and display the total amount in a multi-row
block that records are not yet save into database?
nullKanekan (guest) wrote:
: How can I calculate and display the total amount in a multi-
row
: block that records are not yet save into database?
Hi,
I worked with similar type of requirement. If you are
working with Forms5.0 there is a new property of formula/summary
in property palette of text item. In the same block or in
control block create non database item( It's non base table item
in forms4.5). In it's property palette give the data type as
number and set the source item name and set summary property.(
opetions are max,min,sum etc available). This value will change
when you navigate from the source item( I mean after validation).
I think this is informative.
Nag
null -
How to get total number of rows return by query
hi all
i am using forms 6i with oracle 10G in windows environment....
i have a tabular form now i want to know that how many rows return by the query...like when user click on enter query and then give any search criteria and then execute query..it displays the records but i want to count the records that how many rows are return.............
hope you understant what i mean
Thanks in advance
RegardsU can use
"Select count(*) from <table> where <condition>"
<condition> is the where clause being used during "Execute Query"
this will give u the no of records in query.
And second option is to take a summary column. whose function is set "COUNT" and
"Summarized item" should contain a column that will never be blank. After execute query this column will give u no of records in block.
Regards.... -
How can I color just one row in a table?
Hello,
I'm implementing cut/copy/paste and I want that when I perform cut the row color will be pale/ghost than the regular selectionRow background. And I want this pale color to stay for this row regardless if I select now other rows. I need it for JTable, JTree & JList. So my question is how can I color a row in those components (permanently - till I release it)
Thanks
Bnaya.Hi,
for a JTable I would suggest the following:
1.in the body of the class
int ghostrow = -1;
Color ghostColor = Color.lightGray; // for example2. overwrite the prepareRenderer-method this way
public Component prepareRenderer(TableCellRenderer render,int row, int column) {
Component c = super.prepareRenderer(renderer,row,column);
if (row==ghostrow) c.setBackground(ghostColor);
return c;
}3. add a method in your JTable subclass for setting of the ghostrow like this, in order to force the JTable to update its display after setting ghostrow
public void setGhostRow(int row) {
TableModel tm = getModel();
int currow = tm.getRowCount();
int oldrow = ghostrow;
ghostrow = -1;
if (row<currow) ghostrow = row;
// next 2 rows in normal mode displayed, because it will not print the greater than symbol correctif ((oldrow>-1) && (oldrow<currow)) tableChanged(new TableModelEvent(tm,oldrow));
if ((ghostrow>-1) && (ghostrow<currow)) tableChanged(new TableModelEvent(tm,ghostrow));
For the other classes, you want this effect to happen in, try to find a similar method, that is central and do it in a similar way there.
greetings Marsian -
How to get the sum total of just one row in the dashboard
How do I get the sum total of one row in the compound layer results. This is 11g
Does anyone know?
may be sales, I need the total at the bottom of the row..
thx
ChuckI fnd the answer,
in the table view, click edit then nxt to the columns and measures there is total sum icon. Click that, and choose after -
How can I have one row for each object?
Post Author: farnaz
CA Forum: WebIntelligence Reporting
I have 3 objcts that one of them is ID and second one is internal code and the third one is quantity.There is more than one value for each ID (becouse of internal code).I want to create a report based on ID and quantity (not based on internal code).I make a break on ID but the result shows me more than one row for each ID.so how can i have just one row for each ID?
another question:
how can I post screen shot of the results to my messag in forum?Post Author: jsanzone
CA Forum: WebIntelligence Reporting
farnaz:
Have you tried to omit "internal code" from your grid? In normal circumstances, if you have "ID" and "Quantity" on the grid, then WebI will on its own summarize Quantity based on ID, however, this is provided that Quantity has been set up as a measure (or metric). The quickest way to tell if Quantity is a metric or not is to observe the color of its icon when you look at it in the data panel. If it is a purple (or sometimes appears as pink or fuscia) dot, then it's a measure, but if it is a blue box then it is a dimension. If you need Quantity as a measure then this will have to be modified at the universe (make it look like "sum(Quantity)" in the select phase of the object, and insure the object is defined as a number....
Maybe you are looking for
-
Need simple class for communicating with Solaris account
Hey, gang. After over a week of searching this forum and the Web for a solution, I'm stuck. I hope someone here can help. I've got a Java application intended to run on both Windows and Solaris systems that needs to perform the following automated op
-
Cannot view history of direct access users connecting to Forefront UAG
Hi, I'm trying to get a list of the users that have been connecting through UAG Direct Access for the past month. I've tried using the methods shown in the technet articles about monitoring of UAG Direct Access either using Powershell or the TMG even
-
I have problems using the volume and brightness keys on my keyboard. I've been using these shortcuts on my keyboards without pressing fn before. Nonetheless, all these keys didn't work all of a sudden, even if I try to press fn+f1/f2/f10/f11/f12. I t
-
Hi, for someone who need to translate 'Actions' button of Interactive Report: APEXIR_ACTIONS message is missed in Table 15-4 Interactive Report Messages Requiring Translation of Application Express Application Builder User's Guide Release 4.0
-
I have two nfs shares mounted on bootup, "10.0.0.118:/warehouse" and "10.0.0.118:/lataukset". However when I use df, it always displays something like this: udev 10M 0 10M 0% /dev run 10M 260K 9,8M 3% /run /dev/sda1 30G 5,7G 23G 21% / 10.0.0.118:/war