Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# CrystalReports
Hi,
 
I'm new to crystal reports.
 
I have a crystal report having a running total field.
The field data type is int32 in the dataset and have the integer values in the data set.
I have added the running total value of the field as sum, but it only displays the number of records in the report (count of records).
 

How can I get the sum instead of count?
 
Thanks.
Posted 9-Mar-11 21:02pm
Edited 9-Mar-11 21:58pm
Dalek Dave432.8K
v2
Comments
Dalek Dave at 10-Mar-11 3:58am
   
Edited for Readability.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Have a look at this very good article: Step by Step Creation of Crystal Report using its Features Group, Graph, Cross-Tab and Sub Report[^]
 
Either, it would be a running summary or a grouped one. Look which one fits in for you and implement it.
 
For grouping, it's already there in article. For running summary:
1. right click on report click Insert->Summary
2. select the field you want to sum
 
If it's too complex, use formula fields.
  Permalink  
Comments
shaijuvjohn at 10-Mar-11 4:13am
   
Thanks for your reply.
I have inserted summary of the field but it not displays the sum. It displays the count as already shown.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

hi

because in place of your code, you have a type casting from (decimal,int) to string
you must find that an solve it

Something like this (in this sample default datatype is string)
 

dt = new DataTable("TBL");
dt.Columns.Add("comment");
dt.Columns.Add("num1");
dt.Columns[1].DataType = typeof(Int32);
dt.Columns.Add("num2");
dt.Columns[2].DataType = typeof(float);
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 2 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100