Click to See Complete Forum and Search --> : Failed to retrieve data from the database. Database vendor code: 245


irenavassilia
July 2nd, 2008, 11:04 AM
Hi,

I have a report which I have created in Crystal Report 11. Currently I have no parameters because when I did have a parameter no data printed. So when I took out the parameters and try to run the report to get all data I go the following error:

Details: 22018:[Micsrosoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'Y' to a column of data type int. [Database Vendor Code: 245]

This error is produced by the following formula in my crystal report:

IF {qryReport_Invoice_Detailed.invd_Taxable} = "Y" THEN
{qryReport_Invoice_Detailed.invd_Total} * 0.05
ELSE
0

qryReport_Invoice_Detailed is a view and invd_Taxable is a nchar data type field.

So I really dont understand why I am getting this error....

Any help or suggestions would be greatly appreaciated.

Thank you.

Regards,

Irena.

irenavassilia
July 2nd, 2008, 12:03 PM
I figured out this wasnt a crystal report error is a sql server error for the view.