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

how to sum fields but ignore suppressed fields

Status
Not open for further replies.

tezzyr

Programmer
Oct 6, 2006
21
GB
I have suppression on my details section so that certain records are not displayed on the report.
how can i exclude these values from being included whenever I run a summary as they appear to be added along with the values i require to be summed, even though they are not appearing on the report. im using cr11 on an sql server db.
thanks for your help
 
Hi,
Depending on the suppression formula:

1: Can it be changed to a record selection formula instead?

2: Maybe a formula can use that same criteria to detemine if a record's data should be included in a summary formula.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
the formula in my summary reads as follows
if Previous ({EVENTS_OUT.SERIALNUM}) = {EVENTS_OUT.SERIALNUM} and Previous ({EVENTS.SERIALNUM}) = {EVENTS.SERIALNUM}
then


RunningTotal :=RunningTotal
else
RunningTotal := RunningTotal+1;

for the purposes of testing, ive just been incrementing runningtotal by 1 for every field i want included in my summary.

ive no idea how to put this formula into record selection because at the moment, it contains-
{READER.TIMEATT} = 1 and {READER_OUT.TIMEATT} = 2 and
{EVENTS.EVENTIME} < {EVENTS_OUT.EVENTIME} and

(({EVENTS.EVENTTYPE} = 0) or
// Duress
({EVENTS.EVENTTYPE} = 2 and ({EVENTS.EVENTID} = 0 or
{EVENTS.EVENTID} = 2)) or
// APB
({EVENTS.EVENTTYPE} = 3 and ({EVENTS.EVENTID} = 4 or
{EVENTS.EVENTID} = 5)))
and

(({EVENTS_OUT.EVENTTYPE} = 0) or
// Duress
({EVENTS_OUT.EVENTTYPE} = 2 and ({EVENTS_OUT.EVENTID} = 0 or
{EVENTS_OUT.EVENTID} = 2)) or
// APB
({EVENTS_OUT.EVENTTYPE} = 3 and ({EVENTS_OUT.EVENTID} = 4 or
{EVENTS_OUT.EVENTID} = 5)))
 
Use a running total where you use choose "use a formula" in the evaluation section:

Previous ({EVENTS_OUT.SERIALNUM}) <> {EVENTS_OUT.SERIALNUM} and Previous ({EVENTS.SERIALNUM}) <> {EVENTS.SERIALNUM}

Place the running total in a footer section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top