bmoberly8888
Technical User
I have two tables - cash and trust - I need to be able to add the cash amount to the trust amount to get one total.
I also have a prompt for a date range so users can enter a date range and see their cash receipts. I keep getting an error when I try to run it. The Cash report runs fine on its own and the trust runs fine on its own - but I am having a problem getting the final result. Here is the code I have:
SUM (CASE WHEN ([cash].[date] BETWEEN ‘@@Prompt:begdate:data:Enter beg date@' AND ‘@@Prompt:enddate:data:Enter end date@') OR ([trust].[date] BETWEEN '@@Prompt:begdate:data:Enter beg date@' AND '@@Prompt:enddate:data:Enter end date@') THEN (ISNULL ([trust].[TrustAmt], 0 ) + ISNULL ( CONVERT (money, [cash].[Cash]), 0) ELSE 0 END)
I also have a prompt for a date range so users can enter a date range and see their cash receipts. I keep getting an error when I try to run it. The Cash report runs fine on its own and the trust runs fine on its own - but I am having a problem getting the final result. Here is the code I have:
SUM (CASE WHEN ([cash].[date] BETWEEN ‘@@Prompt:begdate:data:Enter beg date@' AND ‘@@Prompt:enddate:data:Enter end date@') OR ([trust].[date] BETWEEN '@@Prompt:begdate:data:Enter beg date@' AND '@@Prompt:enddate:data:Enter end date@') THEN (ISNULL ([trust].[TrustAmt], 0 ) + ISNULL ( CONVERT (money, [cash].[Cash]), 0) ELSE 0 END)