Unanswered: crystal 8 and crystal 9 exporting conflict
I have two different applications on a machine. Both the applications use crystal viewers to view reports and they have been remotely deployed. Recently we upgraded one of the application to use the crystal 9 viewer (CRViewer9.dll) as we moved to CE9. The other application still uses Seagate Info 7.5 and crystal 8 viewer (CRviewer.dll).
The viewing of the reports in the two different viewers is working fine but the problem comes when we are exporting the reports to different formats. If we deploy the new u2* dlls in System32, the crystal 9 export options are working but the crystal 8 application crashes while exporting.
I guess that the Crystal 8 viewer dll cannot use the new u2* dlls.
I know that having two applications with different crystal viewers is not advisable but it cannot be helped.
Is there any workaround which will allow me to export with both these viewers.
I decided not to use the CR9 exporting features from the CR9 viewer. In this way the existing CR8 modules were working fine with the old dlls. For CR9 exporting, I coded the CRViewer_exportButtonClicked event. When the user clicks on the export button, I open a windows dialog box where the filename and the export format can be specified. Using the initial instance id of the original report, I go to the server side and use the RAS Server to export the report in the user specified format.
Here is the RAS code I used.
Dim rptappfactory As Object
Dim ReportClientDoc As Object
Dim bytearr As Object
Dim reportPath As String
Dim ReportFileName As String
Set rptappfactory = moIstore.EnterpriseSession.Service("", "RASReportFactory")
Set ReportClientDoc = rptappfactory.OpenDocument(dJobId)
Set bytearr = ReportClientDoc.PrintOutputController.Export(ceFor matRequired)
bytearr.Save TestReportFileName, True