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

adding columns

Status
Not open for further replies.

jj1576

MIS
May 21, 2008
69
US
Hi,

I have a report in which I have 4 formulas in the details section, and I am trying to add each row in a fifth formula.

The issue is 0 values that I want to exclude from the formula. The formulas are a variation of:

if {TestMainList.Description} = "Wt 1" then tonumber({TestResults.ResultText})

The other formulas are the same except the Testmainlist.description field is "Wt 2" "Wt 3" and "Wt 4"

It seems simple but for every four records there are 3 zeroes and I don't want these to show. For example:

0.00 0.00 1.05 0.00
0.00 1.05 0.00 0.00
0.99 0.00 0.00 0.00
0.00 0.00 0.00 1.01

There is a total of 32 rows, which each 4 rows containing one non-0 number in each column. I want it to add and then average the non zero numbers for each 4 rows.

Thanks
 
I would suggest you eliminate the 0's in your source first and then display normally in Crystal.

If your data source is in SQL Server, then write a stored procedure to get your data first and have the last select query display the data you want and then base your Crystal report on that query.

Let me know if you don't know what I mean.

Thanks,

Harvard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top