Click here to Skip to main content
16,020,568 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
I am a developer, i am facing problem with crystal report, where i am not able to get result properly. Please help me its very urgent.. need to deliver this report urgent.

My problem is:---

Firstly i would like to tell u i am using ADODB not ADO.net, the old one which i am familier with VB6. My i m using MySql for backend.I have 2 problem.
1)
I would like to know how to send query result from C# to crystal report if there are inner joins, as i am taking inputs from user or taking input from form after user selects.

2) Now about actual report.

I am printing report for my customer which is a caterer , he goes to customer selects menu for different events like reception or marriage , if there are two events either in eve and other in morning the there will be two diff menu. So i am creating a report where custname, advance, order id , total cost as master header and according to event type the menu should change. means the master head will be same and on eventType changes the menu should change on different page.

i have created master report , and subreport as the eventType changes and its menu category(like sweets,rice,vegetable,chinese) and its menu items, everything is coming correct but the menu items in menu catergory are coming duplicate. i dnt know why it is coming duplicate.

I will give u the queries

sub report query
C#
SELECT `menudetails`.`mainMenu`, `menudetails`.`menuSubItem`, `orderdetails`.`eventTime`, `orderdetails`.`totalPeople`, `menudetails`.`eventType`, `menudetails`.`orderDate`
FROM   (`pandecaterers`.`order` `order` INNER JOIN `pandecaterers`.`menudetails` `menudetails` ON `order`.`orderId`=`menudetails`.`orderId`) INNER JOIN `pandecaterers`.`orderdetails` `orderdetails` ON `order`.`orderId`=`orderdetails`.`orderId`
ORDER BY `menudetails`.`eventType`, `menudetails`.`mainMenu`

Main report Query
C#
SELECT `order`.`orderId`, `order`.`customerName`, `order`.`phoneNo`, `order`.`totalEventAmount`, `order`.`advanceAmt`
FROM   `pandecaterers`.`order` `order`


So please help i m frustrated with this. Another thing with report is if i run this in crystal report is fine but i would like to run while the caterer creates order and takes print out using the current order ID. how can i pass order id and customer name in above queries so i can get desired result.

Your help will very much appreciated.
Thanking in advance for ur gr8 help.
Posted

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