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

Drill Down Problem

Status
Not open for further replies.

mr2tho

Programmer
Mar 30, 2006
25
US
I have two Drill Down problems. Even if you help me on one of them, it would be appreciated.
I am using Crystal Rpt 9.

I have a parameter basically asking A or B.

If A is selected:
I need two Groups:
For First Group: I made a function @Group1, really simple:
if {?parameter}="A" then {tableNm.FieldNm}
Second Group is not a function, regular field group.

If B is selected:

The second group when A was selected is this time my first group.
And I have two more functions @Group3, @Group4.
My @Group3 and @Group4 functions are again simple:
if {?parameter}="B" then {TableNm.FieldNm}

To sum up when I go to Group Expert, this is how it looks
@Group1
Field
@Group2
@Group3

Question1:
When parameter A is selected, report is good but on the very left, after you drill down twice, there are two more empty + signs to drill further down, of course there is nothing but there they are. Any help?
Question2:
When parameter B is selected, I have one empty + sign to drill down to start with. After that I can see other two drill downs.
I currently have this code for Group Header#1 for Suppress when I go to section Expert. I thought it sould have fixed.
if {?parameter}="A" then
true
else
false

It supresses but the drill down is there!!!!

I can write this report all over, so any input is welcome.

For Question1:
I guess I need to somehow tell Crystal that 2 groups will be used instead of 4 when parameter A is selected than one of the drill down + sign is going to go away.

Thanks
 
It would have helped had you named the fields used in each and provided their datatype. I'll make something up as a crosswalk:

{@grp1} is on {table.W}
"field" is {table.X}
{@grp3} is on {table.Y}
{@grp4} is on {table.Z}

Instead of using your current setup, create three formulas:

//{@newgrp1}:
if {?parm} = "A" then {table.W} else
if {?parm} = "B" then {table.X}

//{@newgrp2}:
if {?parm} = "A" then {table.X} else
if {?parm} = "B" then {table.Y}

//{@newgrp3}:
if {?parm} = "B" then {table.Z}

If the fields are not all of string datatype, you will have to wrap the non-string fields in totext().

Hide both groups 2 and 3. Then go to the section expert->Grp#2 header->underlay following sections (do not check)->x+2 and enter:

{?parm} = "A"

If you have your group 3 groupname aligned with the groupname for group #2, you will be able to drilldown to the details without having to drill through a "blank" group.

-LB
 
Well, first of all, thanks bunch.
I've set it up exactly like you said. It worked like a charm, I have get rid of the first empty drill down. Thank you.

How about the other case, that I have only two groups and the very bottom drill down + sign. Actually what happened is my finance manager wanted to get rid of one more group, so I have only one group now and after that there, I can see one empty drill down at the bottom. Any solution that I can get rid of this last one?

At section expert sometimes you don't check the check box but you write a formula, is this a bug or checking and unchecking mean something different? Can you explain the differences? i.e. in case of supress, I am just trying to learn.
Thanks
 
One more question, is there a document that I can learn about the functions?
i.e explanation of
Count (fld)
Count (fld, condFld)
Count (fld, condFld, cond)

Could you give me a link so that I can learn instead of taking your time this much with questions?...
Thanks and have a great day.
mr2tho@yahoo.com
 
I don't follow what you are saying about the "second case". My suggestion should have addressed both cases. If the requirements have changed, you should be very specific about what the new requirements are.

About the check boxes--ordinarily you should either check the box, because you want it to always apply, or instead of checking the box, create a conditional formula in the x+2 area. If you do both, the conditional formula will override the checkbox--unless the conditional formula does not execute (e.g., if it references a previous record and current record is the first record), in which case the formula will default to the status of the checkbox.

Regarding functions, the Help section for CR is very good, and should be a primary resource. In your example:

count(fld) - counts at the report level
count(fld,condfld) - condfld is your group field, so this count is at the group level
count(fld,condfld,cond)--the cond really only applies to groups that are based on datefields, so that you can qualify the date group by "weekly", "annually", etc.

-LB
 
Thank you lbass, you have been very helpful. I hope you getting paid for all the helps you have been doing for all the people. I am reading your other posts to other people, too, they're valuable.

I didn't know CR has such a good help, I've just found it out, great, I really liked it.

You're right about me not explaining it very good, sorry. Basically I either have one group (earlier it was two, doesn't matter, same thing) or I have three groups. And I now have three formulas just as you described for groups. The one that has three groups is perfect, but the one that has one group has two extra empty drill downs. I think I will go back and read your post again, I must be doing something wrong somewhere.

Thanks again for all the help.
 
Please show the contents of your current formulas. I need to know which fields you are grouping by if A is selected and which if B.

FYI - No one gets paid to contribute here. People donate their time because they like to help.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top