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

suppressing detail and excluding it from running total

Status
Not open for further replies.

tsd30135

Technical User
Sep 21, 2004
38
US
I need to suppress the detail line for data that has a -1 in a database field (NTA). This I figured out how to do.

I also do not want the value in the amt field to be added to a sum field. I am not sure how to handle this. It seems to run the total even though the field has been suppressed.


Thanks

TSD


 
Need more technical information.

Crystal version
Database and connectivity
Sample data
Expected output

On the surface, why not exclude it in your record selection

{table.field} <> "A-1
 
In the running total expert, in the evaluation section, use a formula:

{table.NTA} > 0

Or, as WichitaKid suggested, use this in your record selection formula.

-LB
 
crystal 8.5

sql server 2000

customerid ticketid amount NTA
12 1234 30.00 0
12 1235 30.00 -1

The nta field on my report is string based. I need to have it there because it will dictate whether a textbox is displayed or not.

Expected output

customerid ticketid amount NTA
12 1234 30.00 0



total 30.00

Currently I can get the record with the -1 suppressed but the total would be 60.00

thanks

tsd
 
As you have discovered, suppressed data still evaluates in totals and running totals.

Instead of suppressing your data, why not exclude it from the report entirely with a record selection formula? Go to report, edit selection formula, record and enter a formula:

{NTA}=0

This would make your totals correct.


Lbass' solution will also work.


Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
askdon@srhconsulting.com
 
If you use the running total approach, the evaluation formula should then be:

{table.NTA} <> "-1"

Alternatively, instead of a running total, you could create a formula:

if {table.NTA} <> "-1" then {table.amount}

Then right click on this formula and insert a summary (sum).

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top