Error converting varchar to int
Posted on 2004-11-23
I have a report that I use to print paychecks. This report has four sub-reports to format earning sections of the report.
I am getting an error that my group wants me to find. The error is
Query Engine Error: 'ADO Error Code: 0x80040e07
Source: Microsoft OLE DB Provider for SQL Server
Description : Error converting data type varchar to int.
SQL State: 22018
Native Error: 8114'
If I remove the sub reports, the report works fine, but of course this is not an option because I need the details section.
The Sub-Report works off of the @empid parater. I set the currect empid field to the @empid paramater. This is in interger, and I am wondering if this is where the conversion error is happening would crystal switch it from an int to a varchar and then try and pass it back to the sub-report?
The report runs, it just pops up that error four times when you run the report. then it goes away. I have verified all the SQL and there are no implicet conversions in the SP that would cause the issue. All of the sub-reports can be run without error individually. It's only when they are combined that I get this problem wich leades me to suspect the empid field.
All of the parmaters in the SP are in the exact same order (as I know this can cause problems).
Any one out there ever run into this problem or have a suggestion?