Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Naming a Foxpro Report

Status
Not open for further replies.

RazorbackHog

Programmer
Oct 28, 2000
183
US
Is there a way to control the output name of a VFP report? When a report prints, the name displayed in the spooler is Visual Foxpro, also a printer with a lcd will display Visual Foxpro. I would like to be able to control the name because when I print to the Acrobat Distiller driver the name of the output file becomes "Visual Foxpro.pdf". I am currently having to rename that file to the name I actually want. This is a problem when you are having to wait on the Adobe Distiller to produce the file.
 
Talk about your dejavu.

Hi Randy,

Coincidentally, this was brought to my attention late yesterday (Friday) afternoon.

Unfortunately, I will be out of the office all next week. However, when I return, I plan to address this issue and seek a resolution.

So I will keep a watch on this thread and hope someone else can help you derive a solution.

Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,

When All We Want Is Unity. - Creed
 
What if you use a COM object created by VFP and use it to print the report. I've never tried it, just thinking of something off my head. In fact, I dont even know if a COM object can print a report. :O Anyways, I wonder if it wouldnt pick up the name of the server instead. John Durbin
john@johndurbin.com
MCP Visual FoxPro
ICQ VFP ActiveList #73897253
 
For starters try this and tell me if you still get the Foxpro message. Put the following code in a project and build an exe named myprintname.exe. Pass it a report file as such:[tt]
oVFPPrint = CREATEOBJECT("myprintname.appname")
oVFPPrint.PrintIt(<your report file>)[/tt]

code:[tt]
DEFINE CLASS AppName AS CUSTOM OLEPUBLIC
lErrorOccurred = .F.
cErrorMessage = &quot;Error msg returned here&quot;
FUNCTION PrintIt()
LPARAMETERS tcReportFile
LOCAL lcFile
lcFile = tcReportFile
IF !FILE(lcFile) OR JUSTEXT(lcFile)<>&quot;FRX&quot;
This.lErrorOccurred = .T.
This.cErrorMessage = &quot;File Not Found&quot;
RETURN
ENDIF
REPORT FORM (lcFile) NOCONSOLE TO PRINT
This.cErrorMessage = &quot;Test ok&quot;
ENDFUNC
FUNCTION ERROR
LPARAMETERS nError, cMethod, nLine
This.lErrorOccurred = .T.
This.cErrorMessage = &quot;Error #&quot; + ALLT(STR(nError)) + ;
&quot; occurred in&quot; + CHR(13);
+ &quot;Method &quot; + cMethod + CHR(13);
+ &quot;on line #&quot; + ALLT(STR(nLine))
ENDFUNC
ENDDEFINE
[/tt]
John Durbin
john@johndurbin.com
MCP Visual FoxPro
ICQ VFP ActiveList #73897253
 
Randy, Stop using Acrobat Distiller and use Acrobat PdfWriter or check out


David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
I figured there had to be a much easier way. I also figured Dave or Robert would know :p John Durbin
john@johndurbin.com
MCP Visual FoxPro
ICQ VFP ActiveList #73897253
 
I have already tried PDFwriter but it doesn't handle all my graphics properly. I would rather not have to buy additional software since I have already bought this software. What advantages does amyuni have?
 
It supports Api calls, you can pass it a file name to use and several other options cost $99.00


David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Thanks! I'll take a look at it. Still wanted to be able to name my report though. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top