|
-
Feb 16th, 2006, 10:45 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Hiding report fields.
Hi guys!!!
I have a tough one here. How do you hide report fields?
I have a situation wherein the report should display these fields if the user selected option A.
Okay that's fine but what if the user selected option B and the report should display another set of fields.
Then create another report, that's good but what if the user selected both A and B at the same time and it should only display one report showing both sets of fields.
Did you guys get the problem?
-
Feb 17th, 2006, 12:13 AM
#2
Re: Hiding report fields.
Assuming you are using Crystal. What version do you have?
Every report object can be hidden by setting the Suppress option explicity or by using a Formula.
As long as the options are parameters you could add a formula to suppress the required fields. If the parameter is called OptionA and is a boolean, the formula would be
Not {?OptionA}
-
Feb 17th, 2006, 12:44 AM
#3
Thread Starter
Hyperactive Member
Re: Hiding report fields.
 Originally Posted by brucevde
Assuming you are using Crystal. What version do you have?
Every report object can be hidden by setting the Suppress option explicity or by using a Formula.
As long as the options are parameters you could add a formula to suppress the required fields. If the parameter is called OptionA and is a boolean, the formula would be
Not {?OptionA}
Hey thanks, that hit it.
How do I relocate the field next to it?
Let's say I have Field A | Field B | Field C.
Field A has been hidden. How do I relocate Field B to Field A's position?
-
Feb 17th, 2006, 01:22 AM
#4
Re: Hiding report fields.
I have never tried to change the position of a field at runtime. I won't be able to try anything until tomorrow - I don't have Crystal at home. I don't suppose the Field's position has a formula button beside it like the Suppress option.
You could create duplicate Sections, one for each possible scenario and suppress the entire section instead of the individual fields.
Eg - Assuming you are using the Details Section and always want Field C displayed.
Code:
DetailsA Field A | Field B | Field C -> Suppress = Not ({?OptionA} And {?OptionB})
DetailsB Field A | Field C -> Suppress = If {?OptionA} And Not {?OptionB} Then False Else True
DetailsC Field B | Field C -> Suppress = If Not {?OptionA} And {?OptionB} Then False Else True
DetailsD Field C -> Suppress If Not {?OptionA} And Not {?OptionB} Then False Else True
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|