If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > group with formula schould show always 10 rows

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-07-09, 09:02
kirilb kirilb is offline
Registered User
 
Join Date: Mar 2009
Posts: 2
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?
Reply With Quote
  #2 (permalink)  
Old 08-18-09, 11:31
CasparV CasparV is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 08-18-09, 11:35
CasparV CasparV is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On