Search code examples
sql-server-2008crystal-reportsparameterscrystal-reports-xi

How to specify a SQL table type input parameter in Crystal Reports?


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.


Solution

  • As far as I can tell, this is not possible. Crystal does not take data types that it doesn't recognize from other applications, such as SQL Server.