Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Reports nad RDC
Message
 
To
23/01/2002 16:33:16
Robert Powell
Ascension Capitol Group, Inc.
Arlington, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00606449
Message ID:
01059565
Views:
27
In the following code snipet, why would the OpenReport method take up to 7 seconds on a pentium 3 and below 1 second on a pentium 4?

PARAMETERS vcReportFile,lExclReportDir

IF !lExclReportDir
vcReportFile = goAppinfo.reportsdir + vcReportFile + '.rpt'
ENDIF

IF EMPTY(vcReportFile)
vcReportFile = This.ReportFileName
ENDIF

If File(vcReportFile)
This.crReport = This.crApplication.OpenReport(vcReportFile, 1)

Local loException as Exception
loException = Createobject("Exception")

lReturn = .t.

TRY
IF This.changetablename("ALL")

IF VARTYPE(This.oReportchanges) = "O"
cRepExport = This.oReportchanges.ExportSelection
This.oReportchanges.ApplyChanges(This.crReport,This)
ELSE
This.crReport.reportTitle = 'Sheet1'
ENDIF

This.loadreportsettings(vcReportFile)

This.ApplyCompanyDetails()

This.DefaultPaperOrientation = This.crReport.PaperOrientation
This.defaultpapersize = This.crReport.PaperSize
This.defaultpapersource = This.crReport.PaperSource

IF This.crReport.Database.Links.Count > 0
This.ocursor.ExportIndexes = .t.
ELSE
This.ocursor.ExportIndexes = .f.
ENDIF

This.reportfilename = vcReportFile

This.selectedprinter = This.selectedprinter
This.crReport.VerifyOnEveryPrint = .t.
This.lReportIsLoaded = .t.

ELSE
loException.Message = ""
Throw loException
ENDIF

CATCH TO loException
This.lreportisloaded = .F.

ENDTRY

RETURN (This.lreportisloaded)

ELSE
RETURN .f.
Endif
Regards
Previous
Reply
Map
View

Click here to load this message in the networking platform