Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports
Viewing all articles
Browse latest Browse all 4814

Joining Stored Procedure with local Tables: Error

$
0
0

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?

 

crystal1.JPG

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

 

SERVER2

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

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

 

Alere

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::

 

crystal2.JPG


Viewing all articles
Browse latest Browse all 4814

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>