Search code examples
reporting-servicesssrs-2012ssrs-tablix

Is there any way to pass the Store procedure print note can be displayed in SSRS Report?


I have a Procedure where If the Start date is less than the end date then the Procedure will print the error that "The start date is less than the end date".

How to pass this error to SSRS report when this date condition raises?


Solution

  • If you can modify your Stored Procedure then the easiest thing might be to add an additional column to the results that contains indicates this message (or at least an indicator that the report can use to display the message). If the value was set on every row, you could test the first row and switch a textbox on/off in the report by setting it's hidden property like this...

    =FIRST(Fields!myMessageColumn.Value, "myDataSetName") <> "The start date is less than the end date"
    

    You can set the content (value expression) of the message box to be

    FIRST(Fields!myMessageColumn.Value, "myDataSetName")