|
HI,
I have a problem with report viewer while viewing the report in Browser. Regular reports are working fine. but when the report contain "Format with multiple columns" enabled the data is not aligned as expected, it is getting overwritten. We developed reports in the Crystal Reports 2008 and the report is working perfect in designer. Please help me in resolving the issue.
Below is the code i am using to view the reports in pdf:
byteArrayInputStream = (ByteArrayInputStream) reportClientDocument.getPrintOutputController().export(ReportExportFormat.PDF);
response.reset();
response.setHeader("Content-disposition", "inline;filename=crreport.pdf");
response.setContentType("application/pdf");
byteArray = new byte[1024];
while((bytesRead = byteArrayInputStream.read(byteArray)) != -1) {
response.getOutputStream().write(byteArray, 0, bytesRead);
}
response.getOutputStream().flush();
response.getOutputStream().close();
|
|
When you view the report in the Designer, you're seeing the report as Crystal is rendering it. When you view it in a Viewer on the web, you're seeing an HTML rendering of the report which, by it's very nature, is not exactly the same as what you see in Crystal. So, this is not necessarily an issue with the report itself, but more with the way it is being rendered in the viewer.
I don't remember whether this was still available in the 2008 SDK, but there may be an option to set the viewer component to use ActiveX instead of HTML.
One other thing you may want to do is look at the "HTML Preview" of the report in the Crystal designer to see whether there may be things you can tweak to get it to display correctly in HTML. You'll find this option on the "View" menu.
-Dell
|