Calculate totals for multiple columns
I want to add totals for the two columns in a table and a total end with these two subtotals. I can not know how to do this and how to reference the rows and cells. Can someone please? Thank you. Deepa
Give a name for each line of the footer... (For ex: FotterRow1, FooterRow2)...
Then your code will work without a lot of complications.
Sum (FooterRow1.TotalA1 + FooterRow2.TotalA2)
Thank you
Srini
Tags: Adobe LiveCycle
Similar Questions
-
How the page break to each Department and calculate totals for Department
I have a stored procedure that queries our sql database and returns the name of the employee, their Department, and a few other calculations. I use CFDocument to create a table and view the results. Here's the code that does this (see below) what I have to do is find a way to create a page break after that I have show a total for each column in each Department. My questions are so
1. How can I insert a page break after the end of each service
2. just above the page break, how to calculate the totals for the Department and display them?
< cfdocument format = "pdf" >
< table width = "650" border = "1" >
< cfoutput query = "getResults" >
< b >
< td > #EmpName # < table >
< td > #Dept # < table >
< td > #JobType # < table >
< td > #NonBill # < table >
< td > #NonBillMeter # < table >
< td > #NumberFormat ((NonBillPercent*100),.00) # < table >
< td > #Bill # < table >
< td > #BillMeter # < table >
< td > #NumberFormat ((BillPercent*100),.00) # < table >
< /tr >
< / cfoutput >
< /table >
< / cfdocument >If I remember correctly, the tag you want is cfdocumentitem. Also, you want to check the attribute of cfoutput group.
The details are in the cfml reference manual. If you do not have one, has the internet.
-
Hallo,
I have a VO with numeric columns. I dragged the VO to UI to create an af:table.
I would like to know if ADF allows you to easily add a footer to the af: table that automatically show the total of each digital line.
This is to avoid creating a just another VO only to calculate and show the totals.
Thank you
Federico
Why so complicated?
Groovy is your friend here. Cech Tech Blog of Rohan Walia: ADF - Groovy for a Total of a column in a Table amount or do you it directly in the DB using Analytics functionms as shown here Andrejus Baranovskis Blog: Analytic Functions Oracle for Total and averaging in British Colombia ADF
Timo
-
Is it possible to insert totals for all columns in both interactive rep
Hi, I have an interactive report with 150 columns. Is it possible that I can format all columns at once using this format 999G999G999G999G999G999G990 (it takes a lot of time for formatting each column individually).
Thanks in advance
Published by: robik on May 29, 2012 08:36
Published by: robik on May 29, 2012 08:37I guess you have to go
Actions > Format > Aggregate > Function (Sum) > column (column1)
....Repeat for all columns, I guess, don't FORGET not to SAVE THE REPORT AT THE END :)
-
Outer joins for multiple columns
I have a data model that is simple, consisting of two dimension tables and one fact table. The fact table contains two columns of dimension and the column of a fact.
The dimensions are time and channel (from a Global schema). The dimension in the fact table columns are months and the track, which are the lowest in their respective dimensions. The column is for sale.
Not all combinations of time and channel data available, because our data goes back to 1998, but we don't sell through the Internet channel until 2001.
A simple request for monthly responses, channels, and sales returns just what you would expect - only the lines that actually have data in the fact table.
I would like to see all THE combinations of month and channel, regardless of whether or not there is a line in the fact table. I was under the impression that the definition of the join would type Left Outer in the complex join in the model diagram of Business happening. I did, as well affecting the Left Outer relations. The resulting SQL code looks like this:
Select T68. MONTHS in the c1 form,
T50. CHANNEL C2,
sum (T514. Turnover) in c3,.
T68. MONTH_END_DATE as c4
Of
T68 BI_D_TIME left (outer join
Left outer join BI_D_CHANNEL T50
BI_F_SALES T514 on T50. CHANNEL = T514. CHANNEL) on T68. MONTH = T514. MONTH
Group of T50. CHANNEL, T68. MONTHS, T68. MONTH_END_DATE
order of c4, c2
Unfortunately, that SQL is not what I want it to do. It returns the same results as above - namely, only the lines that exist in the fact table. I confirmed that by running the code in SQL Developer. It returns one row for each month, but it returns a line for each combination of months and channel.
For example, in Jan98, I get a line for the channel catalog, but not for the Internet or directly. Dec05, I get a line with Dec05 as month, NULL as the canal and of course NULL as sales. What I'd like TO see for each month is three lines, each line containing one of the three values of channel, if this month/channel combination had no sale or not.
Is it possible to change the repository to accomplish what I want to do?Check here how you can make densification on an environment of ROLAP
http://gerardnico.com/wiki/dat/OBIEE/bi_server/design/obiee_densificationSee you soon
Nico -
Calculate count of multiple columns
Hi experts,
I want to get the 4 column count
Thanks in advancecreate table test (id number,col1 number, col2 number,col3 number,col4 number ); insert into test (id,col1,col2,col3,col4) values (1,0,0,0,0); insert into test (id,col1,col2,col3,col4) values (2,0,0,0,5555); insert into test (id,col1,col2,col3,col4) values (3,22,0,0,5555); insert into test (id,col1,col2,col3,col4) values (4,0,0,0,5555); insert into test (id,col1,col2,col3,col4) values (5,22,111,33333,5555); insert into test (id,col1,col2,col3,col4) values (6,22,0,33333,5555); My output looks like: id count_col 1 0 2 1 3 2 4 1 5 4 6 3
select id, abs(sign(nvl(col1,0))) + abs(sign(nvl(col2,0))) + abs(sign(nvl(col3,0))) + abs(sign(nvl(col4,0))) count_col from test order by id / ID COUNT_COL ---------- ---------- 1 0 2 1 3 2 4 1 5 4 6 3 6 rows selected. SQL>
SY.
-
CSS3 multiple columns and Internet Exploder
I have developed a web page that needs a two column layout and has decided to use CSS3 to describe the columns: very simple:
{.twocol}
border-style: solid;
border width: 7px;
border-color: #0476ac;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
-moz-column-count: 2;
-moz-column-gap: 20px;
-webkit-column-count: 2;
-webkit-column-gap: 20px;
number of columns: 2;
column interval: 20px;
padding: 10px;
height: 300px;
}
CSS bold described the two-column layout that I want.
Looked in Internet Exploiter version 9 and it failed. And, since the text was missing I did the 'old skool' method:
{.colLeft}
Width: 410px;
}
{.colRight}
Width: 410px;
float: right;
}
Then in HTML:
< section class = "twocol" >
< div class = "colRight" >
< p > right column of things comes here < /p >
< / div >
< div class = "colLeft" >
Insert here the stuff left column < p > < /p >
< / div >
< / section >
I have commented things in "BOLD" in my style sheet.
Here's my question:
Since I'm on the HTML5 Shiv, shouldn't that have created the support for multiple columns in CSS3 declarations or is it simply too complex?
HTML5 Shiv, as its name suggests, is strictly for the support of HTML5 tags in pre - IE9. It will not help you with CSS level 3.
Nancy O.
-
Display only Total for a specific column
OBIEE 11.1.1.7I have an analysis with an additional column that has the following formula (as a complex global server)
"Sum (the amount deposited per person) - sum (amount spent per person).
Then I add totals for a person.
My table displays the amount in the Total line correctly, but it also shows the total on each row of the PivotTable. I only need the value to be displayed in the total row.
My current table
Person Amount deposited Amount spent Amount left Joe $1,000 $250 Joe $750 $250 Total person: $1,000 $750 $250 How can I get the total appears correctly, but do not have the amount left displayed for each line?
Thank you
Ray
Sorry, I forgot one thing... in the total sign for anyone, in the field of custom CSS, in the updated Values of Format the following: text-decoration: none; It worked in my case.
Kind regards
Oana
-
Help, please! I try to summarize the total for separate text fields in a summary box, but have lost the tab 'calculate' in the 'text field properties area. Any help would be greatly appreciated!
When in forms editing mode (Tools > prepare form), select: more > return to the Acrobat form
In the future, check the box 'this document requires signatures' when you choose at the beginning: Tools > form prepare
unless you plan to use the form with eSign Document Adobe cloud service.
-
How can I create sequential shooting (1 for each 'row') numbers in a script in multiple column?
Sorry, but for now there no such function to put sequential numbers in the column number drawn.
-
Gears - error when you try to insert values into a table with multiple columns
Hello
I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns.
I have:
var db = google.gears.factory.create('beta.database'); db.open('developerSet'); db.execute('create table if not exists Developers (DeveloperName text, DeveloperAge int)'); var devName = "Davy" var devAge = 32; try { db.execute('insert into Developers values (?, ?)', [devName, devAge]); alert('success'); } catch (e) { alert(e); }
I get the error:
net.rim.device.api.database.DatabaseException; insert into developers values (?,?): SQL logic error or missing database.
I use this reference: http://code.google.com/apis/gears/api_database.html
Everything works if I have only one field as:
var db = google.gears.factory.create('beta.database'); db.open('developerSet'); db.execute('create table if not exists Developers (DeveloperName text)'); var devName = "Davy" var devAge = 32; try { db.execute('insert into Developers values (?)', [devName]); alert('success'); } catch (e) { alert(e); }
I use the plug-in Visual Studio 2.0 for 2008 that are running Windows XP SP and Simulator 2.13.0.56
Thank you
Davy
Yes, a SQLite database will persist between battery pulls. The database is registered either to internal MEM or removable media (not the device memory), depending on which is available on your device.
In general, its not considered a best practice to remove your table as soon as it is empty and re - create it again when you want to add data. This adds extra overhead fresh for the final, delete and insert first for a given table. Instead, define and finalize your drawing before you create your table. Once created, review the static schema.
That being said, for development purposes, it may be easier to provide an easy way to drop your tables while you develop your schema.
See you soon,.
Adam
-
Total of a column when the check box is selected in table form
Hi all
Total of a column when the checkbox is enabled in the form of tables, but is not work, help
Tabular form - count Qty Checked
My credentials for my worksapce:
https://Apex.Oracle.com/pls/apex/
Workspace: GB
USERNAE: [email protected]
PASSWORD; GB
Thank you.
Kind regards
GB
Hi user13028844,
user13028844 wrote:
Please change your login username of "user13028844" to something meaningful. Reference: Video tutorial how to change username available
The second button is a javascript function call, which is not a summary. the javascript function has a problem
This function has the problem help me correct, whereas we can summarize the amount of lines checked
I have made changes to your page. Check the "Display of Javascript" button, now it shows the correct amount for active items.
Made the following changes:
- The following are removed from the section "run when Page Loads:
Declare p_qty number; p_total_qty number := 0 ; Begin for i in 1..APEX_APPLICATION.G_F01.COUNT LOOP select nvl(qty,0) qty into p_qty from DURATION where id = to_number(APEX_APPLICATION.G_F01(i)); p_total_qty := p_total_qty + p_qty; end loop; --htp.prn(p_total_qty); htp.prn(''); apex_application.g_print_success_message := 'Checked total qty:'||p_total_qty ; End;
NOTE: The section "run when Page Loads" is intended for JavaScript code to perform the loading of the Page and NOT PL/SQL code.
- The following code removed from the section "Header HTML":
This code was going nowhere, so removed and replaced with code below.
- Added the following code in the section "function and Global Variable declaration:
function enableButton() { // code goes here } function total_checked() { var total = 0; var qty = 0; $( 'input[name="f01"]' ).each(function() { if ( $(this).is(':checked') ){ qty = $(this).closest('tr').find('td[headers="quantity"]').text(); total += parseFloat(qty); } }); alert("Checked Total Quantity : " + total); }
Your APEX_ITEM. BOX calls a JS "enableButton" function, but it has no definition, dummy definition so added.
Kind regards
Kiran
-
Update multiple columns from multiple tables in a single UPDATE request
Hello
I'm trying to figure if I'm heading in the right direction.
I want to update multiple columns from multiple tables in a single UPDATE request. Also, I would like to update multiple columns in a table from the tables.
Scenario 1
UPDATE Table2, Table 3 SET T2.Column1 = T1.Column1 ,T2.Column2 = T1.Column2 ,T3.Column2 = T1.Column2 FROM Table1 T1, Table2 T2, Table3 T3 WHERE T1.id = T2.id and T1.id = T3.id
Scenario 2
UPDATE Table3 SET T3.Column1 = T1.Column1 T3.Column2 = T1.Column2 ,T3.Column3 = T2.Column3 ,T3.Column4 = T2.Column4 FROM Table1 T1, Table2 T2, Table3 T3 WHERE T3.id = T1.id and T3.id = T2.id
Hello
For scenario 1, you must write separate instructions UPDATE table2 and table3.
To guard against someone else change one of these tables while you act so you can copy all relevant data in a global temporary table and update this global temporary table table3.
ENGAGE only when two tables have been changed.
You can write a procedure or an INSTEAD OF trigger to do all this.
For scenario 2, you can reference many tables that you need when new table3. It might be more efficient and simpler to use the MERGER rather than UPDATED. For example:
MERGE INTO table3 dst
WITH THE HELP OF)
SELECT t1.id
t1.column1
t1.column2
t2.column3
t2.column4
FROM table1 t1
JOIN table2 t2 ON t1.id = t2.id
) src
WE (dst.id = src_id
WHEN MATCHED THEN UPDATE
SET dst.column1 = src.column1
dst.column2 = src.column2,
dst.column3 = src.column3,
dst.column4 = src.column4,
;
-
Why the feature multiple column indexes using index skip scan?
Hi all
I have just been hired by a new company and I explored its database infrastructure. Interestingly, I see several function based indexed column used for all the tables. I found it strange, but they said ' we use Axapta to connect Axapta with Oracle, function index according to should be used to improve performance. Therefore, our DBAs create several indexes of feature based for each table in the database. "Unfortunately, I can not judge their business logic.
My question is, I just created similar to my local database tables in order to understand the behavior of the function index according to several columns. In order to create indexes of based function (substr and nls_lower), I have to declare the columns as varchars2. Because in my business our DBAs had created a number of columns as a varchar2 data type. I created two excatly same table for my experience. I create miltiple function according to index on the my_first table, and then I create several normal index on the my_sec table. The interesting thing is, index skip scan cannot be performed on more than one basic function index (table my_first). However, it can be performed to normal several index on my_sec table. I hope that I have to express myself clearly.
Note: I also ask the logic of the rule function based index, they said when they index a column they don't ((column length) * 2 + 1) formula. For example, I want to create indexes on the zip code column, column data type VARCHAR2 (3), so I have to use 3 * 2 + 1 = 7, (substr (nls_lower (areacode), 1, 7). substr (nls_lower ()) notation is used nested for any function function index. I know that these things are very illogical, but they told me, they use this type of implementation for Axapta.
Anyway, in this thread, my question is reletad to function function with index index skip scan, not logical bussiness, because I can not change the business logic.
Also, can you please give hints or clues for multiple function based indexes?
Thanks for your help.
SQL > create table my_first as select '201' codeZone, to_char (100 + rownum) account_num, dbms_random.st
Ring name ('A', 10) from dual connect by level < = 5000;Table created.
SQL > create table my_sec as select '201' codeZone, to_char (100 + rownum) account_num, dbms_random.st
Ring name ('A', 10) from dual connect by level < = 5000;
Table created.
SQL > alter table my_first change account_num varchar2 (12);
Modified table.
SQL > alter table my_sec change account_num varchar2 (12);Modified table.
SQL > alter table my_first change codeZone VARCHAR2 (3);
Modified table.
SQL > alter table my_sec change codeZone VARCHAR2 (3);
Modified table.
SQL > create index my_first_i on my_first (substr (nls_lower (areacode), 1, 7), substr (nls_lower (account_num), 1, 15));
The index is created.
SQL > create index my_sec_i on my_sec (area code, account_num);
The index is created.
SQL > analyze table my_first computing statistics for all columns indexed for all indexes.
Parsed table.
SQL > analyze table my_sec computing statistics for all columns indexed for all indexes.
Parsed table.
SQL > exec dbms_stats.gather_table_stats (USER, 'MY_FIRST');
PL/SQL procedure successfully completed.
SQL > exec dbms_stats.gather_table_stats (USER, 'MY_SEC');
PL/SQL procedure successfully completed.
SQL > my_first desc;
Name Null? Type
----------------------------------------- -------- ----------------------------
CODEZONE VARCHAR2 (3)
ACCOUNT_NUM VARCHAR2 (12)
NAME VARCHAR2 (4000)SQL > desc my_sec
Name Null? Type
----------------------------------------- -------- ----------------------------
CODEZONE VARCHAR2 (3)
ACCOUNT_NUM VARCHAR2 (12)
NAME VARCHAR2 (4000)SQL > select * from my_sec where account_num = '4000';
Execution plan
----------------------------------------------------------
Hash value of plan: 1838048852--------------------------------------------------------------------------------
--------| ID | Operation | Name | Lines | Bytes | Cost (% CPU). TI
me |--------------------------------------------------------------------------------
--------| 0 | SELECT STATEMENT | | 1. 19. 3 (0) | 00
: 00:01 || 1. TABLE ACCESS BY INDEX ROWID | MY_SEC | 1. 19. 3 (0) | 00
: 00:01 ||* 2 | INDEX SKIP SCAN | MY_SEC_I | 1. | 2 (0) | 00
: 00:01 |--------------------------------------------------------------------------------
--------
Information of predicates (identified by the operation identity card):
---------------------------------------------------2 - access ("ACCOUNT_NUM" = '4000')
Filter ("ACCOUNT_NUM" = '4000')
Statistics
----------------------------------------------------------
1 recursive calls
0 db block Gets
Gets 7 compatible
0 physical reads
0 redo size
543 bytes sent via SQL * Net to client
384 bytes received via SQL * Net from client
2 SQL * Net back and forth to and from the client
0 sorts (memory)
0 sorts (disk)
1 rows processedSQL > select * from my_first where substr (nls_lower (account_num), 1: 25) = '4000';
Execution plan
----------------------------------------------------------
Hash value of plan: 1110109060------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1. 20. 9 (12) | 00:00:01 |
|* 1 | TABLE ACCESS FULL | MY_FIRST | 1. 20. 9 (12) | 00:00:01 |
------------------------------------------------------------------------------Information of predicates (identified by the operation identity card):
---------------------------------------------------1 Filter (SUBSTR (NLS_LOWER ("MY_FIRST". "" "" ACCOUNT_NUM")(, 1, 15) ="4000"
AND SUBSTR (NLS_LOWER ("ACCOUNT_NUM"), 1, 25) = '4000')
Statistics
----------------------------------------------------------
15 recursive calls
0 db block Gets
Gets 26 consistent
0 physical reads
0 redo size
543 bytes sent via SQL * Net to client
384 bytes received via SQL * Net from client
2 SQL * Net back and forth to and from the client
0 sorts (memory)
0 sorts (disk)
1 rows processedSQL > Select / * + INDEX_SS (MY_FIRST) * / * from my_first where substr (nls_lower (account_num), 1: 25) = '4000';
Execution plan
----------------------------------------------------------
Hash value of plan: 2466066660--------------------------------------------------------------------------------
----------| ID | Operation | Name | Lines | Bytes | Cost (% CPU).
Time |--------------------------------------------------------------------------------
----------| 0 | SELECT STATEMENT | | 1. 20. 17 (6) |
00:00:01 ||* 1 | TABLE ACCESS BY INDEX ROWID | MY_FIRST | 1. 20. 17 (6) |
00:00:01 ||* 2 | INDEX SCAN FULL | MY_FIRST_I | 1. | 16 (7) |
00:00:01 |--------------------------------------------------------------------------------
----------
Information of predicates (identified by the operation identity card):
---------------------------------------------------1 - filter (SUBSTR (NLS_LOWER ("ACCOUNT_NUM"), 1, 25) = '4000')
2 - access (SUBSTR (NLS_LOWER ("ACCOUNT_NUM"), 1, 15) = '4000')
Filter (substr (NLS_LOWER ("ACCOUNT_NUM"), 1, 15) = '4000')
Statistics
----------------------------------------------------------
15 recursive calls
0 db block Gets
857 consistent gets
0 physical reads
0 redo size
543 bytes sent via SQL * Net to client
384 bytes received via SQL * Net from client
2 SQL * Net back and forth to and from the client
0 sorts (memory)
0 sorts (disk)
1 rows processedCheck MoS for a bug with the FBI and Skip Scan - it sounds like it could be a bug.
On 11.2.0.4 with your sample code 10053 trace shows the optimizer whereas an index FULL scan to the point where she should consider an index SKIP scan for "unique table path".
A person with 12.1.0.1 practice would like to run your test and see if it's fixed in this version.
Concerning
Jonathan Lewis
-
Create snapshot for all columns in a tableview, including hidden columns
I am trying to create a snapshot of a tableview. The table view has width fixed on the screen, but can have multiple columns. When a snapshot of the tableview is taken only the columns that are visible appear in the image and the remaining columns that are hidden and who must scroll by a scroll bar does not appear. How to do this. is it possible. code example will be a great help.
Thank you.
public static WritableImage createSnapShotOfANode(Node node, int width, int height) { WritableImage img = new WritableImage(width, height); img = node.snapshot(null, img); return img; }
In this method, I pass a tableview as a node. the width of the tableview as setting width and height.
This takes only the snapshot of the visible columns but not all columns. I also added the width of all columns and that past as the param for the width parameter, but no change.
How to do this.
- Remove the TableView to its current stage.
- Create a new scene.
- Put the TableView in the new scene.
- Take a snapshot of the new scene.
- Replace the TableView in its original scene.
Maybe you are looking for
-
I recently bought and downloaded a song on iTunes. When I move the shuffle, playlist does not recognize the track and jump directly. Resetting the device, remove from library, make a new list of reading and redemption have failed so far. iTunes indic
-
Hi guys I recently bought a Lenovo y510p GT750m sli, that's pretty impressive for the games, but now I think to buy an external monitor, and here I need a bit of advice. the monitor I need if work of handel via my Macbook and games via my y510p, for
-
Satellite A200-1AE (PSAECE) need drivers for XP
I would be grateful if someone with the same {PSAECE A200-1AE} or similar model (with Nvidia Geforce 7300 Turbocache) was able to install Windows XP success on their mobile phones. I have tried for centuries to find a set of drivers for my laptop but
-
Update Froyo for the Milestone in Russia
Motorola plans to upgrade in Russia Milestone phones to Android 2.2 (Froyo). If yes then when it should?
-
The last update my computer (Vista Home Basic) tried to download and install is the Microsoft .NET Framework 3.5 Service Pack 1 and the .NET Framework 3.5 Family Update (KB951847) x 86... According to Windows Update. The problem is, it always ends up