Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    2

    Unanswered: group with formula schould show always 10 rows

    I would like to create a group with formula, where I do not have database fields, but fixed figures, namely from 1 to 10. The result schlud be 10 rows.
    How to do that?

  2. #2
    Join Date
    Jul 2007
    Posts
    54
    So what will decide what gets displayed in each of these Groups?

    I would create a formula which tests something which then decides what goes in which group.

    For the sake of an example, I am going to use an invented database field called {DATA}:

    if {DATA} < 10
    then "01/ First Group
    else
    if {DATA} <20
    then "02/ Second Group"
    else
    if {DATA} <30
    then "03/ Third Group"
    else
    ...
    if {DATA} <90
    then "09/ Ninth Group"
    else "10/ Tenth Group"

    Now Group on that formula.

    I have chosen to make the formula-output text so that I can add a helpful description, but to make them sequence correctly I have had to add a preceding zero or else Group 10 would appear in the wrong place. If you just made the output a number then you wouldn't have this problem.

    I hope this suggestion is of some use to you.

    Many thanks,
    Caspar

  3. #3
    Join Date
    Jul 2007
    Posts
    54
    I just had an afterthought that could be independent of the data, which is to create an incrementing formula using WHILEPRINTINGRECORDS. It would take some playing with, but you could initiaise it with 1 and then have the increment in the Group footer and then a test somewhere that says when it gets bigger than 10 then stop.

    I haven't tested this at all, but share it as a wild idea. What I cannot see is how Crystal would know what was in each group and therefore how and when it would stop the Group and so cause it to increment and go on.

    So this may or may not work, but I thought I would toss it out there for comment anyway.

    Many thanks,
    Caspar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •