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

how to force the report to print for all groups?

Status
Not open for further replies.

yehong

Programmer
Sep 22, 2003
291
US
I am creating 7 groups in my report as follows:

If {aa_s.factor} < .10 Then
0
Else
If {aa_s.factor} < .20 Then
.2
Else
If {aa_s.factor} < .30 Then
.3
Else
If {aa_s.factor} < .40 Then
.4
Else
If {aa_s.factor} < .50 Then
.5
Else
If {aa_s.factor} < .60 Then
.6
Else
If {aa_s.factor} > .60 Then
1

The problem is no matter if a value for each range exist or does not exist, the group name must be displayed. Is there a simplest way to do it within Crystal? Instead of creating another table and outer joining it or using UNION query. Thanks,
 
Please give more information.

What group are you talking about? Are you talking about group headera? Please give more detail to the sample. What does the if sentence have to do with grouping?

Linpro
 
That's creating one group with 7 possible entries, not 7 groups.

One of the strongest contributors here, Ken Hamady has an article on this topic:


Look for &quot;Reporting on data that isn't there&quot;

Since you have so few, I would probably just create a formula that would fire at the end of each group footer using the next() to check if the next group is in sequence, and if not, display the name(s) of each of those missing followed by a carriage return (chr(13)).

-k
 
Hi, {aa_s.factor} is a database field. Based upon the value of each field falling between the range (say <.20) creates a group (say .2). Or it is same as if:

If table.field <.10 then
&quot;First Group&quot;
else
IF table.field <.20 then
&quot;Second Group&quot;

After this formula has been evaluated, and if it finds values under each range, then it creates the groups.
Like:
===========================
First Group:
===========
.01
.03
.04

=============================
Second Group:
.11
.12
.15
Now if say there was a Third Group and there was no value found in the range (<.30) then report would just show

=============================
Third Group:


Hope this clears out.
 
Hi Alan

you could set up the group header with the formula that you are putting together.

With each if statement you use the header like

if x < .10 then 'Header 1'
else
if if x < .20 then 'Header 2' etc

In the group by put the formula you created. Once you do this you will see the headers for each group by (with and without data.)

Hope this helps.

Linpro
 
Hi Alan

I forgot to add the null part.

In each of the if statements add &quot;or if isNull(x) then&quot;

- this will force each group header to show up.

Linpro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top