Using VISIBLE in code on Report

Hi there, I’ve been trying to change the visible property of text fields and labels on a report. Is this possible? Basically, on the request form, if the user wants to see costs, the columns will show up, otherwise, I don’t want to see them. It seems to be possible on forms, but I can’t seem to make it work on Reports. In the past, I’ve had to put sections for each possible combination or use text fields and set them blank. Any help is appreciated. Thanks, Mark.

Unfortunatly I believe that you will have to use that same principle. Between using Multiple Sections/Blanking out Text Fields, I haven’t found anyway to dynamically hide labels/text fields. Cheers Darren Bezzant Development Specialist dbezzant@csbsystems.com CSB Systems 1560 - 333 11th Avenue SW Calgary, Alberta T2R 1L9 Tel: (403) 233-2955 Fax: (403) 233-2957

Actually there is a trick that will work to do that. First the text box that will contain the value cost field that you want to dynamically hide, set the BlankZero property to Yes. Then instead of using a true lable control, use a text box. Create a global that will either contain the “Caption” or a blank. See example below: IF PrintCost then CostText := ‘Cost’ ELSE BEGIN CostText := ‘’ “Cost$” := 0; END; Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117

Yes, that is correct, but as I said, there is no way to use the VISIBLE property in a report. That is what Mark was looking for.

Darren, you are correct there is no way to use the Visible property. However, if you read Marks’s request carefully, he did say “Any help is appreciated”. He was trying to avoid using multiple sections. My solution allows this to be done. Hope this clarifies my first response. Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117 Edited by - wbenefiel on 2001 Jul 26 21:12:40

OK, I see your point… but in my defense, Mark did finish off his original question with

quote:


In the past, I’ve had to put sections for each possible combination or use text fields and set them blank.


Anyway, I think we have beaten this horse enough. I think that it is good that we discuss as many options as possible, because you never know when you will need to try something different:) Darren Bezzant Development Specialist dbezzant@csbsystems.com CSB Systems 1560 - 333 11th Avenue SW Calgary, Alberta T2R 1L9 Tel: (403) 233-2955 Fax: (403) 233-2957