Results 1 to 4 of 4

Thread: [RESOLVED] Hiding report fields.

  1. #1

    Thread Starter
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Resolved [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?

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    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}

  3. #3

    Thread Starter
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Re: Hiding report fields.

    Quote 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?

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    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
  •  



Click Here to Expand Forum to Full Width