Skip to Content
Former Member
Dec 13, 2013 at 06:20 AM

Joining Stored Procedure with local Tables: Error


I'm designing a Crystal Report for a client. Almost all the fields come from a MS SQL Server Stored Procedure. The report sends parameters to the Stored Procedure which returns the data which is displayed on the report. The client also wants to add a column that comes from a local DBF Foxpro table, which I have setup an ODBC driver too. And the data from the Stored Procedure and the local DBF are all joined by a common ID key.

Before I placed this field from the local DBF table on the form, the report ran fine. When I placed it on the form, the report crashes with an Invalid Argument error. It seems to run OK when I refersh the data from with the report designer. It is only when I run it runtime from my Accounting program is when it crashes.

Should you be able to join a server-based Stored Procedure with a local database table, joined on a common ID field, and have it display in Crystal without a crash?

Here is the results of the "Show SQL Query" with the field added:


"sample999"."dbo"."vsp_rpt_soopen";1 '', '', 6, 0, 1, 0, 0, '', '', '', '', '', '', '', ''

EXTERNAL JOIN vsp_rpt_soopen;1.csono={?Alere: soheader.salesno}


SELECT `soheader`.`sched_date`, `soheader`.`salesno`

FROM `soheader` `soheader`

WHERE `soheader`.`salesno`={?SERVER2: vsp_rpt_soopen;1.csono}

Here is a shot of how the 2 tables are setup in the Database Expert, as a LEFT OUTER JOIN::


crystal1.JPG (27.2 kB)
crystal2.JPG (24.5 kB)