Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reports Load Very Slowly?
Message
From
09/06/2006 23:17:59
 
 
To
09/06/2006 10:20:51
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
01127794
Message ID:
01128249
Views:
19
The Datasource is VFP 9.0 SP1. CR9.2 uses ODBC to read data from the tables.
I thought CR loads data after we see the CR Viewer on screen. After the CR Viewer is dispalyed on the screen i could see the record and page counters getting updated continuously.

Anyway, first i thought it must be my query so i created 2 Temporary table on the clients workstation, dumped the VFP Query data into these tables and than made CR read the data from these 2 local tables but the initial loading of the CR from VFP was still the same. After i see the CR Viewer on screen the processing was quite fast... faster than what it used to be with multiple tables joined over the network.

The next thing which i am hoping to do which does not sound very practical is to save the REPORTS directory on every client machine. Than i will try to load the CR reports from VFP App locally. I hope this may make some difference.

Craig, i have another question for you. Can you please guide me how to make CR9.2 read VFP database using VFPOLEDB. I tried number of times by creating a VFPOLEDB connection to VFP database but my CR9.2 crashes. I think i am doing something wrong.

TIA

>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
>>
>>
Sanjay Dhiraj Patel

MCSE, MCDBA

Net2Biz (Thailand)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform