Results 1 to 5 of 5

Thread: hiding and showing controls is not working

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    hiding and showing controls is not working

    hi,
    I have a report that was created in crystal 10 and it worked fine. when I imported the crystal into Visual studio the logic of hiding and showing is not working properly. I want to be able to hide/show text objects and fields based on certain field value. the attached screenshot should show what I'm talking about.

    I want to show the date and dates label if the status = Operational and want to hide if status = NON-OP.

    the problem is that the logic of hiding and showing is based on the first record. the first report is what i want to show. second and third and not correct because it's hiding/showing date lables based on the first record value instead each individual record.

    I hope this is clear enough.
    any help is appreciated on how to hide and show these labels properly based on status value.

    P.S this works fine in Crystal 10 but not when incorporated into Visual Studio.

    thanks
    Attached Images Attached Images  

  2. #2
    Hyperactive Member Jlarini's Avatar
    Join Date
    Jan 2002
    Location
    São Paulo, Brazil
    Posts
    263

    Re: hiding and showing controls is not working

    Hi,

    Did you try to put the labels in a formula ?

    that is,

    if <x> = "Operacional" then <label>
    else if <x> = "Non-OP" then ""

    Then replace labels with the formula.

    I hope it can help you.

    []s

    João Luiz
    nothing is impossible, it's sometimes very hard to do!

    If your thread is solved... Please edit it and add [Resolved] or [Solved] on it!

    If you like Marine aquarium, feel free to PM me.

    Sorry my bad English

    God bless Parksie!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    Re: hiding and showing controls is not working

    Joan,
    that didn't work. for some reason the formula is is checking for the first record and hide/show based on the value of <x>. so if my second record has value of <operational> the formula is not showing.

    any other suggestions....
    thanks

  4. #4
    Hyperactive Member Jlarini's Avatar
    Join Date
    Jan 2002
    Location
    São Paulo, Brazil
    Posts
    263

    Re: hiding and showing controls is not working

    Hi,

    Try to use:
    VB Code:
    1. WhilePrintingRecords;
    2.      if <x> = "Operacional" then <label>
    3.      else if <x> = "Non-OP" then ""
    into the formula.

    If it doesn't works, try:
    VB Code:
    1. WhileReadingRecords;
    2.      if <x> = "Operacional" then <label>
    3.      else if <x> = "Non-OP" then ""

    []s

    João Luiz
    Last edited by Jlarini; Oct 13th, 2006 at 12:41 PM.
    nothing is impossible, it's sometimes very hard to do!

    If your thread is solved... Please edit it and add [Resolved] or [Solved] on it!

    If you like Marine aquarium, feel free to PM me.

    Sorry my bad English

    God bless Parksie!

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    Re: hiding and showing controls is not working

    Joan,
    that didn't work either becasue as it's going through the records if the first one is not "Operational" it will not print the label then if the second record is then it will print but if the third record is not then it will hide it again. it will only work if the first record is "Operational".

    any other ideas?
    thanks for trying to help me.

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