Skip to Content
author's profile photo Former Member
Former Member

Top N, Group Sort & Parameter fields

Post Author: training2go

CA Forum: Formula

Hello,

I'm using crystal for visual studio 2005. I am trying to create a parameter field that will let the user select the N in Top N for the report. For example, the user should be able to select any number between 1 and 100 for N. If they want to run the report for the top 10, 12 or 78, they should be able to. The problem, I'm having is that I don't know where to put the formula. I looked on the Group Sort Expert, but didn't see any way to add a forumla.

On a different report, I'm having the same problem with figuring out where to put the formula to allow the user to select Ascending or descending from a parameter field. I know how to write the formula, I just can't figure out what to attach it to. I looked on the Group Expert. The Group Sort Expert option for this report is dimmed out.

Any help would be greatly appreciated.

Thank you.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 08:50 PM

    Post Author: V361

    CA Forum: Formula

    I have CR XI, so not sure if this is supported in VS 2005 or not.

    In the group sort expert there's a "Where N is:" box where you can enter a number. There's a formula box next to this where you can enter a formula to change the number of Top-N records. You should be able to refer to your parameter or another formula that processes your parameters to come up with a number, within this. You can create a parameter, and have the formula point to the param....

    Also for the sort, there is a formula in group expert. create a boolean parameter ( I called mine mytest then in the change group options, I selected formula and put this in.

    if {?MyTEST} = true then crascendingorder else crdescendingorder

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2007 at 06:26 PM

    Post Author: training2go

    CA Forum: Formula

    Ahhh, that explains it.

    In the version of Crystal that comes with Visual Studio 2005, there is no formula button next to the Top N field on the dialog box. I guess this means that I can't create this type of parameter field.

    Thank you V361 for your help. I really appreciate it.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.