Has anyone here have an output element they created to give them a count of gifts given?
We have one that uses a local view to give total contribution amount and gift count for a selected campaign. I'm happy to share the view and set up with you if you think it's what you're looking for.
Thanks Melissa! It sounds like this is what my foundation staff is looking for, and I'd love to take a look at what you use.
Sure! The view is attached and shouldn't need any tweaking.
The set up for the output elements is below. Let me know if you have any questions or problems.
TR_QUERY_ELEMENT_GROUP
Description: Total Campaign Giving
Data From: lv_cust_camp_total
TR_QUERY_ELEMENT
Description: Total Campaign Gift Count
Group ID: Total Campaign Giving
Data Select: !.num_camp_conts
Single Row: Checked
Data Select: !.camp_total
TR_QUERY_ELEMENT_PARAMETER
Description: Campaign
Filter element: campaign_no
Data Type: Numbers
Ref Tbl: VS_CAMPAIGN
Ref id: campaign_no
Red desc: description
Ref where: blank
Ref Sort: description
USE [impresario] GO /****** Object: View [dbo].[LV_CUST_CAMP_TOTAL] Script Date: 3/5/2021 4:31:33 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [dbo].[LV_CUST_CAMP_TOTAL] AS SELECT a.customer_no,a.campaign_no, SUM(cont_amt) AS camp_total, COUNT(ref_no) AS num_camp_conts FROM t_contribution a WHERE a.cont_amt > 0 GROUP BY a.customer_no,a.campaign_no GO
Thank you, Melissa! This is appears to work great. Now I just need to find out if the development team is happy with it (I'm optimistic that they will be).
Thank you again for your help!