USP_DATALIST_CONSTITUENT5YEARGIVING
This datalist returns a summary of a constituent's donations, recurring gift payments, and pledges for the last 5 years.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CONSTITUENTID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
@DESIGNATIONLEVELCATEGORYCODEID | uniqueidentifier | IN | Fundraising purpose category |
@DESIGNATIONID | uniqueidentifier | IN | Designation |
@INCLUDESOFTCREDITS | bit | IN | Include soft credits |
@REPORTSOURCE | int | IN | Display |
@INCLUDERECOGNITIONALLDATES | bit | IN | Include all recognition credits for current fiscal year |
@CAMPAIGNID | uniqueidentifier | IN | Campaign |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@SITEFILTERMODE | tinyint | IN | Sites |
@SITESSELECTED | nvarchar(max) | IN | |
@SECURITYFEATUREID | uniqueidentifier | IN | Input parameter indicating the ID of the feature to use for site security checking. |
@SECURITYFEATURETYPE | tinyint | IN | Input parameter indicating the type of the feature to use for site security checking. |
@CURRENCYCODE | tinyint | IN | Currency |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_CONSTITUENT5YEARGIVING
(
@CONSTITUENTID uniqueidentifier,
@DESIGNATIONLEVELCATEGORYCODEID uniqueidentifier = null,
@DESIGNATIONID uniqueidentifier = null,
@INCLUDESOFTCREDITS bit = 0,
@REPORTSOURCE int = 0,
@INCLUDERECOGNITIONALLDATES bit = 0,
@CAMPAIGNID uniqueidentifier = null,
@CURRENTAPPUSERID uniqueidentifier = null,
@SITEFILTERMODE tinyint = 0,
/*DanielCo [12/19/08] Dashboards don't support parameters that cannot
be cast as strings like this collection so an error will occur if
user selects more sites than fits here (~73)*/
@SITESSELECTED nvarchar(max) = null,
@SECURITYFEATUREID uniqueidentifier = null,
@SECURITYFEATURETYPE tinyint = null,
@CURRENCYCODE tinyint = 1 -- (1, null) = organization, 3 = my base
) as
set nocount on;
if @REPORTSOURCE = 0 -- Revenue
begin
exec dbo.USP_CONSTITUENT_5YEARGIVINGGET @CONSTITUENTID, @DESIGNATIONLEVELCATEGORYCODEID, @DESIGNATIONID, @CURRENTAPPUSERID, @CAMPAIGNID, @SITEFILTERMODE, @SITESSELECTED, @SECURITYFEATUREID, @SECURITYFEATURETYPE, @CURRENCYCODE;
end
else -- Recognitions
begin
exec dbo.USP_CONSTITUENT_5YEARRECOGNITIONGET @CONSTITUENTID, @DESIGNATIONLEVELCATEGORYCODEID, @DESIGNATIONID,
@INCLUDERECOGNITIONALLDATES, @CURRENTAPPUSERID, @CAMPAIGNID, @SITEFILTERMODE, @SITESSELECTED, @SECURITYFEATUREID, @SECURITYFEATURETYPE, @CURRENCYCODE;
end