Page Total for a Column in JSF HtmlDataTable
Hi All,
I need an example to calculate page total for price column in HtmlDataTable.
Each page displays 10 rows and there are 50 rows hence 5 pages in datatable.How to calculate page total after displaying the rows on page.
Thanks in advance.
Just get the desired sublist of the datalist and sum the price? You can get the starting index and the rowcount from the HtmlDataTable by its getFirst() and getRows() methods respectively and use it in List#subList(). Then iterate over the list and add the price value of every item in a loop to the total value. You can display it in the footer of the datatable. You can define a footer with <f:facet name="footer">.
Similar Messages
-
Calculating Totals for a column in ALV Grid Display
Hi All,
I frustrated with the problem of simple calculating total for a column. I wrote the following code:
LW_CATALOG-TABNAME = P_GV_STRUCT.
LW_CATALOG-FIELDNAME = 'ZSUMMS'.
LW_CATALOG-DO_SUM = GC_X.
APPEND LW_CATALOG TO G_FIELDCAT_TAB.
CLEAR LW_CATALOG.
It is not working. Could you please suggest the solution?
It would be great help to me.
Advanced Thanks,
Phani KumarPhani,
Did u try playing around with any of these layout fields ?
no_sumchoice(1), " no choice for summing up
no_totalline(1), " no total line
no_subchoice(1), " no choice for subtotals
no_subtotals(1), " no subtotals possible
no_unit_splitting " no sep. tot.lines by inh.units
totals_before_items, " diplay totals before the items
totals_only(1), " show only totals
totals_text(60) , " text for 1st col. in total line
subtotals_text(60) , " text for 1st col. in subtotals
b. Addtionally... not a solution.. but u know...
just try the same code iwth reuse_alv_list_display and see if the total gets displayed properly ? -
Page format for 132 column dimension in smartforms
hi guys
*In smartforms what is the pageformat for 132 column paper i.e 360 * 310 mm is there any standard pageformat provided by sap or have to create a new one ,,,how to create a new pageformat.*
Edited by: ahamed13 on Jun 6, 2010 8:44 PMAhmed,
create the new page format in SPAD tcode. Go to the device where u want to create the page format as per the requriement.
Regards.. -
Removing Totals for Break Columns
Hi All,
If we add break on two or three columns in report, it gives totals for each group plus a report level total. Is there any way to remove any group or break's total.
For example, if we have a report on emp table and having groups on deptno and job columns, it would be giving totals like this:
JOB TOTAL: 3000
DEPTNO TOTAL: 3000
report total: 3000
How can we remove any of the above totals?
Thanks
Zahid Khan
DeptnoLooks like this is a popular request!
I have report with a break on Column 1, 2 and 3. I would like to display the Report totla but not the sub totals at each column break. Can anyone please share their experience on how to get rid of the Sub Total for a break column?
Thanks. -
Sub-total and Total for a column having checkboxes in WD ABAP ALV
Hello Experts,
I have used ALV in We bdynpro ABAP to display my output. There are 2 columns that are checkboxes in Output. I want a sub-total and total for those two columns. I know tht total and sub-total functionality is available only for numeric fields .
Is there any other indirect way by which i can achieve the same ?Hi Ragini,
Please refer this thread: [alv total and subtotal|How to display graphs;.
I hope it helps.
Regards
Arjun -
Grand Totals for GOURL columns
We are having an issue showing Grand Totals for GOURL enabled columns
We have enabled GOURL on the amount columns, To enable hyperlink we had to convert the the number column to character. Enabling the Grand total in the Table View is thorwing error "Function Report_Sum does not support non-numeric types".
Any input on the above would be of great help.
We are using OBIEE version 10.1.3.4
Thanks
KranthiYou can try the following..
1) Keep the same name for all the amount fields in each column. (for example, first amount column field name is "Amount1" and second column field name is "Amount2").
2) Then write the code in the Calculate event of the Total field. (Use FormCalc)
Total1.rawValue = Sum(Table1.Row1[*].Amount1);
3) Similarly for Second column
Total2.rawValue = Sum(Table1.Row1[*].Amount2);
4) For the total of Amount1 and Amount2.
LoanTotal = Sum(Total1.rawValue + Total2.rawValue);
Hope this helps.
Thanks
Srini -
Suppressing totals for individual columns
In OBIEE 10.1.3.4 Answers, is there a way to suppress totaling for an individual column? I have a derived column - unit price - that I want to suppress totaling on, while retaining totals for quantity and amount. I can do it by casting the column to character, but figured there must be a better way.
Never mind... foundit!
Edited by: andrea.bender on Jul 14, 2011 6:42 AMTo suppress totaling on a specific column, go into the report and edit the formula for column and set Aggregation Rule to 'None'
-
How to display total for a column in updateble report
How can I display total on a report column?
the query is
select htmldb_item.checkbox(1,invoice_id) invoice_id,
htmldb_item.DISPLAY_AND_SAVE(2,invoice_no,15)invoice_no,
htmldb_item.DISPLAY_AND_SAVE(3,to_char(invoice_date, 'DD-MON-YYYY'),20) invoice_date,
htmldb_item.DISPLAY_AND_SAVE(4,net_amount,15) NET_AMOUNT,
htmldb_item.text(5,net_amount,null,10) amount_adj,
htmldb_item.text(6,net_amount,null,10) actual_amt
from INVOICE
where OWNER_TYPE = 'CUSTOMER'
and OWNER_ID = :P57_CUSTOMER_NAME
group by invoice_id,invoice_no, invoice_date,net_amount
In the report column attributes the sum column is checked for the sal field
When I run the report, I get a Sub-total of 0 and a Report Total of 0. What am I doing wrong?
thanksSunil,
Which column is the sal column? I canât see any numeric columns in your query. If you use htmldb_item calls in your query column, then this makes them strings and you canât build sums on string columns. If you want to build sums in an updateable report / tabular form, then donât use the htmldb_item API. Instead use the built-in display types on the report column attributes page. Using the built-in display types is the better options in most cases anyway and they do allow you to calculate sums even if the column is a text field or display and save type field.
Regards,
Marc -
How to put total for a column at the end of the report
I have a field called requests. at the end of every print page i want the total no. of requests to be printed. how can i do that? please help urgent
If your querying requests, and your query pulls back 50 rows of data, would you say that is 50 requests in total?
A summary column is quite simple - it counts the number of rows in a given report group. If the number of rows brought back is the total number of requests, than just create it to count some column in that group (request num..etc). If you set it to reset at the report level, it should just work fine -
CANNOT SEE TOTALS FOR SOME COLUMNS IN DISC 9I (9.0.2.39.01)
We have made new reports in Disc 9i, column totals wont appear on the report where expected, It just shows "SUM" and then blank, this is happening for all the new reports.Please help..
Thanks.
GlenThere are some cases where Discoverer cannot determine with certainty that the Totals or subtotals you create will be correct. It flags those totals as Values that cannot be aggregated. Go to Options-> Sheet Format and you can set what string you would like to see placed in those cells that Discoverer determines cannot be aggregated correctly.
Assuming that the blank totals are non-aggregable by Discoverer, there are some things you can do to to alter either your business area or worksheet or calculation that will enable you to get the totals you want. As this analysis takes some time and iterations, it is usually best handled through Oracle Support. Also see the doc and RN references to the EnhancedAggregationStrategy in the Preferences.
Also, given the version you are using it seems that you have just started using 9.0.2. You should strongly consider upgrading to OracleAS 10g (9.0.4) or at least upgrade to the latest 9.0.2 patch -> 9.0.2.54.
Discoverer Product Management -
Add Total for a Column in Data Grid Screen Based on Query
Hi Guys , I have query based on table Payments in which I search By Start Date , End Date and tenant person [ from drop down List ].
How to display sum of Payments.[Amount] column in the query screen , which off-course varies for selected person.
OmarThe data grid doesn't support calculating aggregate functions on columns automatically, but you can write a little bit of code to show the total of the payments right beneath the data grid.
Add a screen member called PaymentsTotal that is the same type as the column that you want to sum.
Drag out the screen member to be underneath the data grid. You can change the sizing settings (e.g. Horizontal Alignment) so that it aligns with the data grid how you want it.
Select the Payments collection and select Payments_Changed from the Write Code drop down.
In the generated method, write the following code:
partial void Payments_Changed(NotifyCollectionChangedEventArgs e)
// Total is the name of the property in my Payment entity that I want to sum
this.PaymentsTotal = this.Payments.Sum(p => p.Total);
When you run the screen, the PaymentsTotal property will show the total of all of the payments that are shown in the data grid.
Justin Anderson, LightSwitch Development Team -
Any method to create a SUM Total for a column whose values based on LAG?
I have a question here, and the challenge is to explain my situation well. I am trying to develop a workbook that shows by project and month, the cost this period and the change in cost from the prior period. I want a SUM total on the Cost This Period and Cost Change From Prior Mth columns. So what I want to do looks something like this -
Project Month Cost This Period Cost Chg from Prior Mth
ABCDE Jan $50,000 NULL (since no preceeding row)
ABCDE Feb $75,000 $25,000
ABCDE Mar $60,000 -15,000
Total $185,000 $10,000
I do the Cost Chg from Prior Mth as a new calculation, and use the Insert Formula from Template process to use the F(x) Difference template to create my calculation. That is working just great. If you look at the underlying code for this new column, you can see the LAG function being utilized in calculating this value. I am lagging one row, as you can see from the example above.
I can create a new total and do a SUM for the Cost This Period column and get the correct answer (the $185,000).
The problem I am running into is that I am not getting anything when I try to sum my Cost Chg from Prior Mth column. The result is just blank (does print the total's text, but no amount).
My thought is that the NULL row in this column was messing up the SUM from working. So I created a new calculation and said CASE WHEN Cost Chg from Prior Mth IS NULL THEN 0.00 ELSE Cost Chg from Prior Mth. So I get a new column with the same numbers except for the first row, where I now have a 0 instead of NULL. I then created a new total (SUM function) on this brand new column. Darn. Same result as for the other column. I do not get an amount.
Has anyone else run into an issue with trying to sum up a column of numbers that are being calculated from a LAG function in Discoverer? Any suggestions on how I could get a SUM to properly calculate for this Cost Chg from Prior Mth column? Or have I run across one of those irritating "cannot handle in Discoverer" issues?
Of course I can export the workbook run results to Excel and create the calculation in there, and that works just fine.
John DickeyHi John
Thanks for the question and the great information. That really helped. I love these kinds of questions. They make me think :-)
Just a thought but have you tried altering the SUM to be a CELL SUM?
The SUM will try to evaluate the LAG over the total which would be invalid whereas, at least in theory, the CELL SUM should literally add the values.
Best wishes
Michael -
OAF :I need to show totals for columns that breaks on one of the column in Advance Table
I am using advance table (AT),
I have a requirement to calculate totals for few columns in the AT, based on the account number ( totals should break on the account # , as shown below )
Please help.
Account
Desc
Paid Amt
AP Credit
acc1
desc1
200
100
acc1
desc1
300
100
acc1
desc1
400
100
Total 900
Total 300
acc2
desc2
150
50
acc2
desc2
250
50
acc2
desc2
100
150
Total 500
Total 200
Message was edited by: 85de445e-a75a-4f2f-b086-8cb6abb09c5d
CAN ANY ONE PLEASE PROVIDE ANY INPUTS.. , AS ITS URGENT ! Thanks in advance.Any updates on this please !!! ?
Please suggest if this can be achieved by any other region type or any specific type to be used ?? -
Total for an editable column (ALV)
Hi experts!
I developed an WD ALV and I need to display totals for a column.
The problem is, this column is editable, the user could to put some values in some rows of the table and when he press ENTER Key, all values entered should be added and displayed in Total.
How can to do this?
Thx in advance.
DaniloHi Dear ,
When u press the Enter key after the calculation for that column , u have to refresh or reload the all the contents of the ALV to context for that ALV where it is binded.
Check the below code :
data:
lr_comp_alv type ref to if_wd_component_usage,
lr_comp_if_alv type ref to iwci_salv_wd_table,
lr_config type ref to cl_salv_wd_config_table.
data: lr_column_settings type ref to if_salv_wd_column_settings,
lr_column type ref to cl_salv_wd_column,
lr_column_header type ref to cl_salv_wd_column_header.
data : lt_column type salv_wd_t_column_ref,
ls_column type salv_wd_s_column_ref.
data: lr_field_amnt type ref to cl_salv_wd_field.
data: lv_aggr_rule type ref to cl_salv_wd_aggr_rule.
data: lr_sort_rule type ref to cl_salv_wd_sort_rule.
data fs_flight like line of ls_sflight.
*... ALV Component Usage
lr_comp_alv = wd_this->wd_cpuse_alv_test( ).
if lr_comp_alv->has_active_component( ) is initial.
lr_comp_alv->create_component( ).
endif.
lr_comp_if_alv = wd_this->wd_cpifc_alv_test( ).
*... Configure ALV
lr_config = lr_comp_if_alv->get_model( ).
call method lr_config->if_salv_wd_table_settings~set_selection_mode
exporting
value = cl_wd_table=>e_selection_mode-multi_no_lead.
lt_column = lr_column_settings->get_columns( ).
loop at lt_column into ls_column.
case ls_column-id.
when 'PRICE'. " this is the column id where u want the total
* aggregate field
call method lr_config->if_salv_wd_field_settings~get_field
exporting
fieldname = 'PRICE' " this is the column name
receiving
value = lr_field_amnt.
* create aggregate rule as total (if u need subtotal also...)
call method lr_field_amnt->if_salv_wd_aggr~create_aggr_rule
exporting
aggregation_type = if_salv_wd_c_aggregation=>aggrtype_total
receiving
value = lv_aggr_rule.
endcase.
endloop.
endmethod.
Regards
Aisurya puhan
Edited by: Aisurya Puhan on Jun 29, 2011 8:06 PM -
How to get page totals at the end of the report in BI Publisher
I am using BI Publisher 10.3 and using Ms-Word template builder to design the report
and I want to implement totals for some columns (like page totals) ... can anyone let me know how to go about this
ThanksTake a look this blog: http://blogs.oracle.com/xmlpublisher/entry/anatomy_of_a_template_iii_page
You can download the template for that page.
Also take a look at the Samples folder within your BI publisher desktop folder and you can find a folder "Page Total" that has the RTF template, xml and output..
Assign points if helpful.
Thanks,
Bipuser
Edited by: BIPuser on Aug 18, 2011 8:24 AM
Maybe you are looking for
-
How can I open an old Flash file?
A tech person and I created a show in Flash in 2004 called Black on Black / 13; I'm not sure which version of Flash we used. It was put up in the Gallery of the website of a group I headed called The Lark Ascending, and sometime between then and now
-
Yet one more issue to try to figure out. Since I started using my new iMac I have been getting periodic freezing in Safari and the web often seems much slower than it should. This forum has been a particular problem today, often hanging for a good 10
-
How to open color selection diaglog in 10g forms Plz help
Hi Everybody I'm new to oracle 10g forms I want to open color selection dialog in 10g forms I've configured demos...nd they r working well.... Now i want to use code in my forms.......But I tried to see it from the source.. But I couldn't understand.
-
Active-active vs Active-pasive topology
We are trying to install soa-suite in High Availability Environment. I understand that active-active more scalable and better performance. Is any body know on how much more work to install active-active topology? Is it a lot more difficult to maintai
-
Can a URL being loaded have a variable in its address?
in plain english, i'd like to do the following: xmlLoader.load(new URLRequest("http://www.mysite.com/whatever/whatever/(thirdSegment)")); where (thirdSegment) is the third segment of whatever URL the current swf file is on. I aready define segment 3