Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Message Question
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Titre:
Error Message Question
Divers
Thread ID:
00665162
Message ID:
00665162
Vues:
41
I have the following code in my form.init. When it hits the .ViewReport() line, I get an error message that says: Server has not yet been opened. The messagebox has a Crystal Report Caption.

The reports that were "Saved With Data" display fine. It is one's with no data that give me a problem.

Here is the code:
* CrystalReportViewer.Init()
PARAMETERS tcReport
thisform.frmreport=tcReport
WITH This
      * Instantiate Crystal Runtime 
      * and add the report viewer to the form
      .oCrystalReports = CREATEOBJECT("CrystalRuntime.Application")
      .oReport = .ocrystalreports.OpenReport(thisform.frmReport)
      .AddObject("oleCRViewer", "oleControl", "crViewer.crViewer")      
	  SET STEP ON 
      WITH .oleCRViewer
            * Set report viewer properties
            .Top = 1
            .Left = 1
            .Height = ThisForm.Height - 2
            .Width = ThisForm.Width - 2
            .ReportSource = ThisForm.oReport
            .EnablePrintButton = .T.
	        .EnableExportButton = .T.
            .ViewReport()
      ENDWITH
ENDWITH
Thanks for any help
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform