Summarize (sum) a field in a child group to a parent group section
Can someone tell me how to insert a summary (sum) of a field in a child group to a parent group? The column is not in the detail row, only a group section.
Hi Mark,
As I understand from the description, you have 2 groups(child and parent) and you want to insert summary of the field in child group to a parent group.
Try following........
Go to Insert -> summary
Insert summary based on required field and then under the option "Summary Location" select the Parent Group.
Please let us know if you are looking for something else.
Regards
Ankeet
Similar Messages
-
Hide parent group if child groups are hidden
I have SSRS 2005 report.
Report structure - To show a particular account transactions for every company.
So user will select account then i have to show all transactions for that account for all companies.
Parent group - Account
Child group - Company
Details section is like below,
transactions id transaction type debit
credit difference
In the groups visibility for compnay group (chile group) i have set condition if diff is zero then hide
so its hiding child groups. but showing account i.e. parent group.
My Report looks like,
Account : Acc001 (Parent group)
Company - ABC (child group)
transactions id transaction type debit
credit
difference
t1 type 1 4
t2 type 2
4
total by company 4 4 0
Company - XYZ (child group)
transactions id transaction type debit
credit difference
t3 type 1 100
t4 type 2
100
total by company 100 100
0
total by account 104 104 0
so i am hiding companies ABC and XYZ but report still show last row total by account. so if abc and xyz are hidden i want to hide that account group (for e.g. Acc001).
h2007Hi h2007,
According to your description, you have a report with detail rows showing transaction information, child group showing companies, and parent group showing account. Now you want to hide the detail row if the difference(debit-credit)=0, and if the detail row
is hidden, you want to hide the company as well. Right?
In Reporting Service, we can’t use a property of a text box as an expression when we use IIF() function to evaluate. But we can put this whole IIF() expression into a IIF() function for another textbox or group to set visibility. We tested your case in our
local environment. It works fine and completely achieve your goal. Here are steps and screenshots for your reference:
Create a table as described.
Right click on any textbox of detail row. Select Properties.
Click on Visibility tab, put this text into expression:
=IIF(SUM(Fields!Debit.Value)-SUM(Fields!Credit.Value)=0,true,false)
Select toggled by its parent group (Company).
Repeat step2 and step3 for each textbox of detail row.
Right click on textbox of Company. Select Properties.
Click on Visibility tab, put this text into expression:
=IIF(IIF(SUM(Fields!Debit.Value)-SUM(Fields!Credit.Value)=0,true,false),true,false)
Select toggled by its parent group (Account).
Right click on textbox of Account. Select Properties.
Click on Visibility tab, put this text into expression:
=IIF(IIF(SUM(Fields!Debit.Value)-SUM(Fields!Credit.Value)=0,true,false),true,false)
Go to Properties window, set InitialToggleState Expanded for Company and Account textbox
Save and preview.
Reference:
Expression Examples (Report Builder and SSRS)(See Properties->Visibility)
Expression driven visibility in a report
Best Regards,
Simon Hou -
How to summarize the formula field for grand total
Hi All
Iam desinging a report in which iam facing a problem to summarize the formula field . This formula field contains sum calculation like
formula name is @sales
Sum ({@DTM200}, {@SaleMan})+Sum ({@DTM500}, {@SaleMan})+
Sum ({@TM500}, {@SaleMan})+Sum ({@TM1000}, {@SaleMan})+
Sum ({@HTM500}, {@SaleMan})+Sum ({@HTM1000}, {@SaleMan})+
Sum ({@WM500}, {@SaleMan})+Sum ({@WM1000}, {@SaleMan})+
Sum ({@CURD}, {@SaleMan})+Sum ({@Buttermilk}, {@SaleMan})+
Sum ({@BULKWM}, {@SaleMan})+Sum ({@BULKTM}, {@SaleMan})
the fields are summary fields and iam calculating all these fields to get the final result . Upto this it is working fine but finally i want to calculate the grand total of this formula '@sales' how should do this
Thanks in advanceHi,
If your formula name is @Sales you click the @Sales formula then Click Insert from Menu bar and click Summary.
Then click Grand Total.
Regards,
Clint -
What is the difference between nvl(sum (field), 0) & sum(nvl (field,0)) ?
For the below table data i don't see any different in results
CREATE TABLE FRUITS
TYPE VARCHAR2(10 BYTE),
VARIETY VARCHAR2(10 BYTE),
PRICE NUMBER(18,2)
TYPE VARIETY PRICE
apple gala 2.79
apple fuji 0.24
apple limbertwig 2.87
orange valencia 3.59
orange navel 9.36
pear bradford 7.77
pear bartlett 7.77
cherry bing 2.55
cherry chelan 6.33
pear bradford
navel 6.39
select variety, nvl(sum(price),0)
from fruits
group by variety;
VARIETY NVL(SUM(PRICE),0)
limbertwig 2.87
bartlett 7.77
bing 2.55
marathon 0
gala 2.79
fuji 0.24
navel 15.75
bradford 7.77
chelan 6.33
valencia 3.59
select variety, sum(nvl(price,0))
from fruits
group by variety;
VARIETY SUM(NVL(PRICE,0))
limbertwig 2.87
bartlett 7.77
bing 2.55
marathon 0
gala 2.79
fuji 0.24
navel 15.75
bradford 7.77
chelan 6.33
valencia 3.59
no difference in output.
what is the difference?
Thanks in advanceDo you see the difference now?
PRAZY@11gR1> create table testing(field number);
Table created.
Elapsed: 00:00:00.10
PRAZY@11gR1> insert into testing select null from dual connect by level<=5;
5 rows created.
Elapsed: 00:00:00.00
PRAZY@11gR1> select * from testing;
FIELD
Elapsed: 00:00:00.01
PRAZY@11gR1> select sum(nvl(field,1)) from testing;
SUM(NVL(FIELD,1))
5
Elapsed: 00:00:00.00
PRAZY@11gR1> select nvl(sum(field),1) from testing;
NVL(SUM(FIELD),1)
1
Elapsed: 00:00:00.00In the former, we are substituting 1 to null value and summing-up. hence we got 5. in the later, we are summing-up the null, which is null and substituting 1 if the result is null. so we got 1.
Regards,
Prazy -
Sum calculated field in report
Hi, I have a report that groups by employee then by machine. In this report I sum several fields, but need to sum a calculated field and can't figure it out. This is the calculation:
<?( QTY_MOVED) div ( TIME +.001 ) div ( INVERSE + .001)?>
This is a total field using a field that works fine.
<?sum(current-group()/QTY_REJ)?>
How do I incorporate the calculation in the <?sum(current-group()/.............I get errors if I just put in the calculation above.
thanks!Thank you for your help. After taking your advice and getting it to work by messing around with the brackets, management has changed their mind on the calc. Now they want me to use this calculation:
SELECT EMPLOYEE, SUM(QTY_MOVED), SUM(QTY_REJ), SUM(TIME), (nvl([b]sum(QTY_MOVED),0)/nvl(sum(TIME),0))/nvl(sum(INVERSE),0) eff ,'DIRECT'
FROM VW_TIMETRACK
WHERE START_DATE >= :BEGIN
AND START_DATE <= :END
AND WORK_ORDER <> ' '
GROUP BY EMPLOYEE
to get the average. Now the weird thing is, I can get the value in toad, and I can get it to output in raw xml data, but when I try to add the eff field right next to the sum(time) field in the word form, nothing shows up. Absolutely no data. But it is in the xml. I'm using <?sum(current-group()/EFF)?> , just like I am for <?sum(current-group()/TIME)?> . I've made it text, numeric, decimal. Nothing is coming out. -
Sum the sum of fields in crystal report
In crystal report 2008, i have rows of data grouped by document number. Sum of each document (RTotal1) display at Group Footer.
At the Report Footer level, I want to display the Grand Total. In formula workshop, I tried to add a formula to sum RTotal1 above. However, error message indicated 'this field cannot be summarized'.
Second try: In Running Total Fields, I tried to add RTotal1 above to the field but error message indicated 'invalid field selection'. Any idea what's the proper way to sum the sum of fields?You need to use a variable, create 3 formula
@reset
whileprintingrecords;
global numbervar GTotal:=0;
//place this in report header, or higher grou header as appropriate
@Eval
whileprintingrecords;
global numbervar GTotal:=GTotal + Sum( valuefield, groupfield);
// place this in group footer where your sum shows
@display
whileprintingrecords;
global numbervar GTotal;
//Place this in report or higher group footer
Ian -
Problem in sum a field through select command
Dear Sir(s),
I want to sum kbetr (no. of packing) for same knumv(invoice no.) in table konv.
e.g.
invoice no. no. of packing
(knumv) (kbetr)
001 2
001 3
002 4
002 5
result should be -
invoice no no. of packing
001 5
002 9
code-
select knumv kschl sum(distinct kbetr)
from konv
into table it_konv
for all entries in it_vbrk
where kschl = 'ZFQT'
and knumv = it_vbrk-knumv
group by knumv kbetr.
error showing - unkown col. sum(distinct field list.
Please help me immediately.
thanks,
R.KapoorHi..
Change ur Select statement as below .
<b>select knumv sum(kbetr)</b>
from konv
into table it_konv
for all entries in it_vbrk
where kschl = 'ZFQT'
and knumv = it_vbrk-knumv
<b>group by knumv .</b>
Here you need not to Retrieve the Field KSCHL since it is anyway given in the WHERE clause.
Let me know incase of any other issue.
<b>Reward if Helpful.</b> -
Cannot summarize my calculated field(number)
Post Author: bwebb
CA Forum: Formula
I am using Crystal Reports XI version 11.5.3.417
My calculated field formula is:
IIF({bw_spread.fy_period}=totext(dateadd("m",3,{@max_data_date}),"yyyy.MM"),{bw_spread.actual_cost},0)
bw_spread.fy_period (string) and typical data = 2008.04
@max_data_date (datetime) and gets 3 months added, then turned into text in the same format as fy_period
bw_spread.actual_cost(number)
It takes a text field that has the Fiscal Period and compares it to the a Date that has been re-formatted as text, then returns the actual cost if they are equal else zero.
The formula works and returns a number and shows up nicely in the report. The problem is, that I cannot SUM this field in the group footers.Post Author: V361
CA Forum: Formula
This may not directly apply to your situation, but here is something I found.
Create 3 formulas as below ;
Formula 1 :- RunningTotalName
WhilePrintingRecords;
CurrencyVar Amount;
Amount := Amount + {Customer.Last Year's Sales}
Place the above formula on the details section . and suppress this
formula if u dont want to display .
Formula2 :- Display
WhilePrintingRecords;
CurrencyVar Amount
Place this formula on PageFooter Section
formula3 :- AmountToReset
WhilePrintingRecords;
CurrencyVar Amount := 0;
place this formula on PageHeader section and suppress the same. -
Parent / Child Groups in Portal with LDAP
Heya,
we are using EP 7 on SP 10 (NW 7), for User Authentication we use the UME with a configured (writable) LDAP
Server as backend with a flat hierarchie. We have a Federated Portal Landscape with
3 Portals connected to one "main" portal and using Remote Role Assignement on the main portal for
our right managenemt.
Remote Roles which are added to Groups are working fine, but as soon as we try to use
the parent/child group functionality we are facing the problem that the user who logs on
has no access to anything in this group.
According to http://help.sap.com/saphelp_nw04s/helpdata/en/af/0cfc3f09c2c442e10000000a1550b0/frameset.htm
the only restriction for the use of child / parent groups is that:
"If user management is set up with write access to an LDAP directory, the following restriction applies:
When assigning members to a group that is stored in the LDAP directory, you can only assign users or
groups that are also stored in the LDAP directory. You cannot assign users or groups from the database
to groups from the LDAP directory. "
We fullfill the above condition (everything is LDAP based) - sooo: Any Hints for me / Someone facing
the same problem.
Thanks,
MarcoHi Murali,
User Configuration
A particular company has the following setup:
● Two roles: External and Internal
● The role Internal contains users who also belong to two user groups: N.America and Asia
● User A belongs to both the role Internal and the user group N.America
● User B belongs to both the role Internal and the user group Asia
● User C belongs to the role External
Conditions Defined in Portal Display Rules
1. If Group = N.America
Then Portal Desktop = Orange Flavor
2. If Role = Internal
Then Portal Desktop = Green Flavor
3. If Group = Asia
Then Portal Desktop = Blue Flavor
4. If Role = External
Then Portal Desktop = Red Flavor
Note that user A matches conditions 1 and 2; (ii) user B matches conditions 2 and 3; and (iii) user C matches condition 4.
Results
According to the list of priorities, these are the results:
● User A receives portal desktop "Orange Flavor" (according to condition 1 which has priority over rule 2)
● User B receives portal desktop "Green Flavor" (according to condition 2 which has priority over rule 3)
● User C receives portal desktop "Red Flavor" (according to condition 4)
still any help on portal disktop rules to can see this link http://help.sap.com/saphelp_nw70/helpdata/EN/4b/29cf122f414721964269e1b675d62c/frameset.htm
if helpful don't to give points
thanks
best regards
ep -
Trouble when attempting to Sum Calculated Field.
I had to create a calculated field called RI_Limit which contains static data. (Developers/DBA could not enter it into the database at this time, so this was a work around.
The calculated field is setup as such:
=iif(Fields!Location_LOCATION_NAME.Value = "a", 8, iif(Fields!Location_LOCATION_NAME.Value = "b",2, iif(Fields!Location_LOCATION_NAME.Value = "c",0, iif(Fields!Location_LOCATION_NAME.Value = "d",0, iif(Fields!Location_LOCATION_NAME.Value = "e",1, iif(Fields!Location_LOCATION_NAME.Value = "f",1, iif(Fields!Location_LOCATION_NAME.Value = "g ",0, iif(Fields!Location_LOCATION_NAME.Value = "h",0,iif(Fields!Location_LOCATION_NAME.Value = "i",4,iif(Fields!Location_LOCATION_NAME.Value = "j A",0,iif(Fields!Location_LOCATION_NAME.Value = "k",0,iif(Fields!Location_LOCATION_NAME.Value = "l",7,iif(Fields!Location_LOCATION_NAME.Value = "m",0,iif(Fields!Location_LOCATION_NAME.Value = "n", 1, iif(Fields!Location_LOCATION_NAME.Value = "o",0, iif(Fields!Location_LOCATION_NAME.Value = "p",1, iif(Fields!Location_LOCATION_NAME.Value = "q",3, iif(Fields!Location_LOCATION_NAME.Value = "r",1, iif(Fields!Location_LOCATION_NAME.Value = "s",1, iif(Fields!Location_LOCATION_NAME.Value = "t",3, iif(Fields!Location_LOCATION_NAME.Value = "u",5,iif(Fields!Location_LOCATION_NAME.Value = "v",0,iif(Fields!Location_LOCATION_NAME.Value = "w",0,"NA")))))))))))))))))))))))
and I setup a textbox with that expression and the numbers fill in correctly with its cooresponding site name.
However, when I go to sub total or total, I get a much larger number than expected. (See screenshot)
I have searched the internet on a way to calculate both the total by Location Level 2 and LOB total, but nothing that pertains to the specific issue where by calculated field contains static data. Nothing I try produces an accurate sum. Any suggestions?Hi Katherine,
Sorry for taking a few days to reply.
I tried the suggestion, but it it still not summing my calculated fields. The total row will calculate my other cells okay but not the calculated fields that I had to add to the report. When I attempted to write an expression to sum the calculated
fields I get the following error message.
The expression used for the calculated field '=sum(iif(Fields!Location_LOCATION_NAME.Value = "test", 8, iif(Fields!Location_LOCATION_NAME.Value = "test1",2, iif(Fields!Location_LOCATION_NAME.Value = "test2",0, iif(Fields!Location_LOCATION_NAME.Value = "test3",0, iif(Fields!Location_LOCATION_NAME.Value = "test4",1, iif(Fields!Location_LOCATION_NAME.Value = "test5",1, iif(Fields!Location_LOCATION_NAME.Value = "test6 ",0, Fields!Location_LOCATION_NAME.Value = "test7",0,Fields!Location_LOCATION_NAME.Value = "test8",4,Fields!Location_LOCATION_NAME.Value = "test9",0,Fields!Location_LOCATION_NAME.Value = "test10",0,Fields!Location_LOCATION_NAME.Value = "test11",7,Fields!Location_LOCATION_NAME.Value = "test12",0,Fields!))' includes an aggregate, RowNumber, RunningValue, Previous or lookup function. Aggregate, RowNumber, RunningValue, Previous and lookup functions cannot be used in calculated field expressions.
The Espression for the calculated field I am attempting to sum is the following: -
How to sum a field in smartform
hi experts,
i m new to smartform. i made a smartform in which i get the output in a tabular form......
i want to sum a field. how can i get the sum in the footer?Hi
Welcome to SDN forum
see this and doa ccordingly
Subtotals - Check the link...
Re: Subtotal with Table Node in smartforms
You can use the PROGRAM LINES node to calculate the page totals in Table node.
Table Node has three sections:
Header: (Triggered once in the beginning of a page)
Create a Program lines node to reset the value of TOTAL to 0.
Main Area (For each row of internal table)
Create a Program lines node to add the Value to TOTAL
Footer (Triggered once in the End of a page)
Display the TOTAL
Note: 1) You can declare the TOTAL variable in the GLOBAL Definitions under GLOBAL DATA.
2) In the PROGRAM lines always pass the TOTAL in both INPUT and OUTPUT parameters
<b>Reward points for useful Answers</b>
Regards
Anji -
Does any one know how to sum a column upon the field change of another column? For instance; a construction estimate is dividedinto, say 50 divisions (categories). Each entry into my general ledger, a numbers spread sheet, has a column for, Job, and division. To bill a job I would filter by job name, then sort the division column, accending. I would then right click, and sum after field change. In this way I would have the sum of each divisions costs to date, and compare it with the original estimate. The new numbers update does not seem to have this feature, (sum after field change). Does anyone know how to accomplish this, perhaps with sum if?
Numbers seems to perform calculations when any dependencies are changed. so entering a new number should cause a sum to update.
try this as an experiment:
in a small table make the last row a footer row then in footer of column A enter the formula:
=sum(A)
like this:
now enter values in the column: -
How to deal with table.Field/sum(table.Field) BIEE
I have a question with this table.Field/sum(table.Field),
and another case is: one field of table /another field of a table, but these two tables not directly relation, such as: one day sales(one table)/the last day sales(another table)The way to go is hierarchical field names, as it has been said.
What would give you more flexibility, would be to give your element page's fields logical names. This would lead to building blocks, which can be freely combined. Any logic within the building blocks would not change at all, and logic going beyond a block would be straightforward to set up.
Hope this can help.
Max Wyss. -
Idoc to jdbc :On the basis of field WERKS, the child segments should get re
We are working on IDOC to JDBC scenario.
In my IDOC INFREC.INFRECMASS01 has one segment E1E1NAM( parent segment), inside this parent segment we have one child segment E1E1NEM containing two lines. On the basis of one field WERKS, the child segments should get repeated in the target but in the target side we are getting only one of the values of WERKS .
We have used SPLIT BY VALUE(each value) on WERKS but still only one of the values are coming on the target side .
pl help
rgds
arunahi arvind ,
i sent the source /target every thing in ur rediffmail id , we tried to change the context of WERKS TO E1EINAM ,removed split by value , but got an error
Cannot produce target element /ns0:MT_IB_VENDORISL/STATEMENTNAME[2]/si_sku_vendor_link/ACCESS. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
pl suggest ...
rgds
arun -
Hi There,
I am trying to sum a field in a repeat region.
That is, the repeat region displays on page as per normal but then have a total field based on the sub total fields stored in the data base for each record.
Any help is appreciated.
CheersHere's a quick idea of how to do it in CF. If you use PHP the principle would be the same.
<cfset ThisRowTotal = 0 >
<cfloop query="getPageLinks">
<cfset ThisRowTotal = ThisRowTotal + YourSubTotalVariable>
<cfoutput>#ThisRowTotal#<cfoutput>
</cfloop>
That's how it would look, what it is doing is each loop it is adding that loop's subtotal to the "ThisRowTotal" variable, then outputting it, so each loop will show the cumulative sub total.
Hope this helps.
Lawrence Cramer - *Adobe Community Professional*
http://www.Cartweaver.com
Shopping Cart for Adobe Dreamweaver
available in PHP, ColdFusion, and ASP
Stay updated - http://blog.cartweaver.com
Maybe you are looking for
-
Incoterms in Intercompany Billing Document
My Dear SAP Mentors, Can you please let me know that from where in "Purchase Order" incoterm appears at item level... In the concerned PO at Header level there is a seperate incoterm for e.g. DDP Jyderup...I know this comes from the vendor master rec
-
"Allow power button to put the computer to sleep" setting is not available but button does it anyway
This has never happened before. Computer stayed at gray screen with no progress wheel so I held the power button to shut it down. Since startup afterwards the power button sleeps the computer. There's no "allow power button to put the computer to sle
-
Adapter Engine Message in Delivering Status
Hi All, Any idea how to cancel/delete the messages which are in delivering status in Adapter Engine. In my case a single EOIO message is stuck in the AE with delivering status. Other messages are flowing successfully using the same cc. Earlier during
-
Replicate a sequence of operations -DIAdem
Hello Everyone, I am new to DIAdem and I am exploring a method to repeat a standard sequence of operations for 85-90 channel groups. The task goes like this: Every channel group has a set of three channels, in which some 7 - 8 mathematical operations
-
User can't enter price in AP Invoice
Hi Our client is on SAP Business One 8.8 (8.80.233) SP: 00 PL: 15. Users who have a 'Limited Financials' license should be able to process AP Invoices. The system does allow them to open the AP invoice and enter all information except for the price