Hi Kiran,
Unluckily, I am not familiar with Crystal Reports 10.5 in VS. 2008, and so are not sure what may be the cause of the problem, or whether it is related to ChartDirector or not, or related to how the image is passed to Crystal Reports.
However, in general, the image generated by ChartDirector is indistinguishable from any other image. If your code generated the image as a PNG file, it is just the same as any PNG file to Crystal Report. If the image is generated as byte[], it is indistinguishable from any other image also generated as byte[]. So I think in theory, if this is what your code is doing, the issue cannot be related to ChartDirector.
However, if your code is not passing the byte[] to CR (eg. it is just passing the URL to get the byte[], which is different), or if it is not passing the same byte[] during display and printing, then it may be related to the cause of the problem.
(In many systems, the report printed is not the same as the report that is displayed on the web page, because the paper size is likely to be different from the browser display size. The report printed may be "recreated", and it may be possible the "recreation" is not successful to due session time out or various problems.)
For debugging, if CR supports passing the chart image as an image file on the hard disk, I suggest you may use this approach. This has the advantage that you have an image file on the hard disk as an audit log, so you can see whether the chart is generated successfully or not.
Hope this can help.
Regards
Peter Kwan |