I hope you are well. I have a Oracle SQL(11+) cursor that returns rows for a report. I also have a VB.NET batch that writes this file to a location by looping over all the Ids just for some context. Im trying to stop the generation of SSRS reports or prevent them from writing file to location if cursor is empty.
What do you suggest I do because I do not want to upload a bunch of empty reports to a location? Do I try to implement a solution through SQL or .NET? Then how do I proceed after I choose a route?
I was searching for a solution on Stackoverflow and found this:
IF @@ROWCOUNT = 0 RAISERROR(‘No data’, 16, 1)
I had some concerns about this because will this stop my script from looping once an error is raised. Is this the best option for my issue?