Database / XML / Reporting Topics include: ADO.NET, SQL, XML structures and schemas, Crystal Reports, and other reporting tools

Enjoy an ad free experience by logging in. Not a member yet? Register.
Go Back  Xtreme .NET Talk > .NET > Database / XML / Reporting > Crystal report, display Sum in Group Header.

Thread Tools Display Modes
Old 07-26-2006, 10:27 AM
imranIBM imranIBM is offline
Join Date: May 2005
Posts: 4
imranIBM is on a distinguished road
Default Crystal report, display Sum in Group Header.

I couldn't find any category for crystal reports so I am writting here. Sorry for that.

In my report each row displays the maximum { Max(field) } value of a set of feilds using Max function. These rows are in each Group.

I want to display the sum of these row in the Group Header at the top of each group. The Sum() function doesnot allow me to do the sum of Max fields, so I am adding each row's value to a variable and displaying that variable in the Group Header.
Variable x;

x = x + Maxfield;

But it displays only the value of the first row.

Correct result:

Group 1 Total - 5 (Sum of 3 + 2)


My incorrect result:

Group 1 Total - 3 (First row value)


can anyone please help.
Reply With Quote
Old 10-17-2006, 11:34 AM
TMI TMI is offline

Preferred language:
Join Date: Oct 2003
Posts: 16
TMI is on a distinguished road

In Crystal Reports you can insert a summary object that will return the sum of which ever field you wish. You can find it on the insert tool bar and under teh Insert pull down menu.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report display blocks Jelmer Database / XML / Reporting 0 08-29-2006 09:51 AM
Crystal Report Display problem bungpeng Database / XML / Reporting 0 11-02-2004 03:34 AM
Display Crystal Report based on date??? dakota97 Database / XML / Reporting 0 09-20-2004 11:36 PM
how to display the print button in .net crystal report after installed crystal report fansh Database / XML / Reporting 0 10-08-2003 09:06 PM
Multi-table selection problem w/ SUM(), LEFT OUTER JOIN and GROUP BY wyrd Database / XML / Reporting 6 06-09-2003 08:56 PM


Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..