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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running totals/sums on suppressed detail 1

Status
Not open for further replies.

Jcfx

MIS
Oct 8, 2004
134
US
CR10, sql db.

A basic 'dead inventory report'

Grouped by vendor,
detail is part id, description, months since last sale, item cost, total cost.

Months since last sale is a formula

Code:
if isnull({orders.closed}) then //checking to see if any sale since original inventory
datediff("m",currentdate,date(2004,6,28))
else
datediff("m",currentdate,maximum({ORDERS.CLOSED},{ITEM.PARTID}))

Detail is suppressed using the section expert, checking
suppressed with {@MonthsSinceLastSale} >=-5 in the x-2 field.

This gives me what I need as far as month since last sale. Now I need to sum the total cost of the NON-suppressed fields. I read that I can use a running total but have to reverse my suppression formula?

Any guidance appreciated.

Julie
CR 9,10 CE10 Sql DB
 
Is there some reason why you are conditionally suppressing the data instead of excluding it from your repotr entirely with a record selection formula?

If you put: {@MonthsSinceLastSale} >=-5 in the record selection formula, none of the conditionally supressed records will be in the report and all you need to do is insert a simple summary on the desired fields.


Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
{@MonthsSinceLastSale} is not available at the record selection level when I go to Report/selection formulas/record

I tried a running total sum of total cost, evaluate formula{@MonthsSinceLastSale} >=-5, reset on change of group Vendor.

It says that the formula cannot be used because it must be evaluated later.



Julie
CR 9,10 CE10 Sql DB
 
Sometimes using the formula itself will work instead of the formula name. So in the evaluate using a formula area try:

(
isnull({orders.closed}) and
datediff("m",currentdate,date(2004,6,28) < -5
)
or
datediff("m",currentdate,maximum({ORDERS.CLOSED},{ITEM.PARTID})) < -5

-LB
 
Thank you Lbass,

that appears to have worked.



Julie
CR 9,10 CE10 Sql DB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top