0

Complicated Sort by Calculated Sum

I am trying to sort an NL("Rows"..) function by a calculated value. This is at the second level (so inside another Row replicator) and needs to refer to the results of the main replicator.

The row replicator is in E16, the calculated filter as text in D16 and the result of the first replicator in C16 (copied down). The cell values are:

E16: =NL("rows","Vendor",,D16,"*")
D16: +=NL("Sum","32","5816","5",c16,"4","Sale","3",$g$5,"Link=","27","1","=2","31",nf(,"No."))-NL("Sum","32","5816","5",c16,"4","Sale","3",$g$6,"Link=","27","1","=2","31",Nf(,"No."))-NL("Sum","7134","11","3",$h$6,"4",$g$6,"7",C16,"8",NF(,"No."))

The syntax for D16 works fine. The problem is the reference to C16. As this is a text field this reference isn't updated by the row replicator, thus only the first set of values sorts correctly.

I have already had to shorten the expression to just table and field numbers to get within the 255 character limit. I can't find a way of keeping it under 255 characters and allowing the row replicator to update the reference to C16.

The closest I came was to split the expression up into a number of cells then combine it in the NL function using an expression similar to P16&""&C16&""&Q16 etc. This allows the row replicator to update the C16 cell reference, but it generates an error when the report is run.

If anyone has any ideas on how I can get this working I would be grateful. However I suspect the required expression may just be too long.

Many thanks,
Garry.

5 comments

Please sign in to leave a comment.