I need to pass a list of key values to a stored procedure in SQL-Server, and that stored procedure then returns back the values needed for a Crystal Report.
Rather than sending a comma separated list and then parsing that, it was suggested that I use a Table Type. So, I've defined that table type as simply made of integers:
CREATE TYPE [dbo].[SiteIdentifiers] AS TABLE
(
[SiteId] BigInt,
PRIMARY KEY ([SiteId])
)
However, now I need to modify my Crystal Report to take that as an input parameter. (The stored procedure starts with...
CREATE PROCEDURE [dbo].[sp_SiteReport]
@SiteIds [dbo].[SiteIdentifiers] ReadOnly
AS
The Reports will mostly be called with ColdFusion or C#.net, so I don't think there will be an issue in adding IDs to the table type. But I don't know how to define that parameter in Crystal. The list of Types in the Create New Parameter wizard is rahter scant.