lexi0088
Technical User
- Sep 7, 2004
- 49
I have a report which groups rebates by state. In the group, there are two detail sections. DetailsA includes an NDC amount and DetailsB includes a Notes Amount. I need to add the sum of these two amounts together in order to get a total rebate per state:
{@Rebate}=Sum ({Adjustment Query.Notes Amt}, {Adjustment Query.State})+Sum ({Adjustment Query.NDC Amt}, {Adjustment Query.State})
The problem I run into is when one of the detail sections does not include any amounts, the formula returns nothing. I have tried many formulas, including an IIf statement with an ISNull check in it:
{@Rebate}=IIF(ISNull(Sum ({Adjustment Query.Notes Amt}, {Adjustment Query.State}))=FALSE,Sum ({Adjustment Query.Notes Amt}, {Adjustment Query.State}),Sum ({Adjustment Query.NDC Amt}, {Adjustment Query.State}))
This one also returns a blank value.
Any suggestions would be appreciated.
Thanks
{@Rebate}=Sum ({Adjustment Query.Notes Amt}, {Adjustment Query.State})+Sum ({Adjustment Query.NDC Amt}, {Adjustment Query.State})
The problem I run into is when one of the detail sections does not include any amounts, the formula returns nothing. I have tried many formulas, including an IIf statement with an ISNull check in it:
{@Rebate}=IIF(ISNull(Sum ({Adjustment Query.Notes Amt}, {Adjustment Query.State}))=FALSE,Sum ({Adjustment Query.Notes Amt}, {Adjustment Query.State}),Sum ({Adjustment Query.NDC Amt}, {Adjustment Query.State}))
This one also returns a blank value.
Any suggestions would be appreciated.
Thanks