This is a migrated thread and some comments may be shown as answers.

Passing user defined data type parameters to report does not work

1 Answer 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 2
Bob asked on 09 Dec 2013, 10:01 PM
I am calling a stored procedure from my report and passing in two parameters.  The first parameter is a SQL tinyiny, the second parameter is a SQL user defined data type named [OMS].[Lot_Number].  The data type is actually of type char(10).  In any case, when I attempted to programically set the parameter of the lot_number, and end users attempt to view the report, the query disregards the parameter.

To make this even more strange, when the developers run the exact code, the report functions as designed.

So after spending several, SEVERAL hours looking into the issue and passing blame amongst others in my IT department, I removed the user defined data type and defined it as char(10).  When the end users ran the report, the report finally produced the correct data.

This here is where I ask, does the report engine accept user defined data types and if so, how to pass the parameter to the stored procedure?

I appreciate  your help.

Regards,
Bob

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 12 Dec 2013, 03:58 PM
Hello Bob,

We have tested the described scenario with the following custom type and stored procedure:
use EmployeesTest
go
 
CREATE TYPE NameSSN
FROM varchar(10) NOT NULL ;
 
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
 
Create PROCEDURE TestUserType
    @test NameSSN,
    @intTest tinyint
AS
BEGIN  
    SET NOCOUNT ON;
    SELECT Employee.*, @test as TestCustType,@intTest as TesttinyInt from Employee
END
GO

The attached sample project successfully loads a report definition using the above stored procedure to retrieve the data.

Please compare the settings to yours and if you need further help, provide us with steps how to reproduce your issue. Feel free to open a support ticket and send us a sample project and data illustrating the problem.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

Tags
General Discussions
Asked by
Bob
Top achievements
Rank 2
Answers by
Stef
Telerik team
Share this question
or