Sunday, 8 January 2012

Diffrent kind of rows in crystal report asp.net

Generating Rows With Logic Of 'Group By'


There were some condition where you require to filter your data accordingly with a single value,for eg. you want to show a product one side(lets say right side) and its all rows of its processing  in other.



For Such Cases You Have To Use Grouping Concept Of Crystal Reports.
Below Is An Sample Of It..

1)Create table table_Product,as i 've created below

 

2)Create  Another Table With Name table_Details,as i 've created below


3)Lets says you've entered or the values under those table are like Below..

table_Product
 

table_Details












4)Now Add A Crystal Report And A Asp.net Page with name CrystalReport.rpt and CReport.aspx
respectively as Below


5)Now Proceed Step 1  to  7 From My Previous Example Creating Basic Example Of Crystal Report And Make Your Tables Attached To Your Crystal Report As Below.

6)Now Here Is The Thing Comes!
Right Click to The Group Name Field And Click On Insert Group As Above,
After that a pop up window will appear,Now Select the Column Name By Which you Need To do 'Group By' as below.



7)By Default The A Group #1 Name Object Is Now Created With Group header section and Group footer section,as below.




8)Now Add Details By Draging To Section3, Group header section & Group footer section and you'll get the result




I've done changes as below two images you can change as per your requirements.
I)


II)


9)Finally When You Generate The Out Put Will Be Like This...




Download Sample From Here


No comments:

Post a Comment

Print Only Grid View in ASP.net

ASP.net How to Print Only GridView < div id ="gridviewDiv" >   < asp:GridView ID ="gridViewToPri...