Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends, Please help me. Multiple table join with grouping in MySql with C# to get data in crystal report.

i have tried the following for your reference,

tableONE(BILLNO,FINYEAR,CUSTNAME,ADDRESS,CITY)
TABLEtwo(BILLNO,FINYEAR,VEHICLEDETAILS)
TABLEthree(BILLNO,FINYEAR,PROD_SLNO,PRODUCTDETAILS)
TABLEfour(BILLNO,FINYEAR,PROD_SLNO,PRODUCTDETAILS,ACCESS_SLNO,PRODACCESS,ACCESS_QTY)
TABLEfive(BILLNO,FINYEAR,PROD_SLNO,PRODUCTDETAILS,ACCESS_SLNO,PRODACCESS,DELIVERYFEEDBACK)

DELIMITER $$

CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_BILLDetails`(IN billNo DECIMAL,IN finYr INT)
BEGIN
SELECT DISTINCT * FROM tableone
left join tabletwo ttwo on tableone.BillNO = ttwo.BillNO
left join tablethree tthree on tableone.BillNO= tthree.BillNO
left join tablefour tfour on tableone.BillNO= tfour.BillNO
left join tablefive tfive on tableone.BillNO= tfive.BillNO
where tableone.BillNO = billNumber and BillNO .FINYEAR = finYr;
END $$

DELIMITER ;

Here i need the output is table-wise against BILLNO = FINYEAR
Posted

1 solution

 
Share this answer
 
Comments
Murugan.NM 10-Mar-14 5:52am    
Hi Mr.Raja. I would like to do it through programmatically (by using join and group) in Store Procedure and by passing Parameters. Please help me in this as it is urgent to complete.
thatraja 10-Mar-14 5:58am    
I didn't use storedprocedure much with crystal reports.

Update your question with more details(including screenshots), someone could help you, possibly me too.

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