I have a report which works fine but if there is no data it is totally blank. How do show even if the table/ tablix has no data?

PhillipO 1 Reputation point
2022-08-10T19:45:26.827+00:00

THIS BELOW IS it. But if no data it shows another

230211-image.png

230221-image.png

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,065 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,636 Reputation points
    2022-08-11T01:39:41.52+00:00

    Hi @PhillipO

    (1) If you want to keep the structure of the Tablix when there is no data, You can add a row outside of the outermost group right under the tablix header row.
    Set the row visibility to Show or hide based on an expression. The expression would like like:

    =IIf(CountRows("DataSetName") > 0, True, False)  
    

    When there is no data, the table will show the headers and empty row.
    When there is data, the empty row will be hidden.

    (2) If you want to specify text to show in the rendered report in place of a data region that has no data, set the NoRowsMessage property for a table, matrix, or list data region, the NoDataMessage for a chart data region, and the NoDataText for the color scale for a map. See more: Set a No Data Message for a Data Region (Report Builder and SSRS).

    Best Regards,
    Joy


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.

  2. Michael Taylor 60,331 Reputation points
    2022-08-10T20:30:51.293+00:00

    I'm not sure what part of your report is disappearing but if you are using a tablix or any of the grid-level controls and there is no data then of course it won't show the data rows. But any non-data bound controls like report and table headers should still be shown. If you aren't seeing anything then I'd wager you have a condition that is hiding the control if there is no data.

    230232-image.png

    If you want to show a message instead of an empty table then you can do that. Bring up the Properties window using F4. Then select the table. Under the No Rows properties is the NoRowsMessage. Set this to whatever text you want (e.g. No data found) and it will be shown in lieu of an empty table.

    230261-image.png

    Can you be more specific about what parts of the report aren't showing up?

    0 comments No comments

  3. PhillipO 1 Reputation point
    2022-08-11T12:28:11.197+00:00

    I just did it but still it does not show. this report is basically a table and then I expand the table, add a list at the top if uou see the Report Ending Date... that one has a list on the table so I can add text boxes. Below in blue is the same thing but I add top and I tried to use the code on the small circle blue and the larger blue one but still the whole report is blank when no data

    230407-image.png


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.