>At the end of report I want to print subtotals from every group.
>So, it would look like this:
>
>Details -----------------------------------------------------------
>
> Name Count
> Name1 1
> Name2 5
> Name3 10
>
>Grand Total Count 16
>
>Can someone help, please?
Hi There :)
If you don't have preprocessed cursors prior executing frx which wld make yr life much easier in this case, then one of the solutions could be to create public array, and fill it up 'on fly' via UDF with group totals data.
Summary band shld hv prefixed expected number of this
aray elements (datagroups) with 'printwhen' set to print only if array element is populated with value.
public aGrTot
declare aGrTot(100,2)
.
.
function grp_totals
lParameters cGrp,nTotal
local cGrp,nTotal,i
for i=1 to 100
if type('aGrTot(i,1)')='L'
aGrTot(i,1) = cGrp
aGrTot(i,2) = nTotal
return ''
endif
next
return ''
Run time call(s) to this function will be done from tiny report expression added to group footer band for this putrpose only.
Expression there will hv call to above function with
group name and total value passed as parameters.
(Will show nothing as function returns '' )
=grp_totals(cGroupName , nGrpTotal)
Group total value in this case would have to be calculated via report variable, while group name can be passed as ordinary expression.
It is somewhat cumbersome solution but it can do the job.
Rgds+