January 5, 2012 at 7:24 am
I'm writing a SQL report that we host online for everyone to see with the top 5 errors that occur on the factory floor for that day. Once the day gets rolling the stored procedure tends to return 5 rows with the name of the error that occurred and the quantity of that error. However early on in the day, when no errors have yet to occur, My stored procedure doesn't return anything and I end up with a report of a chart that only has a Title, and it's not clear what's wrong. I'd be much happier if there was some way to check to see if the fields in my dataset contained any data before trying to populate the chart, and if it was empty, to just display a simple message that says something like, "No errors yet this shift, keep up the good work."
I've considered having the stored procedure return rows of zeros to make it so the chart could at least be rendered, but I'd much prefer the professional looking message. Is there a code behind to the report where I could do a conditional statement on the visibility of the chart?
Thanks for any help the volunteers can provide. I'm new to the community and tried to make my first post informative.
January 5, 2012 at 7:47 am
Hate to answer my own question on my first post, but I did find a quick and easy way to solve this problem (Thanks to a CoWorker that happened to know).
Chart in SQL reports simply have a property called NoDataMessage where you can setup a message to be displayed instead of the chart on the event that there was no data received from the stored procedure.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply