Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    115

    Unanswered: Hide report label if sub report count is 0

    Is there a way to hide a label on a report if the sub report count is 0?

    Thanks

  2. #2
    Join Date
    Dec 2013
    Posts
    43
    Provided Answers: 1
    Tom,

    You can use the Report's "On No Data" event to set the visible property to false. This will work on objects within the SubReport.

    You can also do a DCount() on the SubReport's Record Source. If it is 0 then you can hide the entire SubReport or any main report objects.

    hth,
    Wayne

  3. #3
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    You could use the On No Data event of the sub-report to hide the label on the report.

  4. #4
    Join Date
    Jan 2004
    Posts
    115
    I like the idea, however, this sub report is in multiple reports, and I prefer not list all main report. Is there a way to hide a label on the main report, on the main report event?

    Thanks

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you can change a controls visibility using the visible property
    you can set that property via code
    you can set that property in the form itself
    eg:-
    mycontrolname.visible = true

    OR from a sub report
    reports!myparentreport!mycontrolname.visible = true
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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