This is a migrated thread and some comments may be shown as answers.

Summarizing Group Data (Newbie question!)

1 Answer 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
IIJ Tech Support
Top achievements
Rank 1
IIJ Tech Support asked on 10 Jun 2010, 03:46 PM
I'm just learning Telerik and am fairly new with C# and VS as well, so my apologizes for how simple a question this must be.

I have two tables: Order_Header and Order_Details.  Every order has a single entry in Order_Header and multiple entries in Order_Details (one for each product purchased).  

Order_Header: [OrderID], [OrderDate], [OrderNumber], [Taxes], [ShippingCost], [OrderTotal], [GST], [PST], [HST]
Order_Details: [DetailID], [OrderID] (ref Order_header), [ProductID], [Quantity], [SellingPrice]

My report is grouped by [Order_Header].[OrderNumber] (unique to each individual order).  
The Group Header shows [Order_Header].[OrderNumber], [Order_Header].[ShippingCost], .[GST], .[PST], .[HST]
The report details shows [Order_Details].[ProductID], [Order_Details].[Quantity], [Order_Details].[SellingPrice]
Ideally the report footer will summarize Quantity, Selling Price, ShippingCost, GST, PST, HST

My challenge is this: If i do SUM(ShippingCost) in the report footer, it sums it once per every item in Order_Details, rather than once per Order_Header.  Is there a solution to this?  Sum by group or somesuch?  I'm also not above accumulating a variable in the codebehind if someone is kind enough to explain how.

Thanks!

P.S. Windows 7, Visual Studio 2008, Telerik Reporting Q1 2010, and Chrome/Firefox/Opera/Safari/IE for browser

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 15 Jun 2010, 05:03 PM
Hello IIJ Tech Support,

As explained in the Understanding Report Sections help article - the Report Footer section is used to print report totals or other summary information for the entire report. To achieve the desired effect you have use the SUM(ShippingCost)  in a Group Footer section, this way the Sum will aggregate the ShippingCost only for the group.

Sincerely yours,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
IIJ Tech Support
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or