Results 1 to 7 of 7

Thread: [RESOLVED] Supressing text fields when blank

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Location
    Madison, WI
    Posts
    136

    Resolved [RESOLVED] Supressing text fields when blank

    I am having trouble getting the supress text when blank feature to work. I have a couple of text fields which have a formula embedded. I then did everything the crystal book said to, but its not working. Well, the text doesn't show up but a big ol space is left behind. I was under the impression from the reading that supress would remove the big ol space as well. How do I remove the space?

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

    Re: Supressing text fields when blank

    I am not sure I understand the problem. Are you expecting other fields to the right of the textbox to shift over and fill in the gap?

    Maybe post a picture of the problem.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Location
    Madison, WI
    Posts
    136

    Re: Supressing text fields when blank

    Yeah, exactly. I guess thats what I thought supress meant. I have a text box with a formula text object embedded in it. ANd when the formula returns a blank value I want the other text box below it to move up in its spot. Is this possible?

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Location
    Madison, WI
    Posts
    136

    Re: Supressing text fields when blank

    Is anyone out there?

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

    Re: Supressing text fields when blank

    There are some ways to get around this problem. It will depend on your report but maybe this will give you some ideas. Are you familiar with "Underlaying Sections"?

    Assume your report looks like this

    VB Code:
    1. Details - Field1 Field2 Field3
    2.                  Field4

    You can add another details section by right clicking Details and selecting Insert Section below. The designer would like like
    VB Code:
    1. Details a - Field1 Field2 Field3
    2. Details b -        Field4

    Now right click Details a and select Format Section menu.
    Click the Formula button for "Underlay Following Section"
    Use the same formula here as you did to suppress Field2.

    Field4 will now print where Field2 is located if Field2 was suppressed. Note however that this assumes there are no other fields in Details b as they will overwrite the printed data in Details a.

    Another option is to adjust the contents of the embedded formula.

    A Text Box can contain multiple fields. If Field2 is embedded with your formula, then also embed Field4 into the textbox, ensure that it appears immediately after Field2 (no space between the two). Set the Can Grow option for Field2 and remove the suppression formula.

    Now adjust the embedded formula for Field2 to include a carriage return if its contents are not blank. Field2 prints on line 1 and Field4 will print on line 2. If Field2 is blank, Field4 prints on line 1.

    I hope this makes sense. I use version 8.5, other versions may have better options.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Location
    Madison, WI
    Posts
    136

    Re: Supressing text fields when blank

    Now adjust the embedded formula for Field2 to include a carriage return if its contents are not blank.
    Hi,
    how do you program this? I can't find anything about this. What does a carriage return look like in crystal syntax?

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

    Re: Supressing text fields when blank

    Use the Chr function

    "There is a Carriage return after this line " + Chr(13)

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