Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jun 2003
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Controlling Sub Reports (Access XP)

    I have created a report and included a sub report that takes it's information from a separate table to the core information. This works perfectly all the time there is information relating to the main report but obviously appears as a blank space if there is no information in it. I would assume that I could create a dummy sub report that could be put in place of the original sub report in the instances where the sub report shows empty, however I am at a complete loss as to how to do this.

    If someone could help me with this I would really appreciate it.

    Many thanks

    <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Controlling Sub Reports (Access XP)

    You can set the Can Shrink property of the subreport as a control on the main report to Yes; you must also set the Can Shrink property of the section containing the subreport to Yes. This will prevent large blank spaces if the subreport contains no data.

    You can use the HasData property of the subreport as a control on the main report. This property is True if the subreport displays records, False otherwise. Example of use:

    Create a text box with control source

    =IIf([sbrSomething].[Report].[HasData],Null,"No Data")

    where sbrSomething is the name of the subreport as a control on the main report. Put this text box over the subreport.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •