Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reports Load Very Slowly?
Message
From
09/06/2006 10:20:51
 
 
To
08/06/2006 23:11:51
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
01127794
Message ID:
01128103
Views:
20
Part of the problem is just in the way the report loads. In runtime, the report loads all the data. It doesn't do that in the designer. I don't see anything in the code that would cause that. The next step is to look at the query. What is the data source (VFP, SQL Server, etc) and how are you connecting to the data?

>Craig,
> The report opens up without much time in CR9.2 Report Designer. But when the report loads from the VFP app it takes longer time.
>Following below is my VFP code which is inside a REPORT class which calls the CR report on the SERVER in the applications subdirectory REPORTS
>
>
>
>
>
>
>If This.PRINTDIRECTTOPRINTER
>	This.Visible = .F.
>Endif
>
>
>Private OPRO
>OPRO=Createobject("Processing")
>
>
>If Empty(Thisform.REPORTFILEPATH)
>	Thisform.REPORTFILEPATH= Addbs(Alltrim(OAPP.DEFAULTDIRECTORY)) +  "Reports"
>Endif
>
>
>CFILE=Addbs(Alltrim(Thisform.REPORTFILEPATH))+Alltrim(Thisform.REPORTFILENAME)
>If !File(CFILE)
>	=Messagebox("Report File : " +Alltrim(CFILE) +" is not existing. Kindly report this problem to the system administrator",16+0,'STOP')
>	Thisform.XIT=.T.
>
>Else
>	OPRO.Show()
>
>	With This
>		* Instantiate Crystal Runtime
>		* and add the report viewer to the form
>
>		.OCRYSTALREPORTS 				= Createobject("CrystalRuntime.Application.9")
>		.OREPORT 						= .OCRYSTALREPORTS.OPENREPORT(CFILE)
>		.OREPORT.Papersize				= This.Papersize
>		.OREPORT.PERFORMGROUPINGONSERVER= .T.
>		.OREPORT.ENABLEASYNCQUERY		= .T.
>		.OREPORT.PAPERORIENTATION		= Iif(This.PAPERORIENTATION>0,This.PAPERORIENTATION,0)
>		.OREPORT.REPORTTITLE 			= Thisform.REPORTTITLE
>
>		If Vartype(Thisform.PARAMETER1)#"L"
>			.OREPORT.PARAMETERFIELDS(1).SETCURRENTVALUE(Thisform.PARAMETER1)
>		Endif
>
>		If Vartype(Thisform.PARAMETER2)#"L"
>			.OREPORT.PARAMETERFIELDS(2).SETCURRENTVALUE(Thisform.PARAMETER2)
>		Endif
>
>		If Vartype(Thisform.PARAMETER3)#"L"
>			.OREPORT.PARAMETERFIELDS(3).SETCURRENTVALUE(Thisform.PARAMETER3)
>		Endif
>		If Vartype(Thisform.PARAMETER4)#"L"
>			.OREPORT.PARAMETERFIELDS(4).SETCURRENTVALUE(Thisform.PARAMETER4)
>		Endif
>		If Vartype(Thisform.PARAMETER5)#"L"
>			.OREPORT.PARAMETERFIELDS(5).SETCURRENTVALUE(Thisform.PARAMETER5)
>		Endif
>		If Vartype(Thisform.PARAMETER6)#"L"
>			.OREPORT.PARAMETERFIELDS(6).SETCURRENTVALUE(Thisform.PARAMETER6)
>		Endif
>		If Vartype(Thisform.PARAMETER7)#"L"
>			.OREPORT.PARAMETERFIELDS(7).SETCURRENTVALUE(Thisform.PARAMETER7)
>		Endif
>
>		If Vartype(Thisform.PARAMETER8)#"L"
>			.OREPORT.PARAMETERFIELDS(8).SETCURRENTVALUE(Thisform.PARAMETER8)
>		Endif
>		If Vartype(Thisform.PARAMETER9)#"L"
>			.OREPORT.PARAMETERFIELDS(9).SETCURRENTVALUE(Thisform.PARAMETER9)
>		Endif
>
>		If Vartype(Thisform.PARAMETER10)#"L"
>			.OREPORT.PARAMETERFIELDS(10).SETCURRENTVALUE(Thisform.PARAMETER10)
>		Endif
>
>
>		If Vartype(Thisform.PARAMETER11)#"L"
>			.OREPORT.PARAMETERFIELDS(11).SETCURRENTVALUE(Thisform.PARAMETER11)
>		Endif
>
>
>		If Vartype(Thisform.PARAMETER12)#"L"
>			.OREPORT.PARAMETERFIELDS(12).SETCURRENTVALUE(Thisform.PARAMETER12)
>		Endif
>
>
>		If Vartype(Thisform.PARAMETER13)#"L"
>			.OREPORT.PARAMETERFIELDS(13).SETCURRENTVALUE(Thisform.PARAMETER13)
>		Endif
>
>		If Vartype(Thisform.PARAMETER14)#"L"
>			.OREPORT.PARAMETERFIELDS(14).SETCURRENTVALUE(Thisform.PARAMETER14)
>		Endif
>
>		If Vartype(Thisform.PARAMETER15)#"L"
>			.OREPORT.PARAMETERFIELDS(15).SETCURRENTVALUE(Thisform.PARAMETER15)
>		Endif
>
>
>		If Vartype(Thisform.RECORDSELECTIONFORMULA)#"L"
>			.OREPORT.RECORDSELECTIONFORMULA = Thisform.RECORDSELECTIONFORMULA
>		Endif
>
>
>		If Vartype(Thisform.GROUPSELECTIONFORMULA)#"L"
>			.OREPORT.GROUPSELECTIONFORMULA = Thisform.GROUPSELECTIONFORMULA
>		Endif
>
>
>		.AddObject("oleCRViewer", "oleControl", "crViewer9.crViewer")
>
>		Thisform.Visible = .T.
>		Thisform.Enabled = .T.
>
>
>		If This.PRINTDIRECTTOPRINTER
>			This.Visible = .F.
>			.OREPORT.PRINTOUTEX
>		Else
>			With .OLECRVIEWER
>				.Top = 1
>				.Left = 1
>				.Height = Thisform.Height - 2
>				.Width  = Thisform.Width - 2
>				.REPORTSOURCE        = Thisform.OREPORT
>				.ENABLEREFRESHBUTTON = .F.
>				.ShowInTaskbar=.T.
>				.ShowTips = .T.
>				.ENABLEEXPORTBUTTON=.T.
>
>
>				.ENABLEANIMATIONCTRL=.T.
>				.ENABLEDRILLDOWN=.T.
>				.ENABLEGROUPTREE=.T.
>				.ENABLEPRINTBUTTON=.T.
>				.ENABLEPROGRESSCONTROL=.T.
>
>				.VIEWREPORT()
>
>			Endwith
>		Endif
>
>	Endwith
>
>Endif
>
>Thisform.Refresh
>OPRO.Release()
>
>If This.PRINTDIRECTTOPRINTER
>	This.Release
>Endif
>
>
>
>

>
>TIA
>
>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform