Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Multiple Cross-tabs in one report

Status
Not open for further replies.

schaferr

MIS
Oct 16, 2001
12
US
I have a report that contains 2 cross-tabs. Each cross-tab is based on a different database - dBASE IV. The two databases are linked. Each crosstab is supposed to count the number of records that are found in a certain date range using paramter fields for high and low dates.


The 1st cross-tab which is based on the primary file works fine. However, the 2nd cross-tab actually counts the total number of records in the first file. I have no references in the 2nd cross-tab to the first file.

What am I missing?

Thanks
 
WHen you say that they are linked, is that to say that you have a relation between .dbf's?

I think that DBIV had a database container, so it's unclear what you mean here.

You probably want a subreport for the second crosstab which uses a different data set.

You can pass a parameter (dates) to the subreport.

-k kai@informeddatadecisions.com
 
I think you are missing the fact that when you create a report with two tables, they have to be combined into one table for the report. So you can't do 2 cross-tabs in one report and have them independently read two different tables. Both Cross-tabs are using a composite table make up of both tables in the report. Since the first table is probably the "many" end of a "one-to-many" relationship, it is inflating the second table, causing your counts to go up. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Synapsevampire - I created a subreport for the 2nd crosstab and it worked great. Thank you so much.

Kenhamady, are you saying that Crystal takes the two tables and merges them into one when the report is run?
 
Yes, that always happens when you link tables. Columns of one are added to the columns of the other. That is why the subreport is needed, to keep the data sets separate. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top