Click here to Skip to main content
12,817,112 members (33,672 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# CrystalReports

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?

Posted 9-Mar-11 22:02pm
Updated 9-Mar-11 22:58pm
Dalek Dave433.3K
Dalek Dave 10-Mar-11 3:58am
Edited for Readability.
Rate this: bad
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.
shaijuvjohn 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
Please Sign up or sign in to vote.

Solution 3


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[1].DataType = typeof(Int32);
dt.Columns[2].DataType = typeof(float);

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 2 Sep 2012
Copyright © CodeProject, 1999-2017
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