none
Rdlc Table header RRS feed

  • Question

  • My table doesn't display a header when there is no data. How can I make it to display a header without any row when there is no data? Thank You
    Thursday, December 9, 2010 3:45 AM

All replies

  • Take a look at http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/4e4bfa7b-bd24-4607-ad99-338371999573.


    Cephas Lin This posting is provided "AS IS" with no warranties.
    Thursday, December 9, 2010 4:28 PM
    Moderator
  • Sorry, I still do not quite understand. It said, if no data populate only group name ...

    I am not working on group. I do not how to leave the header visible when there aren't any data in my dataset or datatable. I looked some posts, saying if norows property was to leave empty, the header will generally displayed. However, mine somehow it is not like this. I do not understand ..~~"

     

    Thanks ... hope to hear from more ...

    Friday, December 10, 2010 12:16 AM
  • If you really have no groups in your table, then it's pretty straightforward to show headers, like in a simple table. It seems that you're having trouble only with groups.

    For example, with the following simple table structure:

     Name     Date     Total
    [Name]   [Date]  [Total]

    The first row is just a text row (header) which is always visible, and the other rows won't be shown without data.

    However, if Date is a column group grouped by month, for example, you won't get a header for a certain month (group header) without data. But if you can include in your dataset the following data (this is where manipulating your dataset comes in):

    Name    Date      Total
    null    1/1/2010    null
    null    2/1/2010    null
    null    3/1/2010    null
    ...

    then you would still get the group header, since you actually have data for each month group (in Date column), it's just that columns Name and Total are null.


    Cephas Lin This posting is provided "AS IS" with no warranties.
    Friday, December 10, 2010 10:45 PM
    Moderator
  • Thank You for the reply.

    You mentioned "The first row is just a text row (header) which is always visible , and the other rows won't be shown without data." ...

    But my text row (header) isn't visible when without data. This is what I do not understand . I want it to be visible , ( text row (header)), whenever there is no data in dataset.

    This is what I do not understand. My report (rdlc) design is a main rdlc contains many sub report(rdlc). My table is in the sub-report. and list of objects is passed in for example, List(of Object). The header is not visible when list count is 0.

     

    Thanks in advance. any idea ... this is what I do not understand.

     

     

    • Edited by Slen Monday, December 13, 2010 3:47 AM add more information
    Monday, December 13, 2010 1:13 AM
  • Try this simple scenario:

    1. Create a new report.

    2. Drag a table into the report.

    3. Drag fields from your dataset into a cell in the "Details" row. Notice the text headers created. For that matter you can just type in the text in the header row as well.

    4. Now try to run the report without any data in the dataset.


    Cephas Lin This posting is provided "AS IS" with no warranties.
    Tuesday, December 14, 2010 11:17 PM
    Moderator
  • Thanks I think I pretty much get what you mean. The table that I have in the rdlc is actually a subreport. When there an empty dataset, the sub report will not show anything. I think this is not a table problem. This is a subreport thing. how do I display the subreport even there is an empty dataset?

    any idea ...

    Thanks for the previous idea .. pretty much help me to understand more ...

     

    • Proposed as answer by TainoWorks Wednesday, December 15, 2010 4:49 PM
    Wednesday, December 15, 2010 8:15 AM
  • I had a similar issue that I solved by adding an additional row to my report.  Basically, I sum the report data and used an iff statement to check the sum value.  if the value was less than my target value, I placed a message "No data to Report" otherwise the report generated as expected, and placed an "End of Report" at the bottom. its my amateur solution try at a complex query. see below..

    =IIf(Fields!Incident_ID.Value <= 100 ,"End of Report", "No data to Report ")

    Good Luck, I have to try the previous on my reports next time..

    Wednesday, December 15, 2010 5:01 PM