• Remove blank fields from Report

    Author
    Topic
    #498592

    I want to run a report and where there is no record for a particular field I want to remove the whole line in report and the space it held be removed moving the next record up to take its place. In effect – if no data for that field in that record then no label or field to exist.

    Is this possible?

    All my research has come up with is the Can Grow Can Shrink function but that isnt getting rid of the label and the line.

    Kerry

    Viewing 3 reply threads
    Author
    Replies
    • #1489348

      The basic trick is to set the height of the text boxes to zero, and to have the Can Grow property set to yes. It makes working on the design and testing it a bit of a challenge, but we’ve used it successfully in a number of cases. The other possibility is to simply exclude the records that have no data in that field.

    • #1489351

      Thanks Wendell
      The plan is to print all the records (75) from this report. This is an alternative solution to merging in Word.
      The records with no data are pretty random so I cant go down that road.
      The Can Shrink Can Grow idea you suggest doesn’t remove the labels though.
      Is there a way to do this with code?

    • #1489356

      One option would be to change the Labels to text boxes, and set them to null if the condition that makes you want to hide the record is true, the desired text if not null, and also make them zero height. However it seems to me that if the Labels are associated with the specific text box, and are set to zero height, then they don’t print either – but it’s been a long while since I did this sort of stuff. Are your labels associated with the text box.

      After further thought, is this associated with your prior thread and the hyperlinks issue? If so, hyperlinks on an Access report won’t be active in general, so that may not meet your needs. And it looks like you are burning the midnight oil on this for sure! 🙂

    • #1489813

      I solved my problem! I created a sub report and inserted it into the report. It worked perfectly in my horizontal report layout.

    Viewing 3 reply threads
    Reply To: Reply #1489351 in Remove blank fields from Report

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel