I have a crystal report that generates data for any day based on date selection. However for certain date selections the report is blank even if data is present. When I debug the application the report displays correctly for that date but doesn't display when its hosted on the server.
For example it has been displaying data properly till 15-06-2015, but thereafter till 21-06-2015, nothing is displayed and again displays the report properly from 22-06-2015. This report displays just the table shell without any data, if no data is present, but in this case an empty page is displayed.
I have a strongly typed dataset 'customreport'
Dim myds As New customreport myds.EnforceConstraints = False Dim rpt As New ReportDocument rpt.Load(Server.MapPath("receiptregister.rpt"))
da.Fill(myds, "customreport1") rpt.SetDataSource(myds) rpt.SetParameterValue(0, dtparam) rpt.SetParameterValue(1, Session("OfficeName")) CrystalReportViewer1.ReportSource = rpt CrystalReportViewer1.DataBind() Dim oStream As MemoryStream oStream = CType(rpt.ExportToStream(ExportFormatType.PortableDocFormat), MemoryStream) Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf" Response.BinaryWrite(oStream.ToArray())
Here is a screenshot for references http://prntscr.com/7ju965
I'm at my wits end. Please help!