Formatting total columns in an OAAdvancedTableBean
Hi All,
I need to be able to format the table total columns in the format:
Formatter formatter = new OADecimalValidater("###,###,###,##0;-###,###,###,##0", "###,###,###,##0;-###,###,###,##0");
(no decimal places)
I've tried various things e.g.
DictionaryData columnFormat = (DictionaryData)columnBean.getColumnFormat();
if (columnFormat == null) {
columnFormat = new DictionaryData();
Formatter formatter = new OADecimalValidater("###,###,###,##0;-###,###,###,##0", "###,###,###,##0;-###,###,###,##0");
columnFormat.put(COLUMN_FORMAT_ATTR,formatter);
columnFormat.put(ON_SUBMIT_VALIDATER_ATTR,formatter);
columnBean.setColumnFormat(columnFormat);
... but nothing works.
I've searched the forum for previous responses to this query and the only solution put forward appears to be columnBean.setAttributeValue(CURRENCY_CODE,"USD");
Which is no use to me because of the decimal places presented.
Is there another way?
Thanks,
John
To bring the latest 12 in to the report or input schedule do the following, Have a property in the entity dimension as CURMONTH, and put it in the excel sheet using EVPRO. Introduce 12 columns to the right of the excel sheet. Using the evtim function subtract the month respectively from the current month. This will put the latest 12 months in all the cells. Now in your colkeyrange make the change so that it picks up's the 12 month that you have laid out and bring the data as part of your refresh or expand. Now hide the columns. In the report you will have column called latest 12. Create a excel formula to sum up the all the months(latest 12). This way you can get the latest 12.
Other way of getting the latest 12 is , create custom measure for latest 12 months and then simply include in your report.
I hope this helps.
thanks
david
Similar Messages
-
Problem in Formatting Total Column in Classic Table
Hi,
I am using Classic Table.
I am able to format the column data but i am unable to format the column total value. I searched in forum and tryed something like in the following thread..
Problem in formatting Total Value in advanced table
since i am using Classic Tables i am unable to do it.
I also tried the following
OATableBean table = ....
OATotalRowBean totalRowBean = (OATotalRowBean)table.getColumnFooter();
System.out.println("Formattotal : "+totalRowBean);
if (totalRowBean != null)
oracle.cabo.ui.validate.Formatter formatter = new OADecimalValidater("#,##0.00;#,##0.00","#,##0.00;#,##0.00");
totalRowBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
in this case the total is not formatted.
I also refered developer guide. There i found how to set value to total column.. but how to get the value its not given..
Any body pls help in this regards
Thanks & RegardsHi,
When i am using Classic Table i am able to format column data but i am not able to format the column Total
Code i using ;
OATableBean table = (OATableBean) webBean.findChildRecursive("EmpTestVO12");
table.prepareForRendering(pageContext);
OAMessageStyledTextBean totalBean = (OAMessageStyledTextBean)table.findChildRecursive("Salary");
if(totalBean!=null)
Formatter formatter = new OADecimalValidater("#,##0.00;(#,##0.00)","#,##0.00;(#,##0.00)");
totalBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
//Properly formatting column data
Whe i am using OAAdvance Table bean i am able to format the total but i am unabele to format the Column data. Using following code..
OAAdvancedTableBean tableBean=(OAAdvancedTableBean)webBean.findChildRecursive("region2");
tableBean.prepareForRendering(pageContext);
OAColumnBean c1=(OAColumnBean)webBean.findChildRecursive("column12");
if(c1!=null)
c1.setAttributeValue(CURRENCY_CODE,"USD");
Can anybody pls tell me how can i achieve both (column values and totals formatting) using either Classic Table or Advance Table..
Thanks & Regards,
Ram -
Total column not changed between header & detailed screen
I have a report with header data contains contracts information and detailed data contains orders, debit credit memo related to the contracts. I write the report using CL_SALV_TABLE to display contract value, usage in full ALV_GRID. When I double click on a contract line, it will go to the second screen to show all orders related to that contract. The second screen with orders information will be in a screen on a container with all standard function ( Export list to Excel, Word format etc..), sort, total and sub total) and a push button to go back to first screen.
The report works fine but when I am on the second screen, I total and sub total the amount on that screen in order to check with total value in header record and it total up correctly by currency.
But when I go back to the first screen, select a different contract record, double click on the line to get to the order info screen, all order data display correctly except that the total column still show amount from the previous detailed screen. If I select the column again and click the total, it will total correctly. I did refresh the data in the screen before go back to first screen but it does not solve the problem.
DOES ANYONE HAVE A SIMILAR SYMPTON LIKE THIS?
Thanks for your advice.
On the order detailed screen, I create a container with screen 100 and write PAI, PBO like this:
Screen 100:
process before output.
module status_0100.
module load_data_to_control. "Load usage data to screen
process after input.
module user_command_0100.
module status_0100 output.
set pf-status 'PF100'.
set titlebar 'T100'.
endmodule.
module load_data_to_control output.
if gr_cont is not bound.
create object gr_cont
exporting
container_name = 'CONTAINER_100'
exceptions
others = 1.
if sy-subrc <> 0.
message a052(zvn) with
' No container object found'.
endif.
try.
cl_salv_table=>factory(
exporting
list_display = list_display
r_container = gr_cont
container_name =
importing
r_salv_table = gr_alv_2
changing
t_table = gt_orders
catch cx_salv_msg into gr_error.
endtry.
perform set_functions. " Set all standard function in screen 100
perform set_column_order using gr_alv_2. "Set column format, display
perform handle_events. "Register events for selection mode & user commands
Display order screen 0100
gr_alv_2->display( ).
else.
gr_alv_2->refresh( ).
endif.
module user_command_0100 input.
data: wa_d type gt_dtab,
ls_contract type vbeln,
ls_order type vbeln,
ls_invoice type vbeln,
ls_belnr type belnr_d,
ls_row type char10.
data: l_text type char128.
case sy-ucomm.
when 'RETURN' or 'BACK' or 'EXIT' or 'CANCEL'.
*... refresh the table in order to see the new data
gr_alv_2->refresh( ).
leave to screen 0.
when others.
endcase.
endmodule. " USER_COMMAND_0100 INPUTHi ,
When you are using the CL_SALV_TABLE, what is the use of screen 100. Better populate the evnts table in CL_SALV_TABLE
Cheers
Pavan -
Problem in formatting Total Value in advanced table
I want to format Total Value for each column to USD format i am able to do for Column values but for Total Value i am not able to make it, i reffered all the previous threads and tried nothing worked out, can any one help me out its very urgent
Thanks
BabuFirst thing is as Tapash has pointed out, How did you do it which is not working? Second point is that there is straight forward mention of this scenario in Advanced table section of the Dev guide. Have a look.
--Shiv -
Sorting on a total column or calculated column in a pivot table
We have a pivot table showing customer activity by month. We have added a calculated field to show the YTD average instead of a total column. Is there a way to sort on this calculated field? We have applied a sort on the measure in the criteria, and our resulting pivot table sorts by the values in the most recent month, not by the YTD average.
I think we cant sort when we use a pivot view becoz all the rows are already fixed. Say your rows are sales and volume and columns are year 2007 and 2008, imagine if you r given the sorting ability then if number of units solds is more then it need to change the rows (but in pivot table rows are fixed). So, we cant sort in pivot tables!!
-
Please Help!!!
How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
January 2014 January
2013 +/-
Region Entry Exit Total Entry Exit Total (Total of Jan2014-Total of Jan2013)
A 2 3
40 5 7 30 40-30= 10What is a table structure? Sorry cannot test it right now..
SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
FROM tbl
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to change the label of a total column in pivot view
Hi
Is there a way to change the label of the column created by analytics when calculated row based totals? Currently, it is same as the measure label to be summed.
ThanksHi
Thanks for your help, actually that option works for the total displayed as the latest row, I mean the label for the total row. However, for the total column, the name stays as the same as the measure label.
Can you further help me on the issue?
Thanks -
Invoice Forms created with Adobe X - default value for "total" column should be blank
I am new to the forum and just finding my way around. Thank you for any help.
I've created an invoice template in Word, then imported it into Adobe X Pro to turn it into a form. Pretty simple, but one thing is troubling me. I have the usual description, quantity, price each, and total columns. The "total" columns are defaulting with a "0" in them, and I'd prefer they default blank unless an entry is made on that line. I have right-clicked the "total" fields properties and the default values are blank already, but a zero still shows up. I know it can be done because one of my earlier forms defaults to a blank space until I entered something on that line. Then it calculated. How can I make the "total" column blank unless something is entered there?
Secondly, when I save a form and want to go back to make changes, I'm not seeing how to do this. It seems to save as a .pdf, and if I want to modify the form portion I have to start all over from scratch. What am I missing?
Thanks so much for any help.George, thank you for the response.
I've entered the script, and no change. The "total" columns still show a (zero) 0 even when I have not entered anything in that line.
For example:
Description Qty Unit Price Total
0
0
0
etc... all the day down the form.
I'd like the zeroes not to appear when there is nothing on the Description lines.
Incidentally, when selecting fields to use for calculations for the "total" column, we're supposed to place a check mark in the box of the fields to be calculated - and I can't CLICK in them. I have to use the space bar. Is that how it is supposed to work?
Thanks for your quick response.
J
I -
Rank on column-level Grand total column in pivot table - Need help
Hi ,
I have developed the report, which is having a pivot view. In pivot view i have a column level grand total. I need to apply the rank for the grand total column..
will that be possible.. if possible let me know..
Thanks
KishoreMAY BE IT IS NOT POSSIBLE IN PIVOT VIEW< AS WE DONT HAVE FORMULA EDIT OPTION FOR COLUMNS IN PIVOT VIEW.......
Thanks & Regards
Rushi -
Customizing grand total columns in pivot view
Hi,
I need to customize grand total column name in pivot view
ex: If i have two measure order quantity and order amount when i am selecting aggregation after in column properties it is getting grand total i need to display as grand total for OQ and grand total for OA
Please give suggestions
Thanks,
Kartheek.
Edited by: 998231 on May 26, 2013 11:31 PMHi Kartheek,
In Pivot View, the default Grand Total can not be renamed to have measure specific grand total labe (The one which we specify in the pivot view either by row or column).
But you can try having one seperate measure (in criteria) which will calculate the grand total of each measure by dimensions, which are available on the report.
In sort you can achieve this using table and narrative view together (Not by pivot view).
Expresion to be used for grand total in report criteria is Sum( Measure By Dim1, dim2... DimN)
where Dim1 and dim2 are the dimesional column available on the report and measure is you OQ/OA.
Create a table view as a default view (do not add any report level agg) and then add narrative view to display the Grand total OQ and Grand Total OA. You can add your custom lables with HTML tag, disply the 1st row only as the values will be repeated for grand total.
If you find any other solution do let me know. As of now I can think of this as a best solution.
Regards,
Kashi -
Add another column under sub total column in alv
hi guys,
is there any way i can add a new column under sub total column in alv function and have my own calculation for itHi Radha,
I doubt if that can be changed....because the event that i was referring to in my previous post works with ALV List display...But in any case you can try that.....
There is an event in SLIS....(As i told you, i dont remember the name and currently i dont have access to SAP system, so i am not able to verify and let you know that event name).....
Other thatn TOP and END of PAGE events, there is an event for sub-total text......i think it would start with "SUBTOTAL"...
you need to use that event in your events table and pass it to ALV Grid display.
Then create a sub-routine with that name (As you do for TOP-OF-PAGE event)....and in this event you can change the values in runtime (PROVIDED, this event gets triggered for ALV GRID).....
If this does not work, i think calculating sub-totals while you build the internal table would be a better option....(If you have time constraint....else you can do some more research on the same)........
Best Regards,
Ram. -
Conditionally Formatting One Column Based On The Value of Another Column
I have the following requirement:
I have 2 columns in a report showing Actual Sales & Budget Sales each year. I am using a bar chart to show the different values for these 2 columns.
I need to conditionally format the column "Actual Sales" so that if it is less than the "Budget Sales" it will appear in red, and green if "Actual Sales" is greater than "Budget Sales." So in a nutshell,
CASE WHEN "Actual Sales" < "Budget Sales" THEN
RED
ELSE
GREEN
END
Thoughts anyone?CASE WHEN (COL1 - COL2) < 0 then Red else Green end
regards
John
http://obiee101.blogspot.com -
Hi
I have built a query with 2 characteristics drilled vertically and another 1 characteristic drilled horizontally. I have a single key figure in the report and there is an 'Overall Result' columns at the far right of the report. Great.
The report is sorting by the first column but I want to be able to sort everything by the total column at the far right of the report.
I've tried opening the properties on my key figure in Analyzer but the sorting tab is greyed out.
Can anyone help with this?
ThanksJust incase anyone finds this and has the same problem, I resolved the issue by first removing the drill-across value, sorted the key figure (right click) and then added back the drill-across value.
With the drill-across figure, I did not have access to the sort menuu -
Matrix row grand total, column grand total
matrix report layout in sql 2008
report shows column a column b column c total
row 1 4 5
8 17
row 2 3 5
2 10
row 3 2 7
6 15
total 9 17
16 grand total column 42
grand total row 42
How do I define the grand total cells to use column totals or row totals? Not just the sum of field in dataset?
Accounting wants justification that column totals add up to row totals.Hi JimHoopsDSC,
Based on my understanding, you want to show grand total columns and grand total rows in the report.
For your requirement, you can create a matrix and add total for row groups and column groups. Then you can add an additional row and populate the total value. Please refer to screenshots below:
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Setting Total Column width in Cross Tab report
I am having an issue with the width of the Total Column in a Cross tab report. I have set the width of the column and saved the report but when I am reopening the report the Total column width is expanded but rest of the data column width remains the same (which I saved). Any idea how to adjust the total column width?
TIA,
AJAJ.
Did you ever solve this?
Maybe you are looking for
-
Hi.. I created a request in presentation servicews it includes " employ id,name,organization.cost center,annul salary,haouly salary, head count". for employ 13 cost centers available so 13 annul salaries for 13 organizations.each has annul saari 1040
-
Export and save a Crystal Report in PDF using parameters
Hi @all! Is it possible to suppress the output of an Crystal Report in a window using parameters? Instead of that I want to save the pdf in a specified folder without using the publication-function. Fot the parameter I use these link: [http://devlibr
-
Which table stores Supplier Name information?
Hi Guys, Can anyone tell me which table in EBS stores Supplier Information? Thanks in advance.
-
How to insert by sdk a row in grid
Hi I have a grid with 9 columns, the grid is empty I want to insert the rows one by one in the updating Thank you Like that col1 col2 col3 col4 col5 ... col 8 aaa bbb bbb ccc ddd eee eee fff ffdd bbb
-
Another DATE/TIME question
HI all I am trying to INSERT INTO TABLE a date and time into one line.. excerpt looks like CREATE TABLE Test (Submit DATE ); INSERT INTO Test VALUES(to_date('2001-01-02 22:23:00','yyyy-mm-ss hh24:mi:ss')); I get an error message that says it's missin