Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XFRX Previewer processes output to EXCEL very slowly
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01040643
Message ID:
01040686
Views:
19
Hello Barry,

It's strange...
This code is called if you can save report to another format:
frmpreviewer.cmdExport::Click() of previewer.vcx
LOCAL opt, optform
opt = CREATEOBJECT("cusOptions")
opt.cPagescope = ""
opt.cTarget = tcOutput
opt.coutputfile = "output"
optform = CREATEOBJECT("frmoptions", opt)
optform.Show()

IF EMPTY(opt.cOutputFile)
	RETURN .f.
ENDIF

LOCAL loSession
loSession=EVALUATE([xfrx("XFRX#INIT")])

IF loSession.SetParams(opt.coutputfile,,,,,,opt.cTarget) = 0
	IF NOT EMPTY(opt.cPageScope)
		loSession.setPageRange(opt.cPageScope)
	endif
	loSession.TransformReport(thisform.oReport)
ENDIF
After create object loSession add new line:
* Create log file, detect mayn bugs
losession.clogfile="c:\temp\xlscov.log"
IMHO, the big time is flag of many bugs (calling event Error() )

MartinJ

>I use the following code to drive the XFRX Previewer. After the preview shows, I use the toolbar to select output to EXCEL. The report takes twenty three minutes to process:
>
>
>loSession = xfrx("XFRX#INIT")
>lnRetVal = loSession.SetParams(,,,,,,"XFF") && no name = just in memory
>If lnRetVal = 0
>   *
>   * initialize the previewer
>   *
>   loPreview = CREATEOBJECT("frmPreviewer")
>   loPreview.windowtype = 1 && modal
>   *
>   * the finalize method returns the XFRX#DRAW object reference
>   *
>   loSession.ProcessReport(m.lcRepName, m.lcCondition)
>   loPreview.cmdopen.Click(loSession.finalize()) && show the document
>   loPreview.show(1)
>   *
>ENDIF
>
>
>However when I use the following code which bypasses the XFRX previewer, the same report processes within four minutes.
>
>
>loSession=xfrx("XFRX#INIT")
>lnRetVal = loSession.SetParams(ForceExt(m.lcRepName,[xls]),,,,,,"XLS")
>If lnRetVal = 0
>
>   loSession.SetOtherParams("NEXT_SHEET_NAME", m.Title1)
>   loSession.ProcessReport(m.lcRepName, m.lcCondition)
>   loSession.finalize()
>
>Endif
>
>
>Any advice would be greatly appreciated.
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform