I inserted the summaries. Basically, I am receiving data from a stored procedure against a sql 2k db. Because the data is delivered for a particular 'period' and because I am representing MTD, YTD, and Prior YTD values, I chose to use the following formulas to have the data populated in the appropriate column of the detail line.
MTD Formula
If Left ({?@Begindate},6)= {cusSpRevProd;1.period}
Then {cusSpRevProd;1.nMtdAmt}
Else 0.00
YTD Formula
If Left({?@Begindate},4)= Left({cusSpRevProd;1.period},4)
Then {cusSpRevProd;1.nMtdAmt}
Else 0.00
Prior YTD Formula
If Left({?@Begindate},4)<> Left({cusSpRevProd;1.period},4)
Then {cusSpRevProd;1.nMtdAmt}
Else 0.00
'Period' is returned as YYYYMM.
I am suppressing the detail lines and only showing the summaries at the type (payments, adjustments, charges), department, and Provider levels. The problem is, the sp returns the data with a summ_desc value attached. That value is either 'payments', 'adjustments', or in the case of charges the names of the various departments that charges get grouped into, for example, 'radiology', 'ecg', 'laboratory', etc.
The groupings and summaries all work perfectly, except that I need to show the total payments, adjustments, and charges again at the end of the provider, and when I try to reinsert the summary at the provider level, it shows the same value as the summary already there.
The only way I know to accomplish this is by inserting a subreport, and only showing the final totals.
I hope the above is not too terribly convoluded.
Thanks in advance for the advice. MH