Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in XFRX Preview sample
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2008 R2
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01647306
Message ID:
01647309
Views:
92
This message has been marked as the solution to the initial question of the thread.
>>>I am trying to figure out how the use the XFRX preview, but the example does not seem to work for me:
>>>
lnRetVal = loSession.SetParams(,,,,,,"PREVIEWFRM")
>>>always returns -4.
>>>
>>>Does anybody have experience with xfrx report preview and can give me a hint what I am doing wrong?
>>
>>Hi Christian,
>>
>>PREVIEWFRM is unknow output type.
>>
>>See to help: https://eqeuscom.atlassian.net/wiki/display/DOC/XFRX+previewer
>>
>>MartinaJ
>

See to extension handler on the same web page.
USE invoices ORDER customer
LOCAL loSession, lnRetval, loXFF, loPreview, loScripts
loSession=EVALUATE([xfrx("XFRX#LISTENER")])
lnRetVal = loSession.SetParams("",,,,,,"XFF") && no name = just in memory
IF lnRetVal = 0
   REPORT FORM invoices OBJECT loSession              
   loXFF = loSession.oxfDocument
   *
   * initialize the previewer
   *
   SET CLASSLIB TO xfrxlib ADDITIVE
   loPreview = CREATEOBJECT("frmMPPreviewer")
   loPreview.setExtensionHandler(CREATEOBJECT("MyExtensionHandler"))
   loPreview.windowType = 0
   loPreview.iBook = 0
   loPreview.PreviewXFF(loXFF)
   loPreview.show(1)
ENDIF
MartinaJ

>Yes that is strange, because I copied it from their manual. I also tried the other code already, but have a problem to get an object reference for loXFF, it does not mention anything about this in the context. Do you know how that needs to be instantiated?
>
>loPreview = CREATEOBJECT("frmMPPreviewer")
>loPreview.oDisplayDefaults.StartingPage = 2
>loPreview.oDisplayDefaults.DefaultOutputFileName = "invoice15_09"
>loPreview.oDisplayDefaults.ZoomFactor = -1
>loPreview.oDisplayDefaults.PagesPerSheet = "1x1"
>loPreview.PreviewXFF(loXFF)
>loPreview.show(1)
>
"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