Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print subtotals in the Summary
Message
From
18/10/2004 03:20:07
 
 
To
15/10/2004 13:24:00
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00951776
Message ID:
00952201
Views:
7
>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)
*** Before executing report  
.
.

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+
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform