|
-
Oct 22nd, 2006, 04:13 PM
#1
Thread Starter
Addicted Member
Multiple tables in CR4.0.6.1
Little by little I'm figuring Crystal Reports out.
Now I need to place 2 sections in a single report. For instance, a table at the top would include the top 20 salespeople and their statistics. A second table a the bottom would be the names of the top 10 managers and some different statistics for them. Basically it is 2 different reports but on one page to save space. I am having no luck trying to figure this out and it may not be possible with this version of CR. If not, is it possible to put a second page in a single report with the second table info? This would be like linking 2 different reports to one printing.
Hope this made sense ...
Thanks,
Ken
-
Oct 22nd, 2006, 10:03 PM
#2
Re: Multiple tables in CR4.0.6.1
For using two different tables in a single report you have to knowledge about the proper linking (relationship) between the tables. Make a proper linking and if needed then make a group also in the report and then use it.
-
Oct 23rd, 2006, 04:30 AM
#3
Thread Starter
Addicted Member
Re: Multiple tables in CR4.0.6.1
That's not quite it - my mistake for using the improper terms. The data is drawn from the same table in the database. The top section uses certain fields in this table. The bottom section is separate and uses it's own headers and it's own detail section to display different fields than the top ones but all are from the same table.
Like this:
VB Code:
[B] Salesman[/B]
[B]Employee State Sales[/B]
Jones,Bob OH $34,201
Smith,Hal FL $28,552
[B] Managers[/B]
[B]Manager Region Group[/B]
Horton,R SE 15
Thomas,S NE 12
The table then contains these fields:
name
job (numerical - 1 = sales, 2=manager)
state
region
sales
group
I'm not sure this is possible ...
Ken
-
Oct 23rd, 2006, 10:05 PM
#4
Re: Multiple tables in CR4.0.6.1
You display the two tables here in fro using them in the crystal report, but there is no proper linking between the tables, as I mention that proper linking is necessary for using multiple tables in the crystal report.
First define proper linking (Primary Key) and make a group then you are able to use then in the crystal report.
-
Oct 24th, 2006, 05:25 AM
#5
Thread Starter
Addicted Member
Re: Multiple tables in CR4.0.6.1
I'm still confused. The primary key for the table is PlayerID although it is never displayed. Both groups of data are from the same table. How do you link one table to itself? Why would you need to?
Thanks,
Ken
-
Oct 24th, 2006, 11:39 AM
#6
Re: Multiple tables in CR4.0.6.1
Post you table structure and also post wht type of the reporting field you want in the table, If you are using one table then it is easy to make the crystal report.
-
Oct 24th, 2006, 01:30 PM
#7
Thread Starter
Addicted Member
Re: Multiple tables in CR4.0.6.1
This is an abbreviated table structure:
Table:Employees
EmployeeID (Auto Number)(Primary Key)
Employee (text field)
Job (Text field S = Sales, M=Manager)
Region (text field NE, SE, N, S, C, NW, SW)
Sales (number)
Team (number {Number of people in a manager's team})
I would like the report to display like this:
VB Code:
[B]Employee Region Sales[/B] (Listings in this section have job of "S")
Bob Smith NE $45,000
Tom Dudly NE $24,563
John Doe C $ 3,435
[B]Manager Region Team[/B] Listings in this section have job of "M")
Rod Smith NE 15
Bob Munro S 12
Ken Huston SE 24
I used the quotes and VB code to format the desired areas for clarity. The report is in two sections but all data comes from the same table. What I need is two header sections and two detail sections in the same report. I cannot figure out how to do this with CR 4.6.0.1
Thank you,
Ken
-
Oct 24th, 2006, 10:02 PM
#8
Re: Multiple tables in CR4.0.6.1
Group the report according to the job section. And make another group according to the employee name.
Using this grouping on you database you are able to see the report as you are mentioning above.
-
Oct 25th, 2006, 06:47 AM
#9
Thread Starter
Addicted Member
Re: Multiple tables in CR4.0.6.1
Thanks for trying, but I only see 1 list ... I need 2. I guess I can only have 1 report per page. I may have to write my own printing code to get what I need.
Thanks anyway,
Ken
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|