UFN_REPORT_GETPARAMETERS
Returns the parameters for a report spec.
Return
Return Type |
---|
xml |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@REPORTCATALOGID | uniqueidentifier | IN | |
@HISTORYID | nvarchar(20) | IN |
Definition
Copy
CREATE function dbo.UFN_REPORT_GETPARAMETERS
(
@REPORTCATALOGID uniqueidentifier,
@HISTORYID nvarchar(20) = null
)
returns xml
as
begin
declare @PARAMETERS xml
if ltrim(coalesce(@HISTORYID, '')) <> ''
begin
select @PARAMETERS = PARAMETERS
from dbo.REPORTSNAPSHOT
where
REPORTCATALOGID = @REPORTCATALOGID and
HISTORYID = @HISTORYID
end
else
begin
select @PARAMETERS = PARAMETERS
from dbo.REPORTPARAMETERS
where ID = @REPORTCATALOGID
end
return @PARAMETERS
end