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

Sorting or Top N using Formula in 8.5

Status
Not open for further replies.

Gordo79

ISP
Aug 27, 2004
1
US
In my report I am using Formula fields to call and subtotal shared numbervars from subreports in the footer of a group. I wanted to be able to Sort the groups decending by the number in the formula fields. But I don't see any of my formulas in either sort or top n.

I eventually want to be able to vary the formula I use to sort based on a parameter.

Thanks for the help.
 
You don't need shared variables, those are for subreports (unless you're using a subreport).

And you may not need variables at all, but what you should do is post technical information:

Database/connectivity
Example data
Expected output

A formula can be used in a TOP N, but a TOP N is very different from sorting, so we need to have a clear picture of the intent.

-k
 
I don't think you can use topN unless you can right click on the field/formula you want to do the topN on and insert a summary. I believe this excludes using variables or formulas referencing variables. The question then becomes whether there is another way you can design your report without using subreports.

-LB
 
LB: As long as you don't use a whileprintingrecords, you might be able to use a formula referencing a variable.

Of course you can bugger the formula so that it can't be used, but they can be used in theory.

-k
 
SV--

I tested this a little further, and you are right about some variables being available for topN. However, I believe shared variables can only be used "whileprintingrecords" and they, at least, cannot be used for topN purposes. You can get a shared variable to work in a formula without using "whileprintingrecords" in some cases, but I don't think that formula would be available for topN. Or have you found a way of doing this?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top