locked
ReportViewer How to display a message if there is no record? RRS feed

  • Question

  • User-1104215994 posted

    Hi,

    I would like to give a "There is NO Data" message if there is no records on the reportviewer. Is there a way to do it?

    Best Regards.

    Monday, September 5, 2011 2:03 AM

Answers

  • User-830595639 posted

    Hi,

    What control you are using to display your Report, the property I said is available for Table/Matrix/List/Graph. Select the Table/Matrix and the press F4, there is a section "NoRows" in property window and there you can find it. If you are using other control to display your record let me know.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 5, 2011 3:50 AM

All replies

  • User-830595639 posted

    Hi Cenk,

    There is a property named "No Row Message", where you can give your message.

    Monday, September 5, 2011 2:19 AM
  • User-1104215994 posted

    Hi,

    I could NOT find the property.Can you show me an example?

    Monday, September 5, 2011 2:35 AM
  • User-1818814851 posted

    in report code section , you can write as if records.count == o then 'there is no data'.

    Monday, September 5, 2011 2:39 AM
  • User-1104215994 posted

    Hi vrsanaidu,

    I dont want do it the way you said. There should be a builtin property or something.

    Monday, September 5, 2011 2:42 AM
  • User-513735053 posted

    IF r u using Stored Procedure

    Try this

    if EXISTS(Select * from tablename)

    Select * from tablename

    Else

    Select "No Data Found"

    Monday, September 5, 2011 3:28 AM
  • User-830595639 posted

    Hi,

    What control you are using to display your Report, the property I said is available for Table/Matrix/List/Graph. Select the Table/Matrix and the press F4, there is a section "NoRows" in property window and there you can find it. If you are using other control to display your record let me know.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 5, 2011 3:50 AM
  • User-1104215994 posted

    Here is my markup:

    <asp:ReportViewer runat="server" Width="1235px" ID="ReportViewer1" Font-Names="Verdana"
                        Font-Size="8pt" InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana"
                        WaitMessageFont-Size="14pt" Visible="False" ZoomMode="PageWidth" Height="755px"
                        ShowExportControls="true" ShowPrintButton="true">
                        <LocalReport ReportPath="Reports\RequestNotClosed.rdlc">
                        </LocalReport>
                    </asp:ReportViewer>
    Monday, September 5, 2011 7:23 AM
  • User-830595639 posted

    Hi,

    I asked you to check your rdlc file and you just put the markup for RevportViewer control. Please check the points I posted in my previous post.

    Tuesday, September 6, 2011 1:51 AM
  • User-1104215994 posted

    yep, thanks

    Tuesday, September 6, 2011 2:03 AM