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!

cross-tab angst

Status
Not open for further replies.

phirst

Programmer
Oct 26, 2000
57
FR
Hi all,
I know some of you are going to groan but I have a cross-tab problem.

I have two tables which are joined with a LEFT OUTER JOIN.
Table 1 contains the field used for the columns (which also my join field), I want this to show ALWAYS, and table 2 contains a field for the lines and the summary field (count).
All the fields from table 1 are not displayed, only those which are present in table 2, ANGST %-(
I managed to get this work once, I think it was a fluke, and in the excitement, I changed something which stopped it working.
I have even tried using a query, which did show all the records in table 1.

For all you cross-tab haters is there another way? Table 1 does not, necessarily, have a fixed number of records, this is why I am using a cross-tab!

Any solutions or work arounds are welcome, as my customer is getting ratty and so am I.

Thanks all,

phirst.
 
phirst,

Have you tried using CROSS JOIN in the select (to match every possible row with every possible column) and then suppressing what you don't want to print in Crystal? (That would be done by: selecting the cross tab, right click, Format Cross-Tab, Customize Style tab, check boxes for Suppress Empty Rows and/or Suppress Empty Columns. In your select you could convert nulls to zeroes or empth strings.)
It's true that if your data sample is very large, the CROSS JOIN could take some time ...

gailf
 
I don't believe that this has anything to do with the cross-tab itself. The report will not show these values either, because the cross-tab simply shows what the report has retrieved.

Usually this problem comes from the fact that you have nullified the outer join by adding a criteria to a field in the outer table. This eliminates all of the records that don't have a qualified match in that table.

Post your selection formula and I will show you the problem. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thanks all,
I have actually rewritten the report since.
The problem was, as Ken said, added criteria on a field in the outer table which nullified the outer join.
Tahnks again,
phirst.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top