SSRS report not displaying data

Never seen this before. However, SSRS can be a bit "off" at times, so here's a list of things to try. I'm afraid most of these are of the type "Have you tried turning it off and on again?".

  • Delete the .data files associated with the report.
  • Duplicate/back-up the report, and try to add the dataset in a fresh, basic tablix to see if that does show data.
  • Check the hidden property. Don't forget that (for some stupid reason) it's not (like in any other sane product) a Visible Y/N field, but a Hidden Y/N field.
  • Double check font color and size, etc.
  • Run the report on your reportserver (as opposed to the preview) to check if that does work.
  • Use some temporary text boxes to show the actual values of your parameters, to check if they are exactly the same as when you test-run the data set.
  • Check the code-behind (xml in the rdl) for unexpected filters, hidden property, expressions, etc. in the tablix. Even if you can't quite "read" the RDL, with syntax highlighting you should be able to skim it and extract a lot of info on this.
  • Check the ExecutionLog2 and other logging stuff to see how many rows are being returned in report runs.

In addition, it would help if you update/edit your question with some more info:

  • What kind of groupings does the tablix have?
  • What are the filters on the tablix, row groups, and column groups?
  • What is the general structure of the dataset, and it's results?
  • How are the parameters structured and used?

When using temporary tables, SSRS fails to get the metadata. So there are basically 2 ways of letting SSRS know the column names:

  1. Add SET FMTONLY ON. This will retrieve the metadata but it won't display the data.

  2. Go to the DATA tab and click on the Generic query designer and click refresh fields. This will prompt a dialogue box for specifying the parameter value. When we run the query in query designer SSRS gets the schema and the data from the stored procedure. Now the data will be available in preview pane.


I had the same problem. Here is what I found. Here is my code:

    DECLARE @tblPigProblems TABLE (
    Id          INT IDENTITY, 
    PPId            INT, 
    GaugeColor      VARCHAR(25), 
    FullStartTime       VARCHAR(25), 
    PigSystem         VARCHAR(25)
    )

    IF (1 = 0)
    BEGIN
        SELECT * FROM @tblPigProblems
    END

    ...

    SELECT '@tblPigProblems'    [PigProblems],  
    @p_vchLine      [Line],         
    GaugeColor      [Product],
    FullStartTime       [Start Time],
    PigSystem       [Pig System]
FROM @tblPigProblems

What I did was to use the initial "SELECT * FROM @tblPigProblems" to ensure that if any error messages were specified in the code before the final select statement returning the dataset, that SSRS was able to determine the fields from the stored procedure. Then, when the results were determined, I assigned an alias to the fields. The problem was that the aliases for the fields did not match the declared field names (ie: the declared field "GaugeColor" did not match the alias "[Product]" I supplied in the select to create the result set. The way that I realized this is that when I refreshed the fields in the Data section of the SSRS report, then displayed the dataset fields, it listed the field names from the table declaration (ie: "GaugeColor"). When I executed the stored procedure within the dataset (clicked on the !), the result set listed in SSRS showed the field aliases (ie: "Product"). Since these didn't match, nothing was displayed in the textbox I had assigned the field to (ie: "=Fields!ColorGauge.Value"). SSRS did not pick up this discrepancy and allowed the report to be created, but no values to be displayed. The fix was simple, replace:

    IF (1 = 0)
    BEGIN
        SELECT * FROM @tblPigProblems
    END

with:

    IF (1 = 0)
    BEGIN
        SELECT '@tblPigProblems'    [PigProblems],  
        @p_vchLine      [Line],         
        GaugeColor      [Product],
        FullStartTime   [Start Time],
        PigSystem       [Pig System]
    FROM @tblPigProblems
    END

Dan


I also had a similar issue. In my case, it even occurred without any parameters or anything, just the most simple report you can imagine. It included a table with a single field, no filters were used. I did manage to view some data, but only those lines were shown which did not fit into the cell and thus forced the row height to increase.

My fix for this issue: changing the font or the font size from the standard (size 10, Segoe UI). Then, all data was showing. Changing this back to Segoe UI made the data disappear once again.