Sunday, February 19, 2012

Avg based on column values

Greetings,

I need to avg column data based on grid textboxes. I cannot use AVG because the column values come from a comma delimited string. I have tried using !Parameters to store a count and total for each column but they are always read only. What is the best approach.

The columns come from a field which is in the format of (99,75,60,100,-1,20,-1,80,75) for each record

-1 means the values are not counted in the average. I have a function for each textbox that parses the value from the list based on the column index. There can be 1 to many columns.

Everytime I to set the value of a field or parameter at runtime I get a read-only error.

Maybee the only way is to use calculated fields.

Any ideas.

Create two functions:

line_sum(string) returns sum numbers in your Field|||

Thanks for the input.

It looks like this would work for row based averages. I should have stated that I need to Avg columnwise in the footer.

I have the database calcing and returning a row based avaerage for each record. I was looking for an OnNewRecord event or someway of calcing on vars.

I may have to create a new field of comma averages for each row. bleh!

No comments:

Post a Comment