troubleshooting Question

Generate Custom Bill with multiple records in Crystal Report

Avatar of Manoj Patil
Manoj PatilFlag for India asked on
Crystal ReportsC#Microsoft SQL Server 2008
43 Comments2 Solutions4119 ViewsLast Modified:
Hello Experts,
I have developed an ERP System in
My SQL select statement is following.

string ViewBill= "SELECT CustomerCompanyDetails.CustomerCompanyName, GeneratedBill.ChargableInText, TaxationDetails.ECCNumber, TaxationDetails.TINNumber, ustomerCompanyDetails.CustomerCompanyAddress, CustomerCompanyDetails.PostalCode, tblPostalCodes.Municipality, tblPostalCodes.StateProvince, CustomerCompanyDetails.CustomerCode, GeneratedBill.PurchaseOrderNumber, PurchaseOrderClient.DateOfIssue1, CustomerCompanyDetails.CreditPeriod, CustomerCompanyDetails.CustomerCompanyID, PurchaseOrderClient.PODescription, GeneratedBill.MaterialName, PurchaseOrderClient.ratePerQty, PurchaseOrderClient.MaterialName, PODescription, ratePerQty, MaterialName2, PODescription2, ratePerQty2, GeneratedBill.DiaCharges, GeneratedBill.PaidExciseDuty, GeneratedBill.PaidEducation, GeneratedBill.PaidSHECESS, GeneratedBill.DutyAmount, GeneratedBill.OutPutVatorCST, GeneratedBill.ChargableAmount, GeneratedBill.BillNumberFromClient, GeneratedBill.DispatchQuantity, GeneratedBill.GeneratedBillDate 
FROM CustomerCompanyDetails INNER JOIN PurchaseOrderClient ON CustomerCompanyDetails.CustomerCompanyID = PurchaseOrderClient.CustomerCompanyID INNER JOIN tblPostalCodes ON CustomerCompanyDetails.PostalCode = tblPostalCodes.PostalCode INNER JOIN GeneratedBill ON PurchaseOrderClient.PurchaseOrderNumber = GeneratedBill.PurchaseOrderNumber INNER JOIN TaxationDetails ON CustomerCompanyDetails.CustomerCompanyID = TaxationDetails.CustomerCompanyID 
WHERE (GeneratedBill.PurchaseOrderNumber = '" + PONumber + "') AND (GeneratedBill.BillNumberFromClient = '" + BillNumber + "')";

When I execute the above query I am getting following 2 rows

Output for given Query
My query gives me all same columns in both result except dispatch quantity and rate per quantity
In above example
POProduct - dispatch quantity is 15
Test in Production - dispatch quantity is 20  

When I pass this query to Report it shows me the following report. I am getting 2 pages in report
In both pages all fields are displaying same records except dispatch quantity
On first page it shows 1st material dispatch quantity and on second page it shows 2nd material dispatch quantity (Check the attached screen-shot).
Report Page 1

Report Page 2  

I wanted to display all the dispatch quantity in front of the same materail

Please Help me.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 43 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 43 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros