none
Displaying a "No Results" message RRS feed

  • Question

  • I have a list  in one of my reports. I would like to have a text box that displays a message saying "There were no results" when the particular list is empty. The problem is, I can't use CountRows() because 1.) The textbox needs to be outside of the list in order to be displayed at all, and 2.) the list uses a filter so using it on the dataset will not be useful. Is there anyway I can make this textbox only display when the list is empty?

    I tried reworking my code to use a table (and I'd show/hide the footer based on CountRows()) but this failed because the table is in a subreport. For some reason, it seems that when a table is in a subreport KeepTogether is ALWAYS on even though it is set to false (bug?), so I seem to be stuck using a list which will not let me do what I want it seems.

    Thanks for your help. 
    Thursday, July 17, 2008 2:46 AM

Answers

  • Hi DMeglio,

    You have no need to place any textbox to display the message for No Record.
    Just open the property window of List and type "There were no results" message within NoRows property.

    Aftab Ansari
    • Marked as answer by DMeglio Thursday, July 17, 2008 2:57 PM
    Thursday, July 17, 2008 11:08 AM

All replies

  • Hi DMeglio,

    You have no need to place any textbox to display the message for No Record.
    Just open the property window of List and type "There were no results" message within NoRows property.

    Aftab Ansari
    • Marked as answer by DMeglio Thursday, July 17, 2008 2:57 PM
    Thursday, July 17, 2008 11:08 AM
  • Ah, you are absolutely correct. I did not see that option, thank you. Any idea about the table thing though?
    Thursday, July 17, 2008 12:56 PM
  • Ok, now another issue. I have a list within a list. Let's call them parent and child. If the parent  is NOT a leaf (Fields!Isleaf=0) I want child completely invisible. So I go into child and set the visibility to that expression. However, it appears that inside the Visibility expression I'm in child's scope, so Fields!IsLeaf does not work. Is there anyway I can get the parent scope? There is a Previous() function to get the previous record, but is there something like a Parent() function to get the record above the current record?

    Thank you.
    Thursday, July 17, 2008 2:56 PM
  •  

    Hi DMeglio,

     

    Right click on list1->Properties->DatasetName (Select here appropriate dataset). Now click on Edit Details Group->Select Desire Expression for [group on] option.

     

    Right click on list2->Properties->DatasetName (Select here appropriate dataset). Now click on Edit Details Group->Enter the same Expression as you have entered in list1’s editDetailsGroup.

     

    Now open the property window of list2 & write the visibility expression =cbool(Fields!Isleaf.value)


    Aftab Ansari
    Friday, July 18, 2008 2:27 PM