Click here to Skip to main content
16,012,168 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have some fields in a table, in which 'ID' column is also there. And I want to group the records according to the same.eg,

Table1

ID Start   End      Total
----------------------
1  101     200       100
1  201     300       100
2  301     400       100
2  401     500       100


This is a table, on which I want to generate Crystal Report as follows,
Grouping will perforn on column 'ID', Total will get added.

ID  Start  End  Total
--------------------
1   101    300   200
2   301    500   200

Please help asap, thanks in adv.
Posted
Updated 28-Aug-11 23:18pm
v2

First prepare ADO.NET Dataset in your Application.

Then Drag & Drop the Column required for U.

& in code Send the SQL Select Statement with Group by Clause.
 
Share this answer
 
Comments
Harshad-HBK 29-Aug-11 6:10am    
Thanks 4 the solution...
still getting error to retrieve group total.
Create a group for ID column in crystal report.

Drag column ID, Start, End on crystal report between the group header and footer.

After that create a running total for column total.

Then drag the running total variable on crystal report
 
Share this answer
 
Comments
Harshad-HBK 29-Aug-11 5:47am    
Thanks 4 the solution...
still getting some error in getting running total.
It displays all total, instead group total.
Yogesh Pednekar 29-Aug-11 6:23am    
On running total box you will find evaluate

select the change of group radio button and select the id group

do same with reset of running total

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900