Sort on group total ( Sum of group)
I need to sort output either on the details and when the details are suppressed on the total of a group
If I suppress details and manually change sorting using
the designer and "Group Sort Expert", " For this group sort All based on Sum of table.column" gives me exactly what I need.
However, I need to switch this "Sort on Total" on and off programatically.
Tried to change or add a TopBottomNSortField programtically using RAS - with no success yet.
Am I using the correct approach at all ?
Using CR 2008 ( 12.3.0.601 ) on Windows, fat client
Thanks
Oskar
Edited by: Oskar Atkinson on Apr 15, 2011 1:05 AM
I wonder if you should be looking at the Group itself (GroupNameFieldClass.Group property in the documentation). It has a SpecifiedGroupOptions property that you can specify the sorting criteria. Maybe try setting this in the designer and see if you can retrieve the sorting through your application and then try to change it if you can.
Similar Messages
-
Urgent : how I get tree type group total result
hi master
sir now system give me this type for result
PARENT ACCID DRBAL CRBAL
K1
K11
11 K1101 46291132
11 K1102 13182173
11 K1103 23784045
11 K1104
11 K1105
11 K1106
11 K1107 10001795
11 K1108 9083529
11 K1109
11 K1110 4224350
11 K1111
11 K1112 6696832
11 K1113 7963381
11 K1114 742766
1 K12
12 K1201 1486082
12 K1202
12 K1203
1 K13
13 K1301
1301 K130101
1301 K130102
1301 K130103
1301 K130104 1977616
1301 K130105
1301 K130106 736266
1301 K130107 396673
1301 K130108 42751
1301 K130109 298362
1301 K130110 187696
1301 K130111 537
1301 K130112 942
1301 K130113 987
1301 K130114 1272
1301 K130115 40000
13 K1302
1302 K130201
1302 K130202
1302 K130203
1302 K130204
1302 K130205 259941
13 K1303
1303 K130301
1303 K130302
1303 K130303 177716
13 K1304
1304 K130401
1304 K130402
1304 K130403
1304 K130404
1304 K130405
1304 K130406 809719
1304 K130407
1304 K130408 1786091
13 K1305
1305 K130501
1305 K130502
13 K1306
1306 K130601
13 K1311
1311 K131101 788780
K2
2 K21
21 K2101
2101 K210101
2101 K210104
21 K2102
2102 K210201
2102 K210202
22 K2205
2205 K220501
2205 K220502
220502 K22050201
220502 K22050202
220502 K22050203
220502 K22050204
22 K2206
2206 K220601
2206 K220602
but sir i need this type of result
PARENT ACCID DRBAL CRBAL
GROUP NAME K1
GROUP NAME K11
11 K1101 46291132
11 K1102 13182173
11 K1103 23784045
11 K1104
11 K1105
11 K1106
11 K1107 10001795
11 K1108 9083529
11 K1109
11 K1110 4224350
11 K1111
11 K1112 6696832
11 K1113 7963381
11 K1114 742766
TOTAL
1 K12
TOTAL
GROUP NAME
12 K1201 1486082
12 K1202
12 K1203
TOTAL
1 K13
13 K1301
1301 K130101
1301 K130102
1301 K130103
1301 K130104 1977616
1301 K130105
1301 K130106 736266
1301 K130107 396673
1301 K130108 42751
1301 K130109 298362
1301 K130110 187696
1301 K130111 537
1301 K130112 942
1301 K130113 987
1301 K130114 1272
1301 K130115 40000
13 K1302
1302 K130201
1302 K130202
1302 K130203
1302 K130204
1302 K130205 259941
13 K1303
1303 K130301
1303 K130302
1303 K130303 177716
13 K1304
1304 K130401
1304 K130402
1304 K130403
1304 K130404
1304 K130405
1304 K130406 809719
1304 K130407
1304 K130408 1786091
13 K1305
1305 K130501
1305 K130502
13 K1306
Sir I need total group by group father group total and child group total
Please help me how I get tree type group total resultHi master
thankyou for your reply
Sir,
i know and you see my working i get code form master table and get detal amount form other table
I have two table see table
Acctab Baltab
PARENT PCID
CHILD title
PCID amount
I need heretical result use this type of query but not success
please see my query and give me idea how I get here full tree
select test.child,test.pcid,baltab.pcid from (select acctab.child,acctab.parent,acctab.pcid
from acctab
start with acctab.parent is null
connect by prior acctab.child= acctab.parent) test,baltab
where test.pcid=baltab.pcid ;
CHILD PCID PCID
1 1 1
2 2 2
3 3 3
11 111 111
12 112 112
13 113 113
21 221 221
22 222 222
23 223 223
31 331 331
32 332 332
33 333 333
but I need this type result
CHILD PCID
1 1
11 111
12 112
13 113
2 2
21 221
22 222
23 223
3 3
31 331
32 332
33 333 -
Grand Totals functionality under Group and Sort
Hello community,
Does anyone know if there is a solution for rolling up text fields in the summary line item (under the Show Grand Totals functionality under Group and Sort)? I can only find that date fields and formula fields summarize. I would like to be able to summarize all the data in one line items so I wont have a really long schedule and I can present to my end users accordingly.
Thanks,
P6GURUYOUHope I understand, if you have the groups setup, you should be able to (CRXI instructions) right click on the item in the Details line, insert a summary, you can select sum, add the sum to the group. For the locations, insert a summary count, and add that to the groups.
What I do sometimes, is select the option to add summary to all groups, Perhaps change the font to red, I can see the totals
I want, and just suppress the other groups. Just a quick and dirty way to do the totals. -
Help required to sum up the group total .
Hi Friends ,
I would like to know how to sum the group of each department in bi publisher , i want to be handle in template .
A quick look at the xml data :
- <SAMPLEXMLREPORT>
- <LIST_G_EMPNO>
- <G_EMPNO>
<EMPNO>7698</EMPNO>
<ENAME>BLAKE</ENAME>
<DEPTNO>30</DEPTNO>
<SAL>2850</SAL>
</G_EMPNO>
- <G_EMPNO>
<EMPNO>7782</EMPNO>
<ENAME>Jim</ENAME>
<DEPTNO>10</DEPTNO>
<SAL>2450</SAL>
</G_EMPNO>
- <G_EMPNO>
<EMPNO>7566</EMPNO>
<ENAME>JONES</ENAME>
<DEPTNO>20</DEPTNO>
<SAL>2975</SAL>
</G_EMPNO>
- <G_EMPNO>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<DEPTNO>20</DEPTNO>
<SAL>800</SAL>
</G_EMPNO>
</G_EMPNO>
</LIST_G_EMPNO>
</SAMPLEXMLREPORT>
I am able to print the below output :
Dept 1 :
Employee Details ( name , id , salary )
Dept 2 :
Employee Details ( name , id , salary )
Now i would like to sum the salary of each department :
Output should be :
Dept 1 :
Employee Details ( name , id , salary )
Sum of salary : ??
Dept 2 :
Employee Details ( name , id , salary )
Sum of salary : ??
Could some one suggest me how to handle this ??
--KeerthiThanks so much ,
The following link helped me https://blogs.oracle.com/xmlpublisher/entry/averaging_your_totals
and your answer is same as what's given in the link .
--Keerthi -
How to store the value of sum of group in Crystal Report at the runtime!
Hello all,
I creates a Formula Field that hold the value of Sum of Group in Crystal Report. I would like to know how to store it in a variable and pass it to store procedure. Is it an option in Crystal report to do it. I knew that Crystal Report can cache the report for sharing. My detailed issue as following:
- Created a Formula Field named TOTAL AMOUNT that calculated the complex expression. This TOTAL AMOUNT is dynamic based on group and variables.
- I would like to store that value from TOTAL AMOUNT and pass it to the stored procedure parameter IN.
Any helps are much appreciated. Thanks.I doubt that this is possible since it would only calculate this value once the report has data. This sounds more like a report design question that should be asked over [here|SAP Crystal Reports;
-
Display of Report Totals of different groups
Hi I have a requirement in XML Publisher where in I need to display the Total of all the sub totals of the 3 groups which i am currently working on. I am able to display the sub group totals .
Example
A B
100 200 -----------Group 1
C D
30 50 -------------group 2
E F
250 300 -----------Group 3
380 550 -------Required(Group1+Group2+Group 3)
How should i do it in XML.
Can any body help me in how to achive the above total group values.
Thanks
Suresh SinghThe month data is dynamic column. I am attaching a small portion of my XML data.This is part of G1 and G9 for the month of APR-05.There can be more than one entry for APR-05 based in the value of G_POWER_STATION.
similarly there are other months. For each group I am using the sum on current group for ENGY_SCHD,RATE and AMT_RECO, which gives me the group total for each month. Same case for G_9
I want to add SUM(G_1-APR-05-RATE) to SUM (G_9-APR-05-RATE_UI,
Similarly others
<G_1>
<BILLING_MTH>APR-2005</BILLING_MTH>
<LIST_G_POWER_STATION>
<G_POWER_STATION>
<POWER_STATION>FSTPP</POWER_STATION>
<ENGY_SCHD>8342</ENGY_SCHD>
<RATE>8.08</RATE>
<AMT_RECO>9000</AMT_RECO>
</G_POWER_STATION>
</LIST_G_POWER_STATION>
</G_1>
<G_9>
<BILLING_MTH3>APR-2005</BILLING_MTH3>
<LIST_G_UI_>
<G_UI_>
<UI_UNITS>110</UI_UNITS>
<UI_PAID>299</UI_PAID>
<RATE_UI>2.72</RATE_UI>
</G_UI_>
</LIST_G_UI_>
</G_9>
I tried using <?sum(//ENGY_SCHD[../BILLING_MTH='APR-2005'])?> but it gives me zero as the ouput.If i remove the square braackets it adds the entire occurence of ENGY_SCHD.Am i doing it correctly
Message was edited by:
DhavalKatira -
Hi,
I have sql query which gives output of accounts and balance.
I have designed report to show chart of accounts and their balances.
How can I take group total fields to show sum of each level of accounts.
Level
Account
Header 3
Header 4
Header 5
Header 6
Header 7
1
Revenue
2300
2
Direct Income
300
3
Sales
300
4
Sales
300
5
In Store Sales
100
5
Online Sales
200
2
Indirect Income
2000
3
Interest
1100
4
Bank Interest
1100
5
Bank Interest A
400
5
Bank Interest B
700
3
Other Income
900
4
Other Income
900
5
Other Income
900
In my reports I have taken all the accounts and balances in five detail sections.
I want to create formula to show level wise addition of account balances.
Please reply.Thanks.Hi,
Try this code
{Level}=1 then {Header 3}
else if {Level}=2 then {Header 4}
else if {Level}=3 then {Header 5}
else if {Level}=4 then {Header 6}
else if {Level}=5 then {Header 7} -
Weekly Group Total and associated YTD total
Hello,
I need to show current week group total and total year to date of the same group. My columns are Model, Department, Issue. Currently, the report is grouped on Model, Department and Issue with a filter for date. Can this be done? Thank youCreate a formula field, say {@Current Week Amount} as (basic syntax):
if datepart("ww", {datefield}) = datepart("ww", CurrentDate) then
formula = {amount}
else
formula = 0
end if
You can then sum() this, or place it in a detail line, or whatever. It will only have a (non-zero) value when the date field is in the current week.
HTH,
Carl -
Formula help - Group totals for more than one date range
Post Author: melcaylor
CA Forum: Formula
I need to show in 3 columns
inside of a grouping that totals an amount field based on a date
range that amount was posted. So for example:
Billy Bob in the state of MA made $5.5m total, $800k in the last 21 days, $400k in the last 14 days and $150k in
the last 7 days.
I assume this is possible but I
just donu2019t know what type of formula to write to make it work. For this
example, there are 2 tables u2013 user table and $$ table. The User table has
the user name, the $$ table has the pay date and the amount.Post Author: SKodidine
CA Forum: Formula
You only need simple formulae in Running Totals to accomplish this.
1. Group by Name
2. Create the following Running Totals:
2.1 A running total to sum the pay amount for all records, and resets on 'Change of Group' of Name.
2.2 A running total to sum the pay amount and for 'Evaluate' click on the radio button next to 'Use a formula' and then click on X-2 button next to it.
In the formula workshop window type a formula such as: {table.payment_date} in (currentdate - 21) to currentdate;
For 'Reset' click on the radio button next to 'On change of group' and pick the group name.
2.3 Create another running total just as in step 2.2 above but change the formula to: {table.payment_date} in (currentdate - 14) to currentdate;
2.4 Create the last running total just as in step 2.2 above but change the formula to: {table.payment_date} in (currentdate - 7) to currentdate;
Hide the details section and in the group footer place text boxes with appropriate text and insert these running totals to give you the numbers you want.
The only issue I see with this is if a person was paid yesterday a sum of $25, then it will show $25 for total, last 7days, last 14days and also for last 21days. At first look it might be mistaken for $75. -
How to store running sum of group header fields
HI All,
I am bit confused how to do this so writing the post here. I have a group header which gets the amount spent by cost centre by account number
the group contains the following fields
[Account Number] [SDESCR] [sum of coscentre1] [sum of costcentre2] and so on.
The end result i get as follows
Account number Description Coscentrenumber1 CostCentrenumber2 and so on
100 cash at bank 6000 7000
200
and so on
now i want
Total Sumof(Costcentrenumber1) Sumof(Concentrenumber2)
how can I achieve this ? am confused how to store the value of [sum of costcentre1] into a shared variable and use this shared variable in page footer to display the total ?Let me be more clear I need the out out something like
Account number Description Costcentrenumber1 Costcentrenumber2 Costcentrenumber3
100 6000 7000 800
200 4000 5000 300
Toal 10000 12000 1100
the account numbers are placed in Group header so that we group all the transactions by account number. Say for example when i said account number 100 above in the backend
it is as follows
Account number Costcentrenumber1
100 2000
100 2000
100 2000
In the crystal the above logic is placed in Group header by creating Group Name fields
so that end result in the report it is shown as
Account number Coscentrenumber1
100 6000
Now in the report at the end i want the sum by Costcentrenumber.
as 10000 shown above.
Hope am clear. -
Hi, I am creating a report for Purchase Order with AUTHOR where the Store Proc returns QUANTITY ORDERED and QUANTITY RECEIVED columns along with the rest of the columns. I need to show the value of QUANTITY ORDERED on group header of the AUTHOR of
PO (Each PO can have multiple Authors) and QUANTITY RECEIVED in the Line Items under the PO Group which have multiple lines. When I sum the QUANTITY ORDERED and QUANTITY RECEIVED columns, the sum of QUANTITY RECEIVED is correct. But the Sum of
QUANTITY ORDERED (Group by Author) is getting summed up wrongly as many times as the No. of line items. How can I calculate the SUM(QUANTITY ORDERED).
Thanks in advance...Hi B Ashok Reddy:
Per my understanding that you have some sample data as below and you are using the tablix to design the report, when you are using the SUM(QUANTITY ORDERED) you got some error, right?
If the column QUANTITY ORDERED is group by the row group of Author, you can give the scope in the sum function below to sum:
=SUM(QUANTITY ORDERED,"Author")
OR you can right click the row group "Author" to select the Add Total - After.
If i have some misunderstanding, please try to provide some sample data from the table and also the report structure you have designed(Tablix, Matrix)
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
Hello,
I have this situation
Customer Rev$ Material Mat Qty
1 20 A 5
1 20 B 10
1 20 C 15
1 20 D 2
1 20 E 4
So customer 1 has a revenue of $20 from 4 materials.
I have a report
Mat A B C D E
Cust Rev
1 20 5 10 15 2 4
Tot 20
IThere are multiple customers, so the total revenue should be total of revenues of all customers. did a cross tab report with Rev$ in the text column. But I cannot get the total revenue. There is no option to show column totals.
I created a report variable, but the revenue get multipled by the number of materials. So in the above case I get $100 as the revenue.
Any ideas on how to do this?
Thanks,
Nikhilcreate group by customer
use manual runningn totals to sum each customer revenue and the overall revenue.
RESET
The reset formula is placed in a group header report header to reset the summary to zero for each unique record it groups by. (the reset value is placed in the group header of where you want to calculate by)
whileprintingrecords;
Numbervar X := 0;
CALCULATION
The calculation is placed adjacent to the field or formula that is being calculated.
(if there are duplicate values; create a group on the field that is being calculated on. If there are not duplicate records, the detail section is used.
whileprintingrecords;
Numbervar X := x + ; ( or formula)
DISPLAY
The display is the sum of what is being calculated. This is placed in a group, page or report footer. (generally placed in the group footer of the group header where the reset is placed.)
whileprintingrecords;
Numbervar X;
X -
Acounting the total of tables group by year
Hi there, I need help
I am writing simple query that gives the result on total counts by group and sort by year.
When I do single query it works
select to_char(date, 'yyyy') as year, count(*) as total from table_name group by to_char(date, 'yyyy') order by to_char(date, 'yyyy');
I need to use above query using through dba_tables. I have two thousand owners which has same tables.
thanks,all,
so far
This is what I have
set serveroutput on
declare
cursor c1 is select owner, from all_tables where table_name ='MESSAGE' order by owner;
sql_stmt varchar2(4000);
cnt_val number;
cnt_year date;
begin
for c1_rec in c1 loop
sql_stmt:= 'select count(*), to_char(date, "yyyy") from '||c1_rec.owner||' .MESSAGE';
execute immediate sql_stmt into cnt_val, cnt_year;
dbms_output.put_line (rpad(c1_rec.owner,20) ||' ' ||cnt_val|| ' '||cnt_year);
end loop;
end;
when I run the above query, the errors at line 1
ora-00904: "yyyy": invalid identifier
ora-06512: at line 12
any idea, please help me.... -
hi
i have a matrix report with 2 level groups above it. now i need to sum group 2 cloumn values for every row on the basis of level 1 group.
For example, I have Top level group like TUBEWELL TYPE ( values are DEISEL and ELECTRIC) and below it at lower level is OWNER (with values like PRIVATE, GOVT) repeating both for DEISEL and ELECTRIC.
Now I need to sum every row i.e Private and Govt for Diesel and Private and Govt for Electric (two sums in one row).
Wizard provides complete row total but not group total.
So ur help required guys!!
nadeem ameer
[email protected]Hi..
am not providing you the exact answer.
But you can refer to the PRODUCT ORDER PROPERTY in the reports help or on the website.
Basically, all you need to do is manipulate the product order property, reset at or may be even compute at properties in the summary/ formula column of your matrix report.
Swati -
Eliminating NULLs for SUM(current-group)
I face the following problem:
I have some NULL values in my data which I elimnated by a <?xdofx:decode(FIELD,'',0,FIELD)?>
add. I have defined a summary field with <?sum (current-group()/FIELD)?> that results in "NaN" because of the NULLs.
But decode doesn't work in the sum(c... ) !?
Any help is appreciated.
DirkHi,
I didn't know about the to_number, that's useful to know.
It get's a little ugly in your template but you can work around have the sum before the for-each. The answer is to have a for-each purely to create the sum. I've had to do it for a couple of templates.
I usually put the code in a template to make it easier to read and the not put too much code in to a cell in a table. Try the following:
<?template:t_sumdata?>
<?for-each:xxx?>
<?if:ELEMENT!=''?>
add to variable
<?end if?>
<?end for-each?>
<?end template?>
The above code can go anywhere in your template, I normally put them at the end. To reference this just put
<?call:t_sumdata?><?get variable value?>
where you want the total to appear.
Thanks
Paul
Maybe you are looking for
-
How does one get i movie to open . . . the "pinwheel" just keeps spinning
How does one get i movie to open? The pinwheel is in a perpetual state of spinning.
-
How do I get Firefox 8 to recognize the filetype of downloadable attachments on php boards?
After updating to Firefox 8, attachments on php boards (such mp3s or image files) are not recognized filetypes. When I click on them, or right click "save link as", the save window shows the attachment as "Index.php" and only offers to save it as a p
-
SQL query works in SSIS, SSMS/SQL server but fails in deployment?
The SQL query in my execute sql task is correct. It works in SSIS and SSMS also. But, it fails when I deploy my package. The error - Code: 0xC002F210 Source: MySQLTask Execute SQL Task Description: Executing the query "UPDATE [MyTable] SET MyCol..."
-
Create batch for 531 movement in transaction COR6N
Hi, I am using COR6n to record process order confirmations. As part of the usual 261 and 101 movements, I want to record a 531 (goods receipt of a bi-product). This is to record bi-product coming off the production line that can be used in other manu
-
I checked out Firefox 4 and was horrified by the new look. I'd like to have the latest version of Firefox, but I don't want to lose the look and functionality of my browser. I want my menu bar at the top, my bookmarks toolbar directly above the main