Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runningvalue on calculated field

Status
Not open for further replies.

dianemarie

Instructor
Jul 11, 2001
583
0
0
US
Hello, my report shows order history summarized by group1 (owner aka "vendor") and group2 (mailer aka "customer"). I have the following "percent of total" calculation on group 2 - mailer. There are two types of quantities: Rental and Exchange, so I sum the two together first, then divide by the owner grand total and format as Percent.

=(sum(Fields!qtyrent.Value,"MailerGroup") + sum(Fields!qtyex.Value,"MailerGroup"))/
(sum(Fields!qtyrent.Value,"OwnerGroup") + sum(Fields!qtyex.Value,"OwnerGroup"))

This works fine. My problem is I need a cumulative field for the above calculation. The report sorts descending by total quantity, although that is neither here nor there.

I tried to do a runningvalue this way:

=runningvalue(reportitems!textbox83.value,sum,"OwnerGroup")

However, I get the error: "can't aggregate reportitems except in header or footer sections".

I tried repeating the calculation within the runningvalue calculation, but there is a restriction on using aggregates within a runningvalue.

Any other thoughts on how I can do this simple cumulation field? Thanks for any help. Diane

 
Have you thought of doing a subreport for this total value and calculating it in an SQL query? Just a thought.
~Brett

--------------------------
Web/.net Programmer & DBA
Central PA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top