Quantcast
Channel: SQL Server Reporting Services, Power View Forum
Viewing all articles
Browse latest Browse all 4035

ServerReport.Render method returns a report with no data

$
0
0

In cases where the ServerReport.Render method returns bytes that consist of a report that has no data, Is there a way to know this programatically so that I don't write the bytes out to a file. For example if I have a unattended process that creates pdf's, I dont want to create a pdf if it's going to be blank. So the code would look something like this:

    bytes = ReportViewer1.ServerReport.Render(ExportType,                                             deviceInfo,
  mimeType,
  encoding,
  extension,
  streamids,
  warnings)
If *** CHECK SOMETHING HERE *** Then
  fs.Write(bytes, 0, bytes.Length)
Else
  'Write message to log
End

I cant necessarily check the bytes because it appears to always conatain a value, just a smaller one when there is no data.


Viewing all articles
Browse latest Browse all 4035

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>