Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Xfrx preview
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Xfrx preview
Miscellaneous
Thread ID:
00880766
Message ID:
00880766
Views:
66
I am trying to aset up xfrx so that I can preview documents from the application, then select the option to send to Excel, Word, etc (from the preview screen.

I tried two scenarios:

1) I took the preview.scx that Martin provided (from predemo directory) and modified the INIT to read:

local loSession, lnRetval
loSession=EVALUATE([xfrx("XFRX#INIT")])
lnRetVal = loSession.SetParams(,,,,,,"CNT")
loSession.setotherparams(thisform.cntXFRX)
loSession.ProcessReport(document.filename)
loSession.Finalize()

this.WindowState = 2
WITH this.cntxFRX
IF TYPE(".oTool")="O" AND NOT ISNULL(.oTool)
.oTool.dock(0)
ENDIF
endwith

This previews my report very nicely, but I do not have the toolbar options for Excel, etc. In this example, I am having difficulty finding how the toolbar is loaded in Martins example.

**********

2) I called the frmPreviewer class, as Martin does from the demo.scx example. as such:

public loPreview
SET CLASSLIB TO previewer
SET CLASSLIB TO xfrxlib ADDITIVE
loPreview = CREATEOBJECT("frmPreviewer")
loPreview.show(0)
loPreview.cmdopen.Click()

In order to run my existing report (and not be prompted for a report to load), I then modificed the INIT to read:

local loSession, lnRetval
loSession=EVALUATE([xfrx("XFRX#INIT")])
lnRetVal = loSession.SetParams(,,,,,,"CNT")
loSession.setotherparams(thisform.cntXFRX)
loSession.ProcessReport(document.filename)
loSession.Finalize()

this.cntxFRX.lastinited(0)

WITH this.cntxFRX
IF TYPE(".oTool")="O" AND NOT ISNULL(.oTool)
.oTool.dock(0)
ENDIF
endwith


This example causes several errors, as Apparently, this scenario is designed to query the user for a report to open upon loading. However, if I IGNORE enough, then it does eventually bring up a preview screen with the toolbar, but without the report. Here I need to understand how to set up this class to accept a default report.

****

Does anyone have any suggestions on how to accomplish the preview with the toolbar (using either scenario)? Thanks.

David
Next
Reply
Map
View

Click here to load this message in the networking platform