Information générale
Catégorie:
Produits tierce partie
Titre:
Crystal Viewer Problems
I am running into an intermittant problem when attempting to view a Crystal report from a table. The table is actually a series of records created in print format, a record per printed line.
The following code in is the 'init' method of a form that contains the activex viewer (CRViewer).
The data is accessed via a ODBC driver which does not change from run to run.
Occassionally as soon as the viewer window appears a message 'Server Has Not Been Opened' pops. If the print file program is rerun and the viewer accessed again the same message may pop or it may run OK and the view may be displayed.
If I substitute the crystal print in place of the call to the viewer, the print works every time without fail.
Has anyone had this experience with the viewer?
(Code in the Init of the form containing the activex viewer control, the name of the report is passed from the calling program. I am using MM framework for this application.)
LPARAMETERS toCallingForm
Thisform.oCallingform = toCallingForm
LOCAL lcRpt, loRpt
DODEFAULT()
This.oRuntime = CREATE("crystalruntime.application.8")
lcRpt = FULLPATH(ThisForm.oCallingForm.oPrimaryBizobj.cReportName)
IF !EMPTY(lcRpt)
ThisForm.cReportName = lcRpt
ThisForm.oReport = ;
ThisForm.oRuntime.OpenReport(thisform.creportname)
IF VARTYPE(Thisform.oReport) # "O"
MESSAGEBOX("Couldn't open report")
ELSE
ThisForm.oViewer.ReportSource = Thisform.oReport
ENDIF
ENDIF
Thisform.oViewer.Viewreport()
ThisForm.Refresh()
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement