Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Message Question
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Title:
Error Message Question
Miscellaneous
Thread ID:
00665162
Message ID:
00665162
Views:
43
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
Next
Reply
Map
View

Click here to load this message in the networking platform