Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 27th, 2006, 01:36 AM
Registered User
 
Join Date: Sep 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to denishrt
Default how to use two tables in one report?

I am beginner of Crystal Report
I want to create a report for sales invoice
salesmaster is having following fields
1)sales_id
2)sales_date
3)cust_name
4)sales_amt
5)sales_due
salestran is having following fields
1)sales_id
2)item qty
3)rate
4)amount
how can i use both tables in same report
I am beginner in Crystal Report
Any one can help me
Report should look like this
customer name (grouped by name)
     invoice id
     itemcode description rate amount
                                     total amount
please help me to solve this problem
email id : [email protected]



 
Old October 9th, 2006, 07:41 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

add ur dedired Tables & drop thire Fields to Report, then make a group on that field (name) u want & ...

i guess its easy.

Always:),
Hovik Melkomian.
 
Old October 11th, 2006, 01:57 AM
Registered User
 
Join Date: Sep 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to denishrt
Default

thank for giving me response. thanks a lot

 
Old October 13th, 2006, 06:50 AM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shriji.1111
Default

upto my knowledge,
It's not possible.
But Alternative way that you can do
Create a view and use that view instead of table.


Brijesh Shah
 
Old October 13th, 2006, 11:42 AM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can call a sproc or view that joins and/or unions tables together. Include all the fields you need in your report and group them, then supress groups to avoid dup headings, "customer name" in your case so the name only prints once, and set the group properties to print on each page; keep 'em grouped together, too. Your sproc would return a recordset looking something like:

(CustomerName, InvoiceID, ItemCode, Desc, Qty, Amount, Total, ...)
'Sam Adams', 123, 'ABC', 'Pencil', 3, 0.19, 0.57, ...
'Sam Adams', 123, 'DEF', 'Eraser', 1, 0.39, 0.39, ...
'Sam Adams', 124, 'XYZ', 'Folder', 2, 1.39, 2.78, ...
'Bob Smith', 301, 'AAA', 'Box', 2, 3.95, 7.90, ...
'Bob Smith', 302, 'BBB', 'Box', 1, 3.95, 3.95, ...
'Bob Smith', 302, 'CCC', 'Labels', 1, 4.95, 4.95, ...

You can also call a sproc that returns a dataset of 2+ recordsets, but it's usually not necessary for simple reporting.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Aligning tables in Report Designer chfhess BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 0 August 3rd, 2008 11:32 AM
Report from two tables in two differents databases cphspain Crystal Reports 1 November 21st, 2006 05:13 PM
Multi tables in the crystal report? lovelylife1982 Crystal Reports 1 March 11th, 2005 04:21 PM
Two different tables, same report SilverTip BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 July 12th, 2004 07:39 AM
multiple tables on one report? lanctotd Access 4 October 8th, 2003 03:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.