How to not print subreport if no data

  • I have a subreport that I do not want to print if the subreport has no data. The subreport has 1 table.

    Main report A has an embedded subreport B. If subreport B has no data to display, it should not print.

    Any ideas how can I do that?

    Changinagain

  • Do you mean that you do not want the subreport to display or you do not want the subreport to print when the report is printed?

    I don't think that there is any way to suppress printing of objects in SSRS.

  • I'm not sure this can be done. The first thing that comes to me is the 'norows' table property. Set that for your subreport table.

    Question is, can the main report interpret what is happening in the subreport to allow some type of iif statement controlling printing or display properties?

  • I do not want the subreport to print if there is no data. I have a main report that has embedded subreport, the subreport only has one table, all else is hardcoded text boxes. If there is no data in the table of the subreport it should not print.

    I have set the "norows" property on that table but setting visibility is on the table, not the report. One would think you could set visibility on the report itself.

    Also, on the main report, there doesn't seem to be a way to check the existence of data for the subreport or else I could set visibility there. :w00t::w00t:

    Changinagain

  • Try setting the visibility of all the objects on the sub report to hidden if there are no rows in the dataset.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply