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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Left Outer Join not working correctly; export to text failing

Status
Not open for further replies.

cindyrella

Programmer
Jul 25, 2003
10
US
I’m a newbie using Crystal 5.0; I need to create a plain text file using Crystal. I’m connecting to the database with ODBC.

The report needs to be from FILE1 with additional data from FILE2. There is a one to many relationship from FILE1 to FILE2.

I need all records from FILE1 and records from FILE2 where FILE2.TYPE =”0" and FILE2.LEVEL =”X”. The link is FILE1.CODE to FILE2.CODE.

I tried using a left outer join in my report, but I only got records from FILE1 that have a record matching the criteria for FILE2.

Then, I created another report for the FILE1 data, and a subreport with the FILE2 data, and linked the two reports. This produced the correct data. In the original iteration of the report, data from the report exported, but data from the subreport did not export.

I checked CrystalDecisions.com, and based on the “Export Limitations” document, updated my DLLs. Now when I try to export to text, I get a “Report failed to export” error when the export is about 85% complete. There are 15609 records in FILE1.

Any suggestions or help would be greatly appreciated.

CNS
 
Another approach would be to use the left join from file1 to file2, but remove the conditions you placed on file2 in your record select statement, so that all file2 records are returned (these conditions in effect cancel the left join). Instead use these conditions to suppress the file2 fields you don't want to appear. Select the file2 fields and then go to format field->common->suppress->x+2 and enter:

{FILE2.TYPE} <> &quot;0&quot; and {FILE2.LEVEL} <> &quot;X&quot;

I'm not sure how this would export, but it might be worth trying.

-LB
 
That did the trick. Thank you so much for your assistance.

CNS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top