Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Two different group tree structure in a crystal report from MySql with C#

The following db having unique fields in all tables are ACCYEAR, BILLNO, BILLDATE.
How to get two different tree structure like the following.

database name 'billing'
table name: BillDetails
|**********************
|----------> fields (BILLNO: 1, AccYear: 13-14,  BillDate : 03/04/2013, CUSTNAME_AND_ADDRESS: ZYXDD)
|       |*********************************************************************************************************
|       |
|       |-------->table name: TransportDetails (record 1)
|       |	|     fields(Bill #     : 1
|       |       |  	    Acc_Year:    13-14 
|       |       |     	    Bill Date : 03/04/2013
|       |       |      	    Transport Sl# : 1
|       |       |      	    Trailer #     : TXT 4568
|       |       |      	    Driver #      : DRIVER1)
|	|	|
|       |	|		|---------->table name: Cargo Details: (record 1)
|       |	|		|                      fields(Bill #     : 1
|       |       |		|                      Acc_Year:    13-14
|       |       |		|                      Bill Date : 03/04/2013
|       |	|-------------->|                      Transport Sl# : 1
|       |       		|                      CargoSlNo:1
|       |       		|                      CargoPkgs: 45 WoodenCrates)
|       |			|
|       |			|---------->table name: Cargo Details: (record 2)
|       |                     				fields(Bill #     : 1
|       |                            			Acc_Year:    13-14
|       |                            			Bill Date : 03/04/2013
|       |                            			Transport Sl# : 1
|       |                            			CargoSlNo:2
|       |                            			CargoPkgs: 20 PLTS)
|	|
|       |-------->table name: TransportDetails (record 2)
|        	|     fields(Bill #     : 1
|               |  	    Acc_Year:    13-14 
|               |     	    Bill Date : 03/04/2013
|               |      	    Transport Sl# : 2
|               |      	    Trailer #     : TXZ 0541
|               |      	    Driver #      : DRIVER2)
|	 	|
|        	|		|---------->table name: Cargo Details: (record 1)
|        	|		|                      fields(Bill #     : 1
|               |		|                      Acc_Year:    13-14
|               |		|                     Bill Date : 03/04/2013
|        	|-------------->|                     Transport Sl# : 1
|               		|                     CargoSlNo:1
|               		|                     CargoPkgs: 52 CTNS)
|        			|
|        			|---------->table name: Cargo Details: (record 2)
|                             				fields(Bill #     : 1
|                                    			Acc_Year:    13-14
|                                    			Bill Date : 03/04/2013
|                                    			Transport Sl# : 1
|                                    			CargoSlNo:2
|                                    			CargoPkgs: 10 BALES)
|
|--------------> table name: DocumentDetails (record 1) :
|       |        Document-details-1:
|       |     
|	|
|	|
|       |---table name: ProductDetails:(record 1)------>| table name: ProductDetails:(record 1)
|       |					|       |  	Name : ccc
|       |					|       |  	Manufacturer: pppp
|       |					|       |  	Price : 45000
|	|					|	|
|       |					|	|---->|---TABLENAME:PODETAILS(RECORD 1)
|       |					|	      |---TABLENAME:PODETAILS(RECORD 2)
|       |					|
|       |					|
|       |					|------>| table name: ProductDetails:(record 2)
|       |	      	  			  	|	Name : GFFGH
|       |	          			  	|	Manufacturer: NUGK
|       |	          			  	|	Price : 1285000
|	|		  				|
|       |		  				|---->|---TABLENAME:PODETAILS(RECORD 1)
|       |		        		              |---TABLENAME:PODETAILS(RECORD 2)
|       |	     
|       |	
|       |	
|       |---table name: ProductDetails:(record 2)-------|-------->| table name: ProductDetails:(record 2)
|        					     	|      	  |  	Name : ccc
|        						|         |  	Manufacturer: pppp
|        						|         |  	Price : 840000
|	 						|	  |
|        						|	  |---->|---TABLENAME:PODETAILS(RECORD 1)
|        						|	        |---TABLENAME:PODETAILS(RECORD 2)
|        						|
|        						|
|        						|-------->| table name: ProductDetails:(record 2)
|        	      	  				  	  |	Name : GFFGH
|        	          				  	  |	Manufacturer: NUGK
|        	          				  	  |	Price : 950000
|	 		  					  |
|        		  					  |---->|---TABLENAME:PODETAILS(RECORD 1)
|        		        				        |---TABLENAME:PODETAILS(RECORD 2)
|
|
|
|-----------------> PAYMTDETAILS(multi records)
Posted
Updated 29-Mar-14 22:58pm
v2

1 solution

I'm not sure i understand you well, but in this case i'd suggest to use subreports.

Adding a Subreport to the Original Report[^]

If i'm wrong, please visit this link: Grouping Data Hierarchically[^] and follow the links provided on the left side of screen.
 
Share this answer
 

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