James,

FWIW, you're doing it exactly the way I do, except I'm creating PDFs, 
not XFF files.

With XFRX, the output location and file name are defined using the first 
parameter of the .SetParams() method as you have done below.

All I can suggest is to make sure that the path and folder exist prior 
to running the report output. In fact, you might try simply specifying 
the file name...something like a fixed string "Test123", without a path 
specified, run the routine, then look for the file to see if the file 
name is a match. My understanding is that XFRX will output to the 
default VFP folder.

Next try creating the report in C:\ (unless you're on Win7) or some 
other simple location and build from there.

Mike

-------- Original Message  --------
Subject: XFRX default "output" file name
From: James E Harvey <jhar...@hanoverpa.com>
To: profoxt...@leafe.com
Date: 9/8/2011 10:42 AM

I'm trying to figure out how to change the default "output" file name to a
programmatically generated name in a specific folder, but can't seem to
connect the dots.

Below is the code that creates the XFRX previewer, which works, but the
default name remains "output" and is located in the working folder.

Lcfile doesn't seem to matter.

So when a user runs the report, and then selects the export file button, the
"Export Options" dialog box pops up and the "File Name" text box is
automatically filled with "output" along with the appropriate extension
depending on  what kind of file they are exporting to.

The doc's mention a "loObj.targetfilename" property, but I'm at a loss as to
how to implement it in the code below.

Maybe someone else has already done this (Sytze?)...


Local loSession, lnRetval, lcPageCaption

lcfile = sys(5) +  "\foxdat\xfrx\" +  sys(2015)

mreport = "hsrpmarebooknotify"

toViewer = Createobject("frmMPPreviewer")

loSession=Evaluate([xfrx("XFRX#LISTENER")])

lnRetval = loSession.SetParams(lcfile,,,,,,"XFF")

If lnRetval = 0
                Report Form&mreport Object loSession
Endif

toViewer.iTool = 2


Local loXFFDocument

loXFFDocument = loSession.oxfdocument

toViewer.previewXFF(loXFFDocument, lcPageCaption)

If toViewer.Visible = .F.
        toViewer.Show(1)
ENDIF




James E Harvey
Corresponding Officer/M.I.S.
Hanover Shoe Farms, Inc.
www.hanoverpa.com
office: 717-637-8931
cell: 717-887-2565
fax: 717-637-6766



[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4e68fc2d.20...@ggisoft.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to