Skip to Content
Former Member
Jul 15, 2013 at 07:38 PM

Passing parameters from Crystal report to a table valued function


I am writing a complex report which the source data is coming from a table valued function (Tried it using a stored procedure also). I have to pass 2 parameters say, Item and batch. I did add a command in crystal report and my command is " Select * from fn_Report_Trial({?Item},{?batch}) ". When I try to execute the report it is giving me error "Failed to retrieve data from data base. Source: Microsoft OLE DB Provider for SQL Server. SQL State:42S22. Native error 207 " But if I directly pass parameters then ("Select * from fn_Report_Trial('D45D','1-RET456') " it runs fine. Any help to resolve this issue will be helpful. Also, I would like to populate the parameters with values (for items, select item from Item master and for batch select BatchNo from Batch where Item = 'the parameter item')...