1 Attachment(s)
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
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
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
Re: hiding and showing controls is not working
Hi,
Try to use:
VB Code:
WhilePrintingRecords;
if <x> = "Operacional" then <label>
else if <x> = "Non-OP" then ""
into the formula.
If it doesn't works, try:
VB Code:
WhileReadingRecords;
if <x> = "Operacional" then <label>
else if <x> = "Non-OP" then ""
[]s
João Luiz
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.