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

Go Back  Xtreme .NET Talk > .NET > Database / XML / Reporting > Crystal report, display Sum in Group Header.


Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2006, 11:27 AM
imranIBM imranIBM is offline
Newcomer
 
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)

Row#1....3
Row#2....2


My incorrect result:

Group 1 Total - 3 (First row value)

Row#1....3
Row#2....2

can anyone please help.
Reply With Quote
  #2  
Old 10-17-2006, 12:34 PM
TMI TMI is offline
Newcomer

Preferred language:
vb.net
 
Join Date: Oct 2003
Posts: 16
TMI is on a distinguished road
Default

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
Reply

Bookmarks

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 10: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-21-2004 12:36 AM
how to display the print button in .net crystal report after installed crystal report fansh Database / XML / Reporting 0 10-08-2003 10:06 PM
Multi-table selection problem w/ SUM(), LEFT OUTER JOIN and GROUP BY wyrd Database / XML / Reporting 6 06-09-2003 09:56 PM

Advertisement:







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.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
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..
subscribe