Last post Jun 22, 2015 06:07 AM by bnmawroh
Jun 22, 2015 02:55 AM|bnmawroh|LINK
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
CrystalReportViewer1.ReportSource = rpt
Dim oStream As MemoryStream
oStream = CType(rpt.ExportToStream(ExportFormatType.PortableDocFormat), MemoryStream)
Response.Buffer = True
Response.ContentType = "application/pdf"
Here is a screenshot for references http://prntscr.com/7ju965
I'm at my wits end. Please help!
Jun 22, 2015 06:07 AM|bnmawroh|LINK
Found the error. It had to do with a date in the report. All dates before the 12th of every month works fine, but after that crystal report cannot parse the dates because of dd/MM/yyyy - MM/dd/yyyy conflict. I had converted the dates in my query to dd/MM/yyyy
format but in the report I again set the object format to dd/MM/yyyy, so a double formatting occurs and creates and exception.